Community discussions

MikroTik App
 
nightshadow36
just joined
Topic Author
Posts: 19
Joined: Wed Jul 11, 2012 9:04 pm

Help trying to get load balance script to work

Sat Jan 12, 2013 7:19 am

Hi I have got this script from the Internet for load balancing. I am a novice to mikrotik and i can not work out what is wrong.
Could some one take a look and poing out what is wrong.
Thank you.
Ps - I am testing with only 1 DSL Line.

SCRIPT

/ip firewall nat
add action=masquerade chain=srcnat comment=DSL-1 disabled=no out-interface=\
pppoe-out1-DSL-1
add action=masquerade chain=srcnat comment=DSL-2 disabled=no out-interface=\
pppoe-out2-DSL-2
/ip firewall mangle
add action=mark-routing chain=output comment=DSL1 connection-mark=internet1_conn disabled=no \
new-routing-mark=to_internet1 passthrough=yes
add action=mark-routing chain=output comment=DSL2 connection-mark=internet2_conn disabled=no \
new-routing-mark=to_internet2 passthrough=yes
add action=mark-connection chain=input disabled=no in-interface=bridge1-LAN new-connection-mark=\
internet1_conn passthrough=yes
add action=mark-connection chain=input disabled=no in-interface=bridge1-LAN new-connection-mark=\
internet2_conn passthrough=yes
/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out2-DSL-2,pppoe-out1-DSL-1 scope=30 target-scope=10

Image
pic hosting

Image
picture sharing
 
samsung172
Forum Guru
Forum Guru
Posts: 1193
Joined: Sat Apr 04, 2009 3:45 am
Location: Østfold - Norway
Contact:

Re: Help trying to get load balance script to work

Sat Jan 12, 2013 9:13 am

Why test loadbalancing, when you have just 1 connecton to do the test? To use Your only dsl line, try to add 2 default routes With different distance.

ros code

/ip route remove dst-address=0.0.0.0/0 gateway=pppoe-out2-DSL-2,pppoe-out1-DSL-1 
/ip route add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out2-DSL-2 scope=30 target-scope=10
/ip route add disabled=no distance=10 dst-address=0.0.0.0/0 gateway=pppoe-out1-DSL-1 scope=30 target-scope=10