Community discussions

 
ottoemmezza
just joined
Topic Author
Posts: 5
Joined: Thu Nov 15, 2018 6:39 pm

PCC Load Balancing 2 WAN on Mikrotik HEX

Fri Nov 16, 2018 3:47 pm

i'm trying to do PCC Load Balancing 2 WAN on Mikrotik HEX (RB750Gr3)
also enabling fastrack i got limited to 100Mbit on routing even if i have a 100Mbit + 50 Mbit
WAN than individually have more bandwith.
All the network is 1Gbps, the traffic it's spread correctly with the rule both addresses and ports

Could be the router model the limitation?
 
anav
Forum Guru
Forum Guru
Posts: 1139
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada

Re: PCC Load Balancing 2 WAN on Mikrotik HEX

Fri Nov 16, 2018 4:13 pm

Load balancing doesnt mean one single connection will get you 150 throughput. The max a single session will transfer is 100 if the session is directing the traffic to your higher throughput ISP.

Did you do simultaneous speed tests (that were going thru both ISPs at the same time - independently). How did you test overall throughput?
 
ottoemmezza
just joined
Topic Author
Posts: 5
Joined: Thu Nov 15, 2018 6:39 pm

Re: PCC Load Balancing 2 WAN on Mikrotik HEX

Fri Nov 16, 2018 5:15 pm

I'm using multiple connections using torrent protocol downloading ubuntu ISO really,
and using other type of connection at the same time. I have also checked for bandwith limits
on torrent application and tried on multiple torrents.
Last edited by ottoemmezza on Fri Nov 16, 2018 5:22 pm, edited 1 time in total.
 
m4t7e0
Frequent Visitor
Frequent Visitor
Posts: 58
Joined: Tue Jun 09, 2015 12:17 am

Re: PCC Load Balancing 2 WAN on Mikrotik HEX

Fri Nov 16, 2018 5:17 pm

Ciao Ottoemezza!
can i take a lootk to your PCC Mangle Configuration?
Your mangle rules is getting traffics in stats?
 
ottoemmezza
just joined
Topic Author
Posts: 5
Joined: Thu Nov 15, 2018 6:39 pm

Re: PCC Load Balancing 2 WAN on Mikrotik HEX

Fri Nov 16, 2018 6:08 pm

Yes the traffic spreads in the correct way i get stats on all the mangle roules (system load is about 20% with PCC)
- diabling the WAN1 Interface i get the full 100 Mbit from WAN2
- disabling the WAN2 Interface i get 50 Mbit From WAN1

WAN1 Bandwith 50Mbit
WAN2 Bandwith 100Mbit
/ip firewall mangle
add action=mark-connection chain=input comment=PCC in-interface=pppoe-out1 \
    new-connection-mark=WAN1_conn passthrough=no
add action=mark-connection chain=input in-interface=eth5 new-connection-mark=\
    WAN2_conn passthrough=no src-address-list=!local
add action=mark-routing chain=output connection-mark=WAN1_conn \
    new-routing-mark=to_WAN1 passthrough=no
add action=mark-routing chain=output connection-mark=WAN2_conn \
    new-routing-mark=to_WAN2 passthrough=no
add action=mark-connection chain=prerouting dst-address-list=!local \
    dst-address-type=!local in-interface=bridge1 new-connection-mark=\
    WAN1_conn passthrough=yes per-connection-classifier=\
    both-addresses-and-ports:3/0
add action=mark-connection chain=prerouting dst-address-list=!local \
    dst-address-type=!local in-interface=bridge1 new-connection-mark=\
    WAN2_conn passthrough=yes per-connection-classifier=\
    both-addresses-and-ports:3/1
add action=mark-connection chain=prerouting dst-address-list=!local \
    dst-address-type=!local in-interface=bridge1 new-connection-mark=\
    WAN2_conn passthrough=yes per-connection-classifier=\
    both-addresses-and-ports:3/2
add action=mark-routing chain=prerouting connection-mark=WAN1_conn \
    dst-address-list=!local in-interface=bridge1 new-routing-mark=to_WAN1 \
    passthrough=no
add action=mark-routing chain=prerouting comment="PCC Last" connection-mark=\
    WAN2_conn dst-address-list=!local in-interface=bridge1 new-routing-mark=\
    to_WAN2 passthrough=yes
 
ottoemmezza
just joined
Topic Author
Posts: 5
Joined: Thu Nov 15, 2018 6:39 pm

Re: PCC Load Balancing 2 WAN on Mikrotik HEX

Fri Nov 16, 2018 10:42 pm

