Upgraded today to RouterOS v5.21 and with this upgrade I wanted to finally move to PCC load balacing, because as many said ECMP is outdated.
I followed the example from wiki but the routes aren’t working properly don’t know what I’m doing wrong if you could help me I would really appreciate.
My config:
[admin@MikroTik] > ip address print detail
Flags: X - disabled, I - invalid, D - dynamic
0 address=192.168.0.1/24 network=192.168.0.0 interface=LAN1 actual-interface=LAN1
1 address=77.XX.X49.142/30 network=77.XX.X49.140 interface=Orange actual-interface=Orange
2 D address=18X.XXX.77.105/24 network=18X.XXX.77.0 interface=MTC actual-interface=MTC
[admin@MikroTik] >
I’ve changed the passthrough value yes to no where you told me, but as you can see in the print screen one route is “blue”, why is that ? Some websites would open some wouldn’t!
And another question is, I don’t know what I should I put in mangle dst-address the gateway IP, network IP or static IP ?
The blue route is normal. It is a backup route if the the other one fails, it has distance=2 which means that if the route with distance=1 will not work, this one would take the job, and the color will change as well to normal.
The fact that some pages do open and some others don’t, may indicate that you have a problem with DNS. In PCC configuration it is better to use public DNS rather than those of ISP (unless all internet lines come from the same ISP). You should also redirect users dns requests, so they don’t end up using the wrong dns server.
/ip dns> set servers=8.8.8.8,8.4.4.4 allow-remote-requests=yes
I putted there the google dns servers, but you can use whatever you like from public dns servers
In the rule above what IP’s should I use ? Static IP or the Gateway IP ?
What’s up with the NAT rule you gave me ? port 53 ?
And yes I already use google DNS
I don’t want the second route to be the backup route, I want both of them to work at the same time! And if one of them fails then the good one should work alone.
According to the wiki page, they should be the IP addresses of the WAN interfaces. But I believe there should be the LAN network, so as to create no loop in the routing table. But I am not sure about it.
The Nat rule with udp port 53, is to redirect dns requests from users. No matter what DNS they put in their PC, they will be redirected to the dns cache of router. This way you are sure you are delivering them the right dns answers.
Ok, look carefully at your routing table. The routes which load balance your traffic are already in place and active
[admin@MikroTik] > ip route print detail
0 A S dst-address=0.0.0.0/0 gateway=77.XX.X49.141 gateway-status=77.XX.X49.141 reachable via Orange check-gateway=ping distance=1 scope=30 target-scope=10 routing-mark=Orange
1 A S dst-address=0.0.0.0/0 gateway=18X.XXX.77.1 gateway-status=18X.XXX.77.1 reachable via MTC check-gateway=ping distance=2 scope=30 target-scope=10 routing-mark=MTC
The other two routes serve to the router itself, so it can reach the internet as well
2 A S dst-address=0.0.0.0/0 gateway=77.XX.X49.141 gateway-status=77.XX.X49.141 reachable via Orange check-gateway=ping distance=1 scope=30 target-scope=10
3 S dst-address=0.0.0.0/0 gateway=18X.XXX.77.1 gateway-status=18X.XXX.77.1 reachable via MTC check-gateway=ping distance=2 scope=30 target-scope=10
The connections of the router itself don’t need to be load balanced, but if you want them to, you can use ecmp there, like:
2 A S dst-address=0.0.0.0/0 gateway=77.XX.X49.141, 18X.XXX.77.1 distance=1 scope=30 target-scope=10
Your masquerade rules look fine, but why are they so down the order? Number 25 and 26. Usually they are on top.
So far your config looks good, so everything should work fine. Are you still having problems? Can you see the distribution of the packets in the interface table? The distribution should not be as obvious at first glance, but more over a period of time.
Tried many things but still couldn’t move from ECMP to PCC load balancing, because when using PCC websites won’t load and I thing I just found what the problem could, the problem is when Webproxy is enabled (transparent mode).
My question is, how to configure PCC so it would work fine with webproxy enabled ?