Mikrotik 3 WAN Load Balancing Static IP (NTH Method)


This post represents on anyway you'll assemble load compromise of various wan connections misuse Mikrotik Routerboard equipment (or RouterOS x86 adaptation). amid this precedent I even have utilized Mikrotik Routerboard rubidium 750 hex nonfat model. three port's was associated with line electronic gear. what's more, one port was associated with User PC network.Don't neglect to rename the interface names subsequently in case you're a copy glue.

Step1: Add interface ether name...
  • /interface ethernet
  • set [ find default-name=ether5 ] name=LAN
  • set [ find default-name=ether1 ] name=WAN1
  • set [ find default-name=ether2 ] name=WAN2
  • set [ find default-name=ether3 ] name=WAN3
  • set [ find default-name=ether4 ] name=ether4
Step2: Add ip Address
  • /ip address
  • add address=192.168.60.1/24 interface=LAN network=192.168.60.0
  • add address=192.168.1.2/24 interface=WAN1 network=192.168.1.0
  • add address=192.168.2.2/24 interface=WAN2 network=192.168.2.0
  • add address=192.168.3.2/24 interface=WAN3 network=192.168.3.0
Step3: Add DNS
  • /ip dns
  • set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
  • /system note set note="Mikrotik Configuration By |www.mikrotiksystems.com|" show-at-login=yes
Step4: Add Firewall Mangle Rule
  • /ip firewall mangle
  • add action=mark-connection chain=input in-interface=WAN1 new-connection-mark=\
  •     WAN1_conn
  • add action=mark-connection chain=input in-interface=WAN2 new-connection-mark=\
  •     WAN2_conn
  • add action=mark-connection chain=input in-interface=WAN3 new-connection-mark=\
  •     WAN3_conn
  • add action=mark-routing chain=output connection-mark=WAN1_conn \
  •     new-routing-mark=to_WAN1
  • add action=mark-routing chain=output connection-mark=WAN2_conn \
  •     new-routing-mark=to_WAN2
  • add action=mark-routing chain=output connection-mark=WAN3_conn \
  •     new-routing-mark=to_WAN3
  • add chain=prerouting dst-address=192.168.1.0/24 in-interface=LAN
  • add chain=prerouting dst-address=192.168.2.0/24 in-interface=LAN
  • add chain=prerouting dst-address=192.168.3.0/24 in-interface=LAN
  • add action=mark-connection chain=prerouting dst-address-type=!local \
  •     in-interface=LAN new-connection-mark=WAN1_conn per-connection-classifier=\
  •     both-addresses-and-ports:3/0
  • add action=mark-connection chain=prerouting dst-address-type=!local \
  •     in-interface=LAN new-connection-mark=WAN2_conn per-connection-classifier=\
  •     both-addresses-and-ports:3/1
  • add action=mark-connection chain=prerouting dst-address-type=!local \
  •     in-interface=LAN new-connection-mark=WAN3_conn per-connection-classifier=\
  •     both-addresses-and-ports:3/2
  • add action=mark-routing chain=prerouting connection-mark=WAN1_conn \
  •     in-interface=LAN new-routing-mark=to_WAN1
  • add action=mark-routing chain=prerouting connection-mark=WAN2_conn \
  •     in-interface=LAN new-routing-mark=to_WAN2
  • add action=mark-routing chain=prerouting connection-mark=WAN3_conn \
  •     in-interface=LAN new-routing-mark=to_WAN3
Step5: Add Firewall Nat Rule
  • /ip firewall nat
  • add action=masquerade chain=srcnat out-interface=WAN1
  • add action=masquerade chain=srcnat out-interface=WAN2
  • add action=masquerade chain=srcnat out-interface=WAN3
Step6: Add Route ip
  • /ip route
  • add check-gateway=ping distance=1 gateway=192.168.1.1 routing-mark=to_WAN1
  • add check-gateway=ping distance=1 gateway=192.168.2.1 routing-mark=to_WAN2
  • add check-gateway=ping distance=1 gateway=192.168.3.1 routing-mark=to_WAN3
  • add check-gateway=ping distance=1 gateway=192.168.1.1
  • add check-gateway=ping distance=2 gateway=192.168.2.1
  • add check-gateway=ping distance=3 gateway=192.168.3.1
if you have face any error to view this videoDownload Complete Script {Download}


Author  Bilal Ahmad

• Hands on Experience with Cisco & Huawei Layer 2 & Layer 3 devices and Mikrotik Routers. • Maintained and managed several long distances RF point to point and point to multipoint links.