Load Balancing (2 or 3 ADSL Line)

Guys,

I’m using RB493AH and i have existing 1 DSL at the moment but i plan to add
1 or 2 DSL line this june so i just want to ask your help setting up Load Balancing for my RB493AH. both DSL account use PPOE and how to enable NAT on port ether3 because ether0 and ether8 & ether9 will be use as WAN port.

ether1 & ether 2 IP: 10.10.10.254 (Bridge Mode)

ether3 IP: 10.10.1.254
ether4 IP: 10.10.2.254 so on and so forth.

Thanks in advance for your help. if this request if too much, i will pay for the config and please contact me at nanflexal@gmail.com. please create config for 2 WAN and 3 WAN.

@ Alex

I’m just thinking on how i can use this config to my situation.

LAN:
ether1: 10.10.10.254
ether2: 10.10.0.254
ether3: 10.10.1.254
ether4: 10.10.2.254



Load Balancing Diagram




WAN Dialer
1.  / interface pppoe-client
add interface=ether0 user="username" password="password" \
add-default-route=yes use-peer-dns=yes disabled=no

2.  / interface pppoe-client
add interface=ether8 user="username" password="password" \
add-default-route=yes use-peer-dns=yes disabled=no

3.  / interface pppoe-client
add interface=ether9 user="username" password="password" \
add-default-route=yes use-peer-dns=yes disabled=no


/ip address add address=10.10.10.254/24 interface=ether1
/ip address add address=10.10.0.254/24 interface=ether2
/ip address add address=10.10.1.254/24 interface=ether3
/ip address add address=10.10.2.254/24 interface=ether4

original thread: http://forum.mikrotik.com/t/more-control-over-pcc-load-balancing/38895/1


/ ip firewall mangle
add chain=input in-interface=pppoe-out1 action=mark-connection new-connection-mark=wan1_conn
add chain=input in-interface=pppoe-out2 action=mark-connection new-connection-mark=wan2_conn
add chain=input in-interface=pppoe-out3 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


add chain=prerouting dst-address-type=!local in-interface=ether1 per-connection-classifier=both-addresses-and-ports:4/0
action=mark-connection new-connection-mark=wan1_conn passthrough=yes

add chain=prerouting dst-address-type=!local in-interface=ether1 per-connection-classifier=both-addresses-and-ports:4/1
action=mark-connection new-connection-mark=wan2_conn passthrough=yes

add chain=prerouting dst-address-type=!local in-interface=ether1 per-connection-classifier=both-addresses-and-ports:4/2
action=mark-connection new-connection-mark=wan3_conn passthrough=yes


add chain=prerouting dst-address-type=!local in-interface=ether2 per-connection-classifier=both-addresses-and-ports:4/0
action=mark-connection new-connection-mark=wan1_conn passthrough=yes

add chain=prerouting dst-address-type=!local in-interface=ether2 per-connection-classifier=both-addresses-and-ports:4/1
action=mark-connection new-connection-mark=wan2_conn passthrough=yes

add chain=prerouting dst-address-type=!local in-interface=ether2 per-connection-classifier=both-addresses-and-ports:4/2
action=mark-connection new-connection-mark=wan3_conn passthrough=yes


add chain=prerouting dst-address-type=!local in-interface=ether3 per-connection-classifier=both-addresses-and-ports:4/0
action=mark-connection new-connection-mark=wan1_conn passthrough=yes

add chain=prerouting dst-address-type=!local in-interface=ether3 per-connection-classifier=both-addresses-and-ports:4/1
action=mark-connection new-connection-mark=wan2_conn passthrough=yes

add chain=prerouting dst-address-type=!local in-interface=ether3 per-connection-classifier=both-addresses-and-ports:4/2
action=mark-connection new-connection-mark=wan3_conn passthrough=yes

add chain=prerouting dst-address-type=!local in-interface=ether4 per-connection-classifier=both-addresses-and-ports:4/0
action=mark-connection new-connection-mark=wan1_conn passthrough=yes

add chain=prerouting dst-address-type=!local in-interface=ether4 per-connection-classifier=both-addresses-and-ports:4/1
action=mark-connection new-connection-mark=wan2_conn passthrough=yes

add chain=prerouting dst-address-type=!local in-interface=ether4 per-connection-classifier=both-addresses-and-ports:4/2
action=mark-connection new-connection-mark=wan3_conn passthrough=yes


add chain=prerouting connection-mark=wan1_conn in-interface=ether1 action=mark-routing new-routing-mark=to_wan1
add chain=prerouting connection-mark=wan2_conn in-interface=ether1 action=mark-routing new-routing-mark=to_wan2
add chain=prerouting connection-mark=wan3_conn in-interface=ether1 action=mark-routing new-routing-mark=to_wan3

add chain=prerouting connection-mark=wan1_conn in-interface=ether2 action=mark-routing new-routing-mark=to_wan1
add chain=prerouting connection-mark=wan2_conn in-interface=ether2 action=mark-routing new-routing-mark=to_wan2
add chain=prerouting connection-mark=wan3_conn in-interface=ether2 action=mark-routing new-routing-mark=to_wan3

add chain=prerouting connection-mark=wan1_conn in-interface=ether3 action=mark-routing new-routing-mark=to_wan1
add chain=prerouting connection-mark=wan2_conn in-interface=ether3 action=mark-routing new-routing-mark=to_wan2
add chain=prerouting connection-mark=wan3_conn in-interface=ether3 action=mark-routing new-routing-mark=to_wan3

add chain=prerouting connection-mark=wan1_conn in-interface=ether4 action=mark-routing new-routing-mark=to_wan1
add chain=prerouting connection-mark=wan2_conn in-interface=ether4 action=mark-routing new-routing-mark=to_wan2
add chain=prerouting connection-mark=wan3_conn in-interface=ether4 action=mark-routing new-routing-mark=to_wan3


/ ip route
add dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_wan1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=to_wan2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out3 routing-mark=to_wan3 check-gateway=ping


add dst-address=0.0.0.0/0 gateway=pppoe-out1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out2 distance=2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=pppoe-out3 distance=3 check-gateway=ping

/ ip firewall nat
add chain=srcnat out-interface=pppoe-out1 action=masquerade
add chain=srcnat out-interface=pppoe-out2 action=masquerade
add chain=srcnat out-interface=pppoe-out3 action=masquerade

guys, can i use this config to my situation? thanks in advance
load-balancing.JPG

I think your:
per-connection-classifier=both-addresses-and-ports:4/0
per-connection-classifier=both-addresses-and-ports:4/1
per-connection-classifier=both-addresses-and-ports:4/2
should be:
per-connection-classifier=both-addresses-and-ports:3/0
per-connection-classifier=both-addresses-and-ports:3/1
per-connection-classifier=both-addresses-and-ports:3/2

Otherwise it seems ok but if you implement, make backup before so you can restore in case it doesn’t work.

Guys,

I talk to my ISP provider, they said they support MLPPOE this mean i can use bonded feature in my RB493AH but i need help about bonded config.

I want to bonded my 3 ADSL first before implementing load balancing. if my ISP don’t Support bonded “MLPPOE”. (Multi Line procotol) then i will setup load balancing.


thanks in advance.

Set all modems to bridge mode so you run PPP on the router. Add a PPP client and specify all three interfaces under the one client. That’s it.
http://wiki.mikrotik.com/wiki/Manual:MLPPP_over_single_and_multiple_links#MLPPP_over_multiple_links