Configure load balancing 2 ISP in MikroTik Router

Load balancing there are two ISP that allow you to distrubute network traffic across two internet service providers (ISPs)
  1. Load Balancing: Traffic is distributed between the two ISPs based on configured policies, ensuring efficient use of both connections.
  2. Failover: If one ISP connection fails and one more  IPS is   up 

  1. Connect to iSP 1
  2. Connect to iSP 2
  3. Configure LAN IP Address
  4. Configure Route
  5. Configure NAT 
  6. Configure Mangle (mark connection)
  7. Configure Mangle (mark routing)
  8. Confgure Route Again
  9. Testing Clients
  • Open winbox login to your router via IP address or Mac address
  • Rename Interface: Go to Interface ehter1 to ehter1-ISP1, ether1 to ether2-ISP2
  • Rename Interface: Go to Interface ehter3 to ehter2-LAN

1. Connect to ISP1
  • Set IP Address: Go to IP > Address > "+" button > Set IP address of ISP1 > Ok

2. Connect to ISP2
  • Set IP Address: Go to IP > Address > "+" button > Set IP address of ISP2 > Ok

3. Configure LAN IP Address
  • Set IP address LAN: Go to IP > Address > "+" button > Set IP address of your LAN > Ok

4. Configure Routes
  • Add Route: Go to IP > Routes > "+" button > Fill out your imforation of your ISP > Ok 

5. Configure NAT for ISP1 and ISP2
  • Add NAT: Go to IP > Firewall > NAT > "+" button > 
  • Chain: select srcnat
  • Out Interface: select ehter1-ISP1
Action Tab
  •  Action: select masquerade
  • Click Ok
  • Add NAT: Go to IP > Firewall > NAT > "+" button > 
  • Chain: select srcnat
  • Out Interface: select ehter1-ISP2
Action Tab
  •  Action: select masquerade
  • Click Ok
6. Configure Mangle ISP1 
  • Add Mangle: Go to IP > Firewall > Mangle> "+" button > 
  • Chain: select input
  • In Interface: select ether1-ISP1

Action tab
  • Action: select mark connection
  • New Connection Mark: Add new name

6.1 Configure Mangle ISP2
  • Add Mangle: Go to IP > Firewall > Mangle> "+" button > 
  • Chain: select input
  • In Interface: select ether1-ISP2

Action tab
  • Action: select mark connection
  • New Connection Mark: Add new name

7. Configure Mangle (mark routing) ISP1
  • Add Mangle: Go to IP > Firewall > Mangle> "+" button > 
  • Chain: select output
  • Connection Mark: select ISP1-CONNECTION

Action tab
  • Action: select mark routing
  • New Connection Mark: Add new name

7.1 Configure Mangle (mark routing) ISP2
  • Add Mangle: Go to IP > Firewall > Mangle> "+" button > 
  • Chain: select output
  • Connection Mark: select ISP2-CONNECTION

Action tab
  • Action: select mark routing
  • New Connection Mark: Add new name

8. Configure Route to ISP1
  • Add Routes: Go to  IP > Routes > "+" button > 
  • Dst Address: 0.0.0.0 
  • Gateway: 10.10.10.1 (gateway of ISP1)
  • Check Gateway: ping
  • Routing Mark: TO-ISP1

8. Configure Route to ISP2
  • Add Routes: Go to  IP > Routes > "+" button > 
  • Dst Address: 0.0.0.0 
  • Gateway: 20.20.20.1 (gateway of ISP1)
  • Check Gateway: ping
  • Routing Mark: TO-ISP2

9. Testing client

  • ISP1 lost internet it still working via ISP2






Post a Comment

Previous Post Next Post

Contact Form