Community discussions

MikroTik App
 
viktorx
just joined
Topic Author
Posts: 9
Joined: Sat May 18, 2013 8:03 pm

RB750 with multi WAN loadbalancing not working correctly?

Mon Oct 21, 2013 8:17 pm

Hi. I'm having troubles configuring RB750 (v6.5) for loadbalancing. I have tried all tutorials from wiki page (PCC, NTH, ECMP) and none of it works properly (all trafic goes only through one WAN port).
Tried with multiple PCs connected to "Local" port with switch, and with one computer downloading one or multi files eaven torrents, same thing, only one WAN is working. Sometimes it switches from one WAN to another but still only one is working no mather what.
Failover is working flawlessly (when I disable some WAN port it automatically switches all traffic to other WAN ports).

Heres my scenario:

WAN1 -> TP-Link 5110g with LAN interface 10.10.10.1 connected to AP1 (192.168.2.1) connected to ISP (Serbia Broadband)
WAN2 -> TP-Link 5110g with LAN interface 20.20.20.1 connected to AP2 (192.168.0.1) connected to ISP (Serbia Broadband)
WAN3 -> AirLive 5450AP connected to AP3 (192.168.0.11) connected to ISP (Serbia Broadband)
Local -> 50.50.50.1 with DHCP server connected to TP-Link WR741ND working only as 4 port switch

One of configurations:

/ip address
add address=50.50.50.1/24 disabled=no interface=Local network=50.50.50.0
add address=10.10.10.100/24 disabled=no interface=WAN1 network=10.10.10.0
add address=20.20.20.100/24 disabled=no interface=WAN2 network=20.20.20.0
add address=192.168.0.125/24 disabled=no interface=WAN3 network=192.168.0.0

/ip dns
set allow-remote-requests=yes cache-max-ttl=1w cache-size=5000KiB max-udp-packet-size=512 servers=89.216.1.40,89.216.1.50

/ip firewall mangle
add action=mark-connection chain=input in-interface=WAN1 new-connection-mark=WAN1_conn
add action=mark-connection chain=input in-interface=WAN2 new-connection-mark=WAN2_conn
add action=mark-connection chain=input in-interface=WAN3 new-connection-mark=WAN3_conn

add action=mark-routing chain=output connection-mark=WAN1_conn new-routing-mark=to_WAN1
add action=mark-routing chain=output connection-mark=WAN2_conn new-routing-mark=to_WAN2
add action=mark-routing chain=output connection-mark=WAN3_conn new-routing-mark=to_WAN3

add action=accept chain=prerouting dst-address=10.10.10.0/24 in-interface=Local
add action=accept chain=prerouting dst-address=20.20.20.0/24 in-interface=Local
add action=accept chain=prerouting dst-address=192.168.0.0/24 in-interface=Local

add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses-and-ports:3/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses-and-ports:3/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses-and-ports:3/2 action=mark-connection new-connection-mark=WAN3_conn passthrough=yes

add chain=prerouting connection-mark=WAN1_conn in-interface=Local action=mark-routing new-routing-mark=to_WAN1
add chain=prerouting connection-mark=WAN2_conn in-interface=Local action=mark-routing new-routing-mark=to_WAN2
add chain=prerouting connection-mark=WAN3_conn in-interface=Local action=mark-routing new-routing-mark=to_WAN3

/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 route
add dst-address=0.0.0.0/0 gateway=10.10.10.1 routing-mark=to_WAN1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=20.20.20.1 routing-mark=to_WAN2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.0.11 routing-mark=to_WAN3 check-gateway=ping

add dst-address=0.0.0.0/0 gateway=10.10.10.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=20.20.20.1 distance=2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.0.11 distance=3 check-gateway=ping

Any suggestions?
 
deejayq
Member Candidate
Member Candidate
Posts: 195
Joined: Wed Feb 23, 2011 8:33 am

Re: RB750 with multi WAN loadbalancing not working correctly

Wed Oct 23, 2013 2:07 pm

maybe if you disable/remove this:
add dst-address=0.0.0.0/0 gateway=10.10.10.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=20.20.20.1 distance=2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.0.11 distance=3 check-gateway=ping
 
viktorx
just joined
Topic Author
Posts: 9
Joined: Sat May 18, 2013 8:03 pm

Re: RB750 with multi WAN loadbalancing not working correctly

Wed Oct 23, 2013 11:13 pm

No, without that multi wan is working terrible...
Any other suggestion? Maybe completely different configuration?
 
deejayq
Member Candidate
Member Candidate
Posts: 195
Joined: Wed Feb 23, 2011 8:33 am

Re: RB750 with multi WAN loadbalancing not working correctly

Thu Oct 24, 2013 8:19 am

i think you're marking the connection in the wrong chain
from the wiki example the marking of connections is done in prerouting and the marking of routes (based on connection mark) is done in prerouting and output.
try to revise your firewall rules and see if it works.