Community discussions

MikroTik App
 
logros
newbie
Topic Author
Posts: 49
Joined: Thu Feb 04, 2010 11:01 pm

3 DHCP clients of the same ISP load balancing with masquerad

Tue Feb 09, 2010 6:17 pm

i have routerboard 450G
Have 3 dhcp from the same ISP
gateway for all wan's is 12.10.2.100 and dns 12.10.2.100

but won't work it right.
all traffic goes from wan3 not balanced.(((
help to fix problem

/ ip address
add address=192.168.88.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local
dhcp-client add interface=wan1 user-peer=yes add-default-route=yes disable=no
dhcp-client add interface=wan2 user-peer=yes add-default-route=yes disable=no
dhcp-client add interface=wan3 user-peer=yes add-default-route=yes disable=no

/ ip route
add dst-address=0.0.0.0/0 gateway=12.10.2.100%wan1,12.10.2.100%wan2,12.10.2.100%wan3 check-gateway=ping

/ ip firewall nat
add chain=srcnat out-interface=wan1 action=masquerade
add chain=srcnat out-interface=wan2 action=masquerade
add chain=srcnat out-interface=wan3 action=masquerade

/ ip firewall mangle
add chain=input in-interface=wan1 action=mark-connection new-connection-mark=wan1_conn
add chain=input in-interface=wan2 action=mark-connection new-connection-mark=wan2_conn
add chain=input in-interface=wan3 action=mark-connection new-connection-mark=wan3_conn

add chain=output connection-mark=wan1_conn action=mark-routing new-routing-mark=to_wan1
add chain=output connection-mark=wan2_conn action=mark-routing new-routing-mark=to_wan2
add chain=output connection-mark=wan3_conn action=mark-routing new-routing-mark=to_wan3

/ ip route
add dst-address=0.0.0.0/0 gateway=12.10.2.100%wan1 routing-mark=to_wan1
add dst-address=0.0.0.0/0 gateway=12.10.2.100%wan2 routing-mark=to_wan2
add dst-address=0.0.0.0/0 gateway=12.10.2.100%wan3 routing-mark=to_wan3
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6695
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: 3 DHCP clients of the same ISP load balancing with masquerad

Wed Feb 10, 2010 4:31 pm

The traffic is going via one interface, which dynamic /ip route to gateway is in active state (A letter is added to route).
There is no interface routing possible for DHCP, it is available for PPP interfaces.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: 3 DHCP clients of the same ISP load balancing with masquerad

Thu Feb 11, 2010 1:16 am

Who is online

Users browsing this forum: erlinden, Google [Bot], GoogleOther [Bot], loloski, morgot999, natman, sjdurand, tangent, uxertxo, xrlls and 86 guests