-
Notifications
You must be signed in to change notification settings - Fork 0
Dual-WAN MikroTik Router with VLANs & PCC Load Balancing A MikroTik RouterOS configuration featuring VLAN trunking, DHCP, and per-connection-classifier (PCC) load balancing across two ISPs. Designed for SME networks with scalable routing and segmentation.
mizitheji/Load-balancing-ISP-using-Mikrotik
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Β | Β | |||
Β | Β | |||
Β | Β | |||
Β | Β | |||
Repository files navigation
# MikroTik Dual-WAN Router with VLANs and PCC Load Balancing This configuration sets up a MikroTik router to support: - Dual-WAN connections (ISP1 and ISP2) - VLAN trunking with separate subnets for management and users - DHCP servers for each VLAN - PCC (Per Connection Classifier) load balancing across both ISPs - Policy-based routing - Basic firewall security --- ## π¦ Features - π **Dual-WAN failover and load balancing** using PCC (per-connection-classifier) - π **Three VLANs**: Management (VLAN 1), User VLAN 10, User VLAN 20 - π **DHCP server** for each VLAN - π **Basic firewall rules** for input filtering - π **Policy-based routing** via separate routing tables - π§° Designed for **SME network environments** with trunk ports --- ## π§ Interface Overview | Interface | Name | Description | |-----------|-------|------------------------------| | ether1 | ISP1 | Primary Internet Connection | | ether2 | ISP2 | Secondary Internet Connection| | ether3 | LAN | Connected to switch (Trunk) | | VLAN 1 | Mgmt | Management VLAN (172.31.10.0/24) | | VLAN 10 | V10 | User VLAN 10 (192.168.10.0/24) | | VLAN 20 | V20 | User VLAN 20 (192.168.20.0/24) | --- ## π IP Addressing | VLAN | Subnet | Gateway IP | DHCP Pool | |-------|-------------------|------------------|----------------------------| | Mgmt | 172.31.10.0/24 | 172.31.10.1 | 172.31.10.2 β .254 | | V10 | 192.168.10.0/24 | 192.168.10.1 | 192.168.10.2 β .254 | | V20 | 192.168.20.0/24 | 192.168.20.1 | 192.168.20.2 β .254 | | ISP1 | 192.168.19.128/25 | 192.168.19.129 | β | | ISP2 | 192.168.19.0/25 | 192.168.19.101 | β | --- ## π‘ Load Balancing Logic (PCC) Traffic from the LAN is split across both WANs: - **50/50 Load Balancing** using `per-connection-classifier=both-addresses:2/X` - **Routing Marks** assigned to connections - **Separate Routing Tables** ### Mangle Chain Summary - Accept internal WAN-to-WAN traffic - Mark incoming connections from ISP1/ISP2 - Mark new connections from LAN using PCC - Apply routing marks based on connection marks --- ## π₯ Firewall ### Input Filter | Action | Chain | Description | |--------|-------|------------------------------| | Drop | input | Drop invalid connections | | Accept | input | Allow established/related | ### NAT | Chain | Action | Out Interface | |----------|-------------|---------------| | srcnat | Masquerade | ISP1 | | srcnat | Masquerade | ISP2 | ---
About
Dual-WAN MikroTik Router with VLANs & PCC Load Balancing A MikroTik RouterOS configuration featuring VLAN trunking, DHCP, and per-connection-classifier (PCC) load balancing across two ISPs. Designed for SME networks with scalable routing and segmentation.