Community discussions

MikroTik App
 
jhaycutexp
just joined
Topic Author
Posts: 4
Joined: Wed Dec 21, 2016 4:39 am

Help Boss! Dual WAN loadbalancing. Is the config wrong? or my RB settings are off.

Thu Apr 25, 2019 4:22 pm

Good day sir

I am trying to relearn MT and I am trying this loadbalancing from a tutorial..

https://aacable.wordpress.com/2011/07/2 ... t-by-zaib/

Basically its the same as the PCC in the wiki mikrotik..

Well my question sir is, I followed everything what is in the mangle.. I just used whatever router variables I have and then replaced them
on the code..

The thing sir is this code working?

Image
https://drive.google.com/file/d/1E0WwE5 ... sp=sharing

as I was testing the configuration.. the part highlighted doesnt have any activity.. or packets or bytes going through that
part of the mangle..

Also I noticed that when I speedtest or test download a file to see if it loadbalance or what.. I only see one interface carrying all of the
load.. cause its the only one raising the numbers.. and the other interface remains dormant.. it spikes sometimes.. only in kb and after several tries and multiple
download.. the other interface finally gets an activity.. the highest I saw was 5Mb.. but only for only a few seconds..

When its supposed to like share the load on both interface right sir??

Can anyone guide me sirs?? im totally noob with these.. I already read the manual and followed the case study.. but I just dont
seem to get it.. any hint sirs??

Heres the current config I have..
/interface ethernet
set [ find default-name=ether1 ] comment=CONVERGE
set [ find default-name=ether2 ] comment=SKY
set [ find default-name=ether3 ] comment="ISP Reserve" disabled=yes
set [ find default-name=ether4 ] comment="LAN RESERVE" master-port=ether5


/interface bridge port
add bridge=bridge-LAN interface=ether5
/ip address
add address=192.168.3.1/24 comment="LAN bridge" interface=bridge-LAN network=\
    192.168.3.0

/ip dhcp-client
add comment=Internet dhcp-options=hostname,clientid disabled=no interface=\
    ether1
add add-default-route=no dhcp-options=hostname,clientid disabled=no \
    interface=ether2 use-peer-dns=no use-peer-ntp=no
/ip dhcp-server network
add address=192.168.3.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=192.168.3.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4
/ip dns static
add address=192.168.88.1 name=router.lan


/ip firewall mangle
add action=mark-connection chain=input comment="PCC LOAD BALANCE SETTINGS" \
    in-interface=ether1 new-connection-mark=WAN1_conn passthrough=yes
add action=mark-connection chain=input in-interface=ether2 \
    new-connection-mark=WAN2_conn passthrough=yes
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 chain=prerouting dst-address=192.168.1.0/24 in-interface=bridge-LAN
add chain=prerouting dst-address=192.168.2.0/24 in-interface=bridge-LAN
add action=mark-connection chain=prerouting comment="PCC Marking" \
    dst-address-type=!local in-interface=bridge-LAN new-connection-mark=\
    WAN1_conn passthrough=yes per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=prerouting dst-address-type=!local \
    in-interface=bridge-LAN new-connection-mark=WAN2_conn passthrough=yes \
    per-connection-classifier=both-addresses:2/1
add action=mark-routing chain=prerouting comment="routing mark to isp1" \
    connection-mark=WAN1_conn in-interface=bridge-LAN new-routing-mark=\
    to_WAN1 passthrough=no
add action=mark-routing chain=prerouting comment="routing mark to isp2" \
    connection-mark=WAN2_conn in-interface=bridge-LAN new-routing-mark=\
    to_WAN2 passthrough=no
/ip firewall nat
add action=masquerade chain=srcnat comment=ISP1 out-interface=ether1 \
    src-address-list=local
add action=masquerade chain=srcnat comment=ISP2 out-interface=ether2 \
    src-address-list=local
/ip route
add check-gateway=ping comment=SKY distance=1 gateway=192.168.2.1
add check-gateway=ping comment=Converge distance=1 gateway=192.168.1.1
 
WeWiNet
Long time Member
Long time Member
Posts: 621
Joined: Thu Sep 27, 2018 4:11 pm

Re: Help Boss! Dual WAN loadbalancing. Is the config wrong? or my RB settings are off.

Thu Apr 25, 2019 7:39 pm

Make sure you:
- disabled firewall fast path (mangle else does not work)
- you set RP filter mode to loose
- check that DHCP client on ETH1 has "default route" unchecked.

Even with PCC/both-address mode you will see traffic mainly one one I/F if there is only one client.
The load blancing works best and better the more devices are in the network as only then traffic becomes spread equally over the
two connections.
 
jhaycutexp
just joined
Topic Author
Posts: 4
Joined: Wed Dec 21, 2016 4:39 am

Re: Help Boss! Dual WAN loadbalancing. Is the config wrong? or my RB settings are off.

Thu Apr 25, 2019 8:27 pm

Make sure you:
- disabled firewall fast path (mangle else does not work)
- you set RP filter mode to loose
- check that DHCP client on ETH1 has "default route" unchecked.

Even with PCC/both-address mode you will see traffic mainly one one I/F if there is only one client.
The load blancing works best and better the more devices are in the network as only then traffic becomes spread equally over the
two connections.
Boss, I did all of the check list you made..

1) the default firewall rules were disabled even before.. so I dont see it as the case..
2) I have set the RP filter mode to loose by default it was a "NO" cause I didnt touch it.. so tested.. and still no go..
3) I have checked both of the dhcp client sir and initially there were no default routes.. because I have disabled them when
I was creating the dhcp client before..

4) the pcc doesnt really work sir... I dont know what is going on hehehe. :) in the videos I watch.. their config made.. and when they
try to test the config.. the PCC loadbalancing works.. splitting the load between the ISPs even if its just a simple download

what am I doing wrong? thanks for the help sir.. I will try to figure out more.. since I lack the basic foundation.. still getting lost.. when to use
destination and source address..

or even composing the right logic to create a mangle with interfaces.. that is why I am testing first the case study so I can better understand
how to create a logical mangle and ofcourse the one that works..
 
Almohalla
just joined
Posts: 10
Joined: Fri Jan 15, 2016 7:31 pm

Re: Help Boss! Dual WAN loadbalancing. Is the config wrong? or my RB settings are off.

Tue Apr 30, 2019 3:53 pm

Change the classifier to both-addresses-and-ports for both WANs
 per-connection-classifier=both-addresses-and-ports:2/0
 per-connection-classifier=both-addresses-and-ports:2/1