i have solved the problem, was an interface on the router that have problems to negotiate at 1Gbit
changing interface it's working now. it's probably an hardware problem.

Anyone knows wich will be the bandwith limit on PCC with this router?
(because im going to have 2 WAN with 50Mbit + 200MBit of bandwith to load balance)
 
huntah
Member Candidate
Member Candidate
Posts: 259
Joined: Tue Sep 09, 2008 3:24 pm

Re: PCC Load Balancing 2 WAN on Mikrotik HEX

Sat Nov 17, 2018 10:48 am

Does your PCC work with fasttrack enabled ?!
I could not make that work....also in wiki it is mentioned in a note....
 
sebastia
Long time Member
Long time Member
Posts: 684
Joined: Tue Oct 12, 2010 3:23 am

Re: PCC Load Balancing 2 WAN on Mikrotik HEX

Sun Nov 18, 2018 7:44 pm

PCC works with mangling https://wiki.mikrotik.com/wiki/Manual:PCC, and by enabling fasttrack you are BYPASSING mangling.
 
m4t7e0
Frequent Visitor
Frequent Visitor
Posts: 58
Joined: Tue Jun 09, 2015 12:17 am

Re: PCC Load Balancing 2 WAN on Mikrotik HEX

Tue Nov 20, 2018 6:19 pm

Hi ottoemezzo,
i suggest you to edit this parameter per-connection-classifier= both-addresses-and-ports with something different, using this paramenter can generate some problem with some site (like banks) that checks the pubblic ip of requests.
 
User avatar
iperezandres
newbie
Posts: 30
Joined: Mon Feb 13, 2017 1:17 pm
Location: Madrid
Contact:

Re: PCC Load Balancing 2 WAN on Mikrotik HEX

Wed Nov 21, 2018 4:23 pm

Following this thread, I have a script for 2 WANs, very similar to the one posted earlier here, using PCC. If each WAN can reach around 80Mbps individually, I was expecting to get an aggregated sum of 160Mbps, but when I try to aggregate them, I get a total of 60Mbps: 30Mbps in each one.

- Each WAN connection goes to a 4G router.
- Every port has correctly negotiated to 1Gbps full duplex.
- PCC is working correctly and balance the traffic as it should.

Is there anything that I am missing? Is there anything possibly limiting the BW?

This is the reduce version of my script: the mangle, routing and queues sections:
/ip firewall mangle
add action=mark-connection chain=prerouting connection-state=new in-interface=bridge new-connection-mark=conn1 passthrough=yes per-connection-classifier=both-addresses-and-ports:4/0  comment="LAN->WAN PCC"
add action=mark-connection chain=prerouting connection-state=new in-interface=bridge new-connection-mark=conn2 passthrough=yes per-connection-classifier=both-addresses-and-ports:4/1
add action=mark-connection chain=prerouting connection-state=new in-interface=bridge new-connection-mark=conn1 passthrough=yes per-connection-classifier=both-addresses-and-ports:4/2
add action=mark-connection chain=prerouting connection-state=new in-interface=bridge new-connection-mark=conn2 passthrough=yes per-connection-classifier=both-addresses-and-ports:4/3
add action=mark-routing chain=prerouting connection-mark=conn1 in-interface=bridge new-routing-mark=route1 passthrough=no comment="LAN->WAN route"
add action=mark-routing chain=prerouting connection-mark=conn2 in-interface=bridge new-routing-mark=route2 passthrough=no

/ip route
add dst-address=0.0.0.0/0 gateway=wan1IPgateway distance=1 check-gateway=ping routing-mark=route1 comment="balanced routes"
add dst-address=0.0.0.0/0 gateway=wan2IPgateway distance=1 check-gateway=ping routing-mark=route2
add dst-address=0.0.0.0/0 gateway=wan2IPgateway distance=2 check-gateway=ping routing-mark=route1 comment="fail-over balanced routes"
add dst-address=0.0.0.0/0 gateway=wan1IPgateway distance=2 check-gateway=ping routing-mark=route2

/ip firewall address-list
add address=[/ip address get [find comment~"LAN"] address] list=LAN
add address=[/ip address get [find comment~"LAN"] address] list=Connected
add address=[/ip address get [find comment~"wan1"] address] list=Connected
add address=[/ip address get [find comment~"wan2"] address] list=Connected
add address=255.255.255.255 list=LAN
Thanks.
Last edited by iperezandres on Wed Nov 21, 2018 8:14 pm, edited 1 time in total.
 
sebastia
Long time Member
Long time Member
Posts: 684
Joined: Tue Oct 12, 2010 3:23 am

Re: PCC Load Balancing 2 WAN on Mikrotik HEX

Wed Nov 21, 2018 5:07 pm

Current distribution is 3:1 for conn1 <> conn2, but the routes have same bandwidth. Error?
4G is not exactly stable, it can change from one second to another. I would suggest to test single against balanced on a quiet moment, night maybe?
 
User avatar
iperezandres
newbie
Posts: 30
Joined: Mon Feb 13, 2017 1:17 pm
Location: Madrid
Contact:

Re: PCC Load Balancing 2 WAN on Mikrotik HEX

Wed Nov 21, 2018 8:11 pm

I've donde that already. Both wans reach independently 60-80Mbps, but once they work together only add up to 60-70Mbps. All the test were done at night with the network more or less free, at least not congested.
Last edited by iperezandres on Wed Nov 21, 2018 8:15 pm, edited 1 time in total.
 
User avatar
iperezandres
newbie
Posts: 30
Joined: Mon Feb 13, 2017 1:17 pm
Location: Madrid
Contact:

Re: PCC Load Balancing 2 WAN on Mikrotik HEX

Wed Nov 21, 2018 8:12 pm

And yes, you were right and there was an error in the pcc lines, it should be 1:1 balancing. Let me edit the post and correct it for future references.
 
sebastia
Long time Member
Long time Member
Posts: 684
Joined: Tue Oct 12, 2010 3:23 am

Re: PCC Load Balancing 2 WAN on Mikrotik HEX

Wed Nov 21, 2018 9:05 pm

since with pcc you need to mangle all packets, FastTrack is out. what kind of cpu usage do you see under load?
 
User avatar
iperezandres
newbie
Posts: 30
Joined: Mon Feb 13, 2017 1:17 pm
Location: Madrid
Contact:

Re: PCC Load Balancing 2 WAN on Mikrotik HEX

Wed Nov 21, 2018 11:04 pm

With the hAP ac^2, 180 DHCP users and 4000 connections, the CPU is at always below 30%.

Now, I have just got today the brand new RB4011. Using the same script, I have the same issue when the 2 WANs are 4G routers.

But if I try it at home, using my 100M symmetric fiber as the first WAN, and one of the 4G routers as the second WAN, it works! Here the coverage is not so good, so I get 30Mbps from the 4G and 100Mbps from the fiber, to obtain a total of 130Mbps. With this configuration, I barely see 1% of CPU usage.

Even though it crossed my mind, I discarded hardware issues from the beginning, due to the low CPU values I was getting. I have always thought that my problems had to do with my script, but seeing that it works at home, I am starting to blame the 4G routers.

But why? Maybe interferences between them? One 4G router works just fine on its own, I only experience problems when the two of them are tx/rx at the same time. This does not make sense to me...

Happy to share the whole script if anyone asks.
 
WeWiNet
Frequent Visitor
Frequent Visitor
Posts: 78
Joined: Thu Sep 27, 2018 4:11 pm

Re: PCC Load Balancing 2 WAN on Mikrotik HEX

Thu Nov 22, 2018 7:22 pm

Are you using 2 x LTE connections with same telco (same network and frequency)?.

If they go both to the same base station, then when you access in parallel, the base station might
give to your segment only a total of 60Mbps due to frequency or load limitations.

Have you tried to run dual LTE on two different routers at same time to ensure that you can actually get
twice as throughput in the frequency band/base station you are connected to?
WeWiNet

**
MTCNA
hapac2, map, hap-lite
 
User avatar
iperezandres
newbie
Posts: 30
Joined: Mon Feb 13, 2017 1:17 pm
Location: Madrid
Contact:

Re: PCC Load Balancing 2 WAN on Mikrotik HEX

Wed Dec 05, 2018 10:05 am

Solved it! Thank you WeWiNet, you gave the clue.
The problem has to do with the different types of SIM cards used, meaning the different contracts that you can have with the Operator.
We are using for this project SIMs of M2M data contracts and regular data contracts. The problem arises when we use 2 x M2M SIMs at the same time. If we use 2 regular SIMs, or 1 x M2M and 1 x regular, everything is OK, but with 2 x M2M, somehow the speed gets limited to 25 Mbps each, even though each SIM should reach 70 Mbps.
I don't know the reason, but every combination we have tried, discards issues related to the MK, the script, the LTE device, interferences, etc. and everything points to the type of SIMs being used.

Who is online

Users browsing this forum: JohnTRIVOLTA, Majestic-12 [Bot] and 14 guests