Problem in PCC traffic balance

Hello all,

I’ve set up a PCC traffic balance according to the mikrotik wiki article on pcc.

I am attaching two pictures. In picture interfaces.png you can see that traffic balancing is not actually working, as one gateway has a load of 2Mbps and the other some Kbps, usually no more than 50-100.

In the second photo, routes.png, u can see the routes. Is it normall for the first route to be ONLY static and NOT active??? I even changed the distance from 2 to 1, for this route to test it, still the same.

Below is the mangle rules, in case someone needs them. Thnks for any help!
P.S. This router only does the traffic balance, nothing else,nor proxy,nor anything else. I’ve used this method in many others routers and is working great!

[admin@MikroTik] > ip firewall mangle print                                                                        Flags: X - disabled, I - invalid, D - dynamic
 0   chain=prerouting action=accept dst-address=10.64.132.0/30 in-interface=Local

 1   chain=prerouting action=accept dst-address=10.66.56.0/24 in-interface=Local

 2   chain=prerouting action=mark-connection new-connection-mark=SD_conn passthrough=yes
     in-interface=Syz-Dimarxeio-eth2 connection-mark=no-mark

 3   chain=prerouting action=mark-connection new-connection-mark=SK_conn passthrough=yes in-interface=Syz-KEP-eth3
     connection-mark=no-mark

 4   chain=prerouting action=mark-connection new-connection-mark=SD_conn passthrough=yes dst-address-type=!local
     in-interface=Local connection-mark=no-mark per-connection-classifier=both-addresses:2/0

 5   chain=prerouting action=mark-connection new-connection-mark=SK_conn passthrough=yes dst-address-type=!local
     in-interface=Local connection-mark=no-mark per-connection-classifier=both-addresses:2/1

 6   chain=prerouting action=mark-routing new-routing-mark=to_SD passthrough=yes in-interface=Local
     connection-mark=SD_conn

 7   chain=prerouting action=mark-routing new-routing-mark=to_SK passthrough=yes in-interface=Local
     connection-mark=SK_conn

 8   chain=output action=mark-routing new-routing-mark=to_SD passthrough=yes connection-mark=SD_conn

 9   chain=output action=mark-routing new-routing-mark=to_SK passthrough=yes connection-mark=SK_conn



[admin@MikroTik] > ip route print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 0 A S  0.0.0.0/0                          10.64.132.1               1
 1 A S  0.0.0.0/0                          10.66.56.1                1
 2 A S  0.0.0.0/0                          10.64.132.1               1
 3   S  0.0.0.0/0                          10.66.56.1                1
 4 A S  10.64.132.0/23                     10.64.132.6               1
 5 ADC  10.64.132.0/30     10.64.132.2     Syz-Dimarxeio-eth2        0
 6 ADC  10.64.132.4/30     10.64.132.5     Local                     0
 7 ADC  10.66.56.0/24      10.66.56.250    Syz-KEP-eth3              0

routes.PNG
interfaces.PNG

Any hint on this?

How are you testing it to see if it’s working? PCC is based on connections, not packets or bandwidth. Also you chose to use “both-addresses” that means a connection between two hosts will always use the same link. So if you are doing a bandwidth test with one computer to the same location over and over to see if it’s working, it will keep using the same link as before. Increase the pool of test devices/locations/rules to randomize it a bit more.

Thnk u for the reply!

I am attaching a link to a video to see the same again. By the time the video was produced, there were over 100 users behind the router, so at least the multiple devices and locations options, are quite high…

http://www.youtube.com/watch?v=qCZ4utwFjfI

You are right about the “both addresses” option. Strange thing is that I am trying to change this option as the router is running, through webfig(I choose “both addresses and ports”) and before I manage to press the apply button, it turns again by itself to “both addresses”! Is it normal?

Thnks again!


Edit: I’ve managed to change the both addresses rules to both addresses and ports through winbox. I really see now, a huge change in bandwidth/connections sharing! I’ll keep an eye on this and let you know!

Are you running a hotspot or proxy or anything like that? Those mess with PCC a fair amount and you need to modify the configuration to take into account the new packet flow through the router.

Also “both addresses and ports” works well, but does have problems associated with it. It can break forums and secure websites since they require all connections to come from the same IP for a session. Because that method can randomize things so much, it tends to make it a pain to access these sites because you have to keep logging back in.

No, in this specific router, nothing else is running. It’s our “border” gateway, it’s only making PCC.
Proxy is running on another RB450G, which is “behind” this router, which is keeping our intranet connected.

I’ve seen reports on “both addresses and ports” making access to secure sites a bit confusing. In fact, in my experience, I’ve never had such an issue, though…
After all, isn’t the connection marking procedure, making sure that a full TCP connection/session, even with a bank site, always goes from the same gateway?

As for the PCC matter, tomorrow, in full load, I’ll watch the behaviour and post again.

Thnks for the help!

Seems like th PCC works fine now…Thnks for the help!