Community discussions

MikroTik App
 
resotat
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 79
Joined: Mon May 18, 2009 8:33 pm

CCR 1016 and 4 wan load balancing PCC

Sun Aug 30, 2015 9:07 pm

Hello

And Thank you in advance for your time and reply

I had been using a 493AH with the load balancing code and it worked great.

here is the code

/ip address
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local
add address=192.168.1.2/24 network=192.168.1.0 broadcast=192.168.1.255 interface=WAN1
add address=192.168.2.2/24 network=192.168.2.0 broadcast=192.168.2.255 interface=WAN2
add address=192.168.3.2/24 network=192.168.3.0 broadcast=192.168.3.255 interface=WAN3
add address=192.168.4.2/24 network=192.168.4.0 broadcast=192.168.4.255 interface=WAN4

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

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

add chain=prerouting dst-address=192.168.1.0/24 action=accept in-interface=Local
add chain=prerouting dst-address=192.168.2.0/24 action=accept in-interface=Local
add chain=prerouting dst-address=192.168.3.0/24 action=accept in-interface=Local
add chain=prerouting dst-address=192.168.4.0/24 action=accept in-interface=Local

add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses-and-ports:4/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:4/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:4/2 action=mark-connection new-connection-mark=WAN3_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses-and-ports:4/3 action=mark-connection new-connection-mark=WAN4_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
add chain=prerouting connection-mark=WAN4_conn in-interface=Local action=mark-routing new-routing-mark=to_WAN4

/ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_WAN1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_WAN2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.3.1 routing-mark=to_WAN3 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.4.1 routing-mark=to_WAN4 check-gateway=ping

add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 distance=2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.3.1 distance=3 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.4.1 distance=4 check-gateway=ping

/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
add chain=srcnat out-interface=WAN4 action=masquerade


So all works great on the 493AH

HOWEVER on the CCR1016 it does not work. What happens is the upload goes all wacky

My WAN ports have 6 Mbps upload (Tx) but the Cloud Core starts showing numbers way beyond 6 Mbps it shows like 9 an 10 Mbps on various of the 4 WANS

In addition in the "Interface" window the "Local" port will show only 2 Mbps Tx and so will the Bridge BUT
WAN 1 is showing 5 Mbps Tx
WAN2 is showing 6 Mbps Tx
WAN3 is showing 9 Mbps Tx
WAN4 is showing 7 Mbps Tx

So the numbers do not add up and of course it makes the whole Network run like crap

Now when I programmed the CCR1016 everywhere where the code had "Local" as the Interface it made me change it to Bridge. Saying I could not use Local as it was a slave to the bridge.

Anyone have ANY Ideas as to is going on???

Can this router not run this code????

Is the CCR 1016 broken maybe hardware issue????

Oh one last point the 493Ah is running OS 5.12
The CCR1016 is Running 6.31
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1770
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Re: CCR 1016 and 4 wan load balancing PCC

Mon Aug 31, 2015 1:04 pm

I suggest to remake setup using original mirkotik PCC wiki example:
http://wiki.mikrotik.com/wiki/Manual:PC ... _Balancing
 
resotat
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 79
Joined: Mon May 18, 2009 8:33 pm

Re: CCR 1016 and 4 wan load balancing PCC

Wed Sep 02, 2015 5:41 pm

Hello

Thanks for the suggestion

However it did not work I am having the exact same issue...the balancing does not work and some how the TX of each WAN starts showing erroneous numbers far in excess of what the connection is capable of. What is really interesting is if you add up each TX of the four WAN ports you get like say 27Mbps but the RX of the Bridge and Local Port only show say 2.8Mbps. The Bridge and Local ports are very close and accurate, not sure why I get these other numbers on each WAN Port.

And I noticed another issue the WAN ports keep dropping The modems do not drop, only on the CCR1016 they go unreachable then they come back then drop then come back. This does not happen when they are connected to the 493AH.

I programmed this unit with exports from the 493AH of the IP's the NAT and the Mangle. I will now reset to factory and manually program the unit. I have had issues in the past importing settings even from one 493AH to another.

I have asked in hardware forum what the earliest OS version I can run on the CCR1016 but I have not had an answer from Mikrotik.

If anyone else has any Ideas I would love to hear them?
 
digitalxtc
just joined
Posts: 1
Joined: Sun Jul 24, 2016 8:18 pm

Re: CCR 1016 and 4 wan load balancing PCC

Sun Jul 24, 2016 8:22 pm

restotat,

This is an old thread, but bumping this up because I am going through the same challenge of setting up a 4 wan PCC load balancing on the cloud routers. If you got this right, would you be willing to share the script for the rest of us?

Thanks
 
fcforensic
just joined
Posts: 5
Joined: Wed Apr 12, 2017 6:47 pm

Re: CCR 1016 and 4 wan load balancing PCC

Mon May 01, 2017 1:17 pm

It happens the same thing to me, does anyone have a suggestion for the CCR1016 in the Loada balance PCC configuration?
 
MATU
just joined
Posts: 13
Joined: Thu Apr 03, 2014 11:01 am

Re: CCR 1016 and 4 wan load balancing PCC

Sat May 06, 2017 2:15 am

Also waiting for an answer
 
gxmc
just joined
Posts: 20
Joined: Sat Jan 02, 2010 1:53 pm

Re: CCR 1016 and 4 wan load balancing PCC

Sat Jul 08, 2017 5:56 pm

Im looking for adaptation in order to do this very same load balance with only 2 interfaces for the WANS. I have 2 WANS behind a PTP and another 2 WANS behind another PTP. The thing is; I have done that in the past but i cant remember how I did all the markings by IP instead of by interface.
 
resotat
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 79
Joined: Mon May 18, 2009 8:33 pm

Re: CCR 1016 and 4 wan load balancing PCC

Mon Nov 26, 2018 10:22 pm

Hi
So the problem turned out to be DNS requests on the WAN lines overloading the upload capability of the WAN Port. Solution was a firewall rule to block outside DNS requests