Home / Mikrotik Router Configuration / How to Load Balance 2 WAN in Mikrotik

How to Load Balance 2 WAN in Mikrotik

How to Load Balance 2 WAN in Mikrotik

This article again discusses Load Balancing, which is an example of How to Setup Load Balance Mikrotik 2 ISP. Here there are 2 different ISPs used, namely Bandwidth ISP A 1024 Kbps While ISP B 256 Kbps 1: 8 But here we will add one fake ISP to balance the Direct access.

Load Balance 2 WAN in Mikrotik

Here are the steps:
Use WinBox to go to -> IP -> Address
-> click [ + ] -> enter Address: 192.168.1.1/24 Network: 192.168.1.0
Broadcast: 192.168.1.255 -> Configuration LAN (Local)
Interface: Ether1
-> click [ + ] -> enter Address: 192.168.2.2/24
Network: 192.168.2.0
Broadcast: 192.168.2.255 -> Configuration WAN 1 (ISP A)
Interface: Ether2
-> click [ + ] -> enter Address: 192.168.3.2/24  Network: 192.168.3.0
Broadcast: 192.168.3.255 -> WAN 2 Configuration (ISP B)
Interface: Ether3
Create a Mangle. Use WinBox select -> New Terminal
Please copy and paste the following script:

/ Ip firewall mangle [then enter]

Add chain = prerouting in-interface = “ether1” connection-state = new nth = 2,2,0 action = mark-connection new-connection-mark = lb_1 passthrough = yes comment = “LB Client” disabled = no
add chain = Prerouting in-interface = “ether1” connection-mark = lb_1 action = mark-routing new-routing-mark = route_lb_1 passthrough = no comment =
connection_name = New nth = 2,2,1 action = mark-connection new-connection-mark = lb_2 passthrough = yes comment = “” disabled = no
add chain = connection_name = lb_2 action = mark- Routing new-routing-mark = route_lb_2 passthrough = no comment = “connect = no
add-in =” connection = “connection =” connection_name = new nth = 2,2,2 action = mark-connection new-connection- Mark = lb_3 passthrough = yes comment = “”Disabled = no
add chain = prerouting in-interface = “ether1” connection-mark = lb_3 action = mark-routing new-routing-mark = route_lb_3 passthrough = no comment = “” disabled = no

Create NAT. Pake WinBox select -> New Terminal
Copy and paste again the following script:

/ Ip firewall nat
add chain = srcnat out-interface = “ether3” action = masquerade comment = “” disabled = no
add chain = srcnat out-interface = “ether2” action = masquerade comment = “” disabled = no

Create a Route. Pake WinBox selects -> New Terminal Copy and paste again the following script:

 / Ip route
add dst-address = 0.0.0.0 / 0 gateway = 192.168.2.1 scope = 255 target-scope = 10 routing-mark = route_lb_1 comment = “” disabled = no
add dst-address = 0.0.0.0 / 0 gateway = 192.168.3.1 scope = 255 target-scope = 10 routing-mark = route_lb_2 comment = “” disabled = no
add dst-address = 0.0.0.0 / 0 gateway = 192.168.2.1 scope = 255 target-scope = 10 routing-mark = Route_lb_3 comment = “” disabled = no
add dst-address = 0.0.0.0 / 0 gateway = 192.168.2.1 scope = 255 target-scope = 10 comment = “default routing connection” disabled = no

For Interface and its IP address please adjust yourself to your needs. Such is the example of How to Setup Load Balance 2 WAN in Mikrotik.
Good luck 🙂
[\hide]

About admin

Check Also

How To Bypass Login in Mikrotik Hotspot

How To Bypass Login in Mikrotik Hotspot

How To Bypass Login in Mikrotik Hotspot Mikrotik Hotspot System makes all Users must Login …

Leave a Reply

Your email address will not be published. Required fields are marked *