Mikrotik Load Balancing With NTH For 3 Line Internet Source

Posted by Admin Thursday, December 9, 2010 0 comments
This is my firewall mangle, Nat, and Routing Rules for Load Balance with NTH metod at mikrotik 3.x. With This Rules, we can optimize if we have more than one internet connection from ISP's. For Example, if i have 3 line source internet where each speed is 1Mbps, we can optimize to be 3Mbps in one time. To Test this setting, i use Internet Download Manager. Ok this is my rules:



/ip firewall mangle
add action=mark-connection chain=prerouting comment="" connection-state=new disabled=no dst-port=80 in-interface=Lokal new-connection-mark=conn-mark3 nth=3,1 \
passthrough=yes protocol=tcp
add action=mark-routing chain=prerouting comment="" connection-mark=conn-mark3 disabled=no in-interface=Lokal new-routing-mark=route-mark3 passthrough=no
add action=mark-connection chain=prerouting comment="" connection-state=new disabled=no dst-port=80 in-interface=Lokal new-connection-mark=conn-mark2 nth=2,1 \
passthrough=yes protocol=tcp
add action=mark-routing chain=prerouting comment="" connection-mark=conn-mark2 disabled=no in-interface=Lokal new-routing-mark=route-mark1 passthrough=no
add action=mark-connection chain=prerouting comment="" connection-state=new disabled=no dst-port=80 in-interface=Lokal new-connection-mark=conn-mark1 nth=1,1 \
passthrough=yes protocol=tcp
add action=mark-routing chain=prerouting comment="" connection-mark=conn-mark1 disabled=no in-interface=Lokal new-routing-mark=route-mark2 passthrough=no

/ip firewall nat
add action=masquerade chain=srcnat comment="" disabled=no out-interface=Line1
add action=masquerade chain=srcnat comment="" disabled=no out-interface=Line2
add action=masquerade chain=srcnat comment="" disabled=no out-interface=Line3
add action=redirect chain=dstnat comment="" disabled=no dst-port=53 protocol=udp to-ports=53

/ip route
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=Line1 routing-mark=route-mark1
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=Line2 routing-mark=route-mark2
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=Line3 routing-mark=route-mark3
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=Line1
add comment="" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=Line2
add comment="" disabled=no distance=3 dst-address=0.0.0.0/0 gateway=Line3

0 comments:

Post a Comment