modified on 24 August 2009 at 18:47 ••• 2,603 views

Talk:Balanceo de carga mejorado atravéz de multiples gateway (wan)

From MikroTik Wiki

Jump to: navigation, search

I made the configuration of my MIKROTIK in the following way, and it doesn't work, Please to help me (Flavio@newcomponline.com.br). IN CASE: I have 02 Links ADSL 4 megas and it would like to balance the two with exit for the Local interface


/ ip address add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local add address=192.168.20.3/24 network=192.168.20.0 broadcast=192.168.20.255 interface=Link2 add address=192.168.10.3/24 network=192.168.10.0 broadcast=192.168.10.255 interface=Link1

/ ip firewall mangle

add chain=prerouting src-address-list=odd in-interface=Local action=mark-connection \ new-connection-mark=odd passthrough=yes add chain=prerouting src-address-list=odd in-interface=Local action=mark-routing \ new-routing-mark=odd passthrough=no add chain=prerouting src-address-list=even in-interface=Local action=mark-connection \ new-connection-mark=even passthrough=yes add chain=prerouting src-address-list=even in-interface=Local action=mark-routing \ new-routing-mark=even passthrough=no add chain=prerouting in-interface=Local connection-state=new nth=2,1 \ action=mark-connection new-connection-mark=odd passthrough=yes add chain=prerouting in-interface=Local action=add-src-to-address-list \ address-list=odd address-list-timeout=1d connection-mark=odd passthrough=yes add chain=prerouting in-interface=Local connection-mark=odd action=mark-routing \ new-routing-mark=odd passthrough=no add chain=prerouting in-interface=Local connection-state=new nth=2,2 \ action=mark-connection new-connection-mark=even passthrough=yes add chain=prerouting in-interface=Local action=add-src-to-address-list \ address-list=even address-list-timeout=1d connection-mark=even passthrough=yes add chain=prerouting in-interface=Local connection-mark=even action=mark-routing \ new-routing-mark=even passthrough=no


/ ip firewall nat add chain=srcnat connection-mark=odd action=src-nat to-addresses=192.168.20.3 \

   to-ports=0-65535 

add chain=srcnat connection-mark=even action=src-nat to-addresses=192.168.10.3 \

   to-ports=0-65535 

/ ip route add dst-address=0.0.0.0/0 gateway=192.168.20.1 scope=255 target-scope=10 routing-mark=odd add dst-address=0.0.0.0/0 gateway=192.168.10.1 scope=255 target-scope=10 routing-mark=even add dst-address=0.0.0.0/0 gateway=192.168.10.1 scope=255 target-scope=10