Community discussions

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

Multi WAN (3+) PCC load-balance problems

Mon Jun 23, 2014 6:56 pm

Hi, I'm trying to setup my multi wan load balance with x86 system (tried with RB750 too but low bandwith). Configuration goes OK but my problem is that only 2 connections are working at the same time, or one it depends, but never more. I have 4x15MBit/s but for now I'm just testing with 3 of them. Providers on all of them are the same. Basicly WAN2 & 3 works and WAN1 doesn't. Or just WAN1 works. When i disable #3 first 2 works and when all 3 are enabled sometimes just first works, sometimes, 1 and 2 but mainly 2 and 3. And bandwith is around 30MBit/s sometimes a little more but never 45+. To make story short, heres my config so that you can sugest what am I doing wrong...
/interface ethernet
set [ find default-name=ether5 ] name=Local
set [ find default-name=ether1 ] name=WAN1
set [ find default-name=ether2 ] name=WAN2
set [ find default-name=ether3 ] name=WAN3
/ip pool
add name=dhcp_pool1 ranges=10.50.50.2-10.50.50.254
/ip dhcp-server
add address-pool=dhcp_pool1 disabled=no interface=Local lease-time=1w name=dhcp1
/ip address
add address=10.50.50.1/24 interface=Local network=10.50.50.0
add address=10.60.60.2/24 interface=WAN1 network=10.60.60.0
add address=10.70.70.2/24 interface=WAN2 network=10.70.70.0
add address=10.80.80.2/24 interface=WAN3 network=10.80.80.0
/ip dhcp-server network
add address=10.50.50.0/24 dns-server=8.8.8.8 gateway=10.50.50.1
/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 chain=prerouting dst-address=10.60.60.0/24 in-interface=Local
add chain=prerouting dst-address=10.70.70.0/24 in-interface=Local
add chain=prerouting dst-address=10.80.80.0/24 in-interface=Local
add action=mark-connection chain=prerouting dst-address-type=!local in-interface=Local new-connection-mark=WAN1_conn per-connection-classifier=both-addresses-and-ports:3/0
add action=mark-connection chain=prerouting dst-address-type=!local in-interface=Local new-connection-mark=WAN2_conn per-connection-classifier=both-addresses-and-ports:3/1
add action=mark-connection chain=prerouting dst-address-type=!local in-interface=Local new-connection-mark=WAN3_conn per-connection-classifier=both-addresses-and-ports:3/2
add action=mark-routing chain=prerouting connection-mark=WAN1_conn in-interface=Local new-routing-mark=to_WAN1
add action=mark-routing chain=prerouting connection-mark=WAN2_conn in-interface=Local new-routing-mark=to_WAN2
add action=mark-routing chain=prerouting connection-mark=WAN3_conn in-interface=Local new-routing-mark=to_WAN3
/ip firewall nat
add action=masquerade chain=srcnat out-interface=WAN1
add action=masquerade chain=srcnat out-interface=WAN2
add action=masquerade chain=srcnat out-interface=WAN3
/ip route
add check-gateway=ping distance=1 gateway=10.60.60.1 routing-mark=to_WAN1
add check-gateway=ping distance=1 gateway=10.70.70.1 routing-mark=to_WAN2
add check-gateway=ping distance=1 gateway=10.80.80.1 routing-mark=to_WAN3
add check-gateway=ping distance=1 gateway=10.60.60.1
add check-gateway=ping distance=2 gateway=10.70.70.1
add check-gateway=ping distance=3 gateway=10.80.80.1
 
latenightwaken
just joined
Posts: 2
Joined: Sat Jun 21, 2014 7:47 pm

Re: Multi WAN (3+) PCC load-balance problems

Tue Jun 24, 2014 11:33 pm

After upgrading 6.15 I face the same problem. İt changes but always one of the wan interface stops traffic and waits. I will downgrade 6.10 and try again... did you try that?
 
viktorx
just joined
Topic Author
Posts: 9
Joined: Sat May 18, 2013 8:03 pm

Re: Multi WAN (3+) PCC load-balance problems

Wed Jun 25, 2014 11:23 am

I tried this on all versions and its the same...
 
User avatar
semakka
Member Candidate
Member Candidate
Posts: 196
Joined: Mon Sep 11, 2006 10:59 am
Location: Moraira, Alicante, Spain
Contact:

Re: Multi WAN (3+) PCC load-balance problems

Wed Jun 25, 2014 1:15 pm

I tried this on all versions and its the same...
Backup your router
delete all mangle rules
import the above

let me know.... it might work!
/ip firewall mangle
add action=accept chain=prerouting disabled=no dst-address=10.60.60.0/24 in-interface=Local
add action=accept chain=prerouting disabled=no dst-address=10.70.70.0/24 in-interface=Local
add action=accept chain=prerouting disabled=no dst-address=10.80.80.0/24 in-interface=Local

add action=mark-connection chain=prerouting connection-mark=no-mark disabled=no in-interface=WAN1 new-connection-mark=WAN1_conn passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=no in-interface=WAN2 new-connection-mark=WAN2_conn passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=no in-interface=WAN3 new-connection-mark=WAN2_conn passthrough=yes

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

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

add action=mark-routing chain=output connection-mark=WAN1_conn disabled=no new-routing-mark=to_WAN1 passthrough=yes
add action=mark-routing chain=output connection-mark=WAN2_conn disabled=no new-routing-mark=to_WAN2 passthrough=yes
add action=mark-routing chain=output connection-mark=WAN2_conn disabled=no new-routing-mark=to_WAN3 passthrough=yes
cheers
 
viktorx
just joined
Topic Author
Posts: 9
Joined: Sat May 18, 2013 8:03 pm

Re: Multi WAN (3+) PCC load-balance problems

Wed Jun 25, 2014 4:24 pm

I tried this on all versions and its the same...
Backup your router
delete all mangle rules
import the above

let me know.... it might work!
/ip firewall mangle
add action=accept chain=prerouting disabled=no dst-address=10.60.60.0/24 in-interface=Local
add action=accept chain=prerouting disabled=no dst-address=10.70.70.0/24 in-interface=Local
add action=accept chain=prerouting disabled=no dst-address=10.80.80.0/24 in-interface=Local

add action=mark-connection chain=prerouting connection-mark=no-mark disabled=no in-interface=WAN1 new-connection-mark=WAN1_conn passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=no in-interface=WAN2 new-connection-mark=WAN2_conn passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark disabled=no in-interface=WAN3 new-connection-mark=WAN2_conn passthrough=yes

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

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

add action=mark-routing chain=output connection-mark=WAN1_conn disabled=no new-routing-mark=to_WAN1 passthrough=yes
add action=mark-routing chain=output connection-mark=WAN2_conn disabled=no new-routing-mark=to_WAN2 passthrough=yes
add action=mark-routing chain=output connection-mark=WAN2_conn disabled=no new-routing-mark=to_WAN3 passthrough=yes
cheers

With this config only 1 works (if all enabled first one only works...), with my config I could at least mix 2 connections but not 3 and with this theres no balancing at all, just failover...
 
User avatar
semakka
Member Candidate
Member Candidate
Posts: 196
Joined: Mon Sep 11, 2006 10:59 am
Location: Moraira, Alicante, Spain
Contact:

Re: Multi WAN (3+) PCC load-balance problems

Wed Jun 25, 2014 4:35 pm

are all your wans are operational?
do you have any route blue?