What's new

Load Balance Inconsistent

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

screege

New Around Here
Hello I would like first of all thank to merlin for his great firmware,

I have an rt ac87u with 2 different ISPs both giving me 200 mbps, I enabled load balance on 1:1 configuration and putted some computers on 1 wan and other on the second wan, all of the computers with the routing rules are beign routed to the desired wan, my problem is when for example I make a speedtest on wan1 all traffic from wan2 gets slow or it gets disconnected, I have checked both ISPS and it is not an ISP issue this happends only when intensive traffic is on the first WAN.

Is there any good config for this? I have tried several balance modes like 3:1 2:1 and ultimately 1:1 with the same results, all computers have a binded IP and all of them have routing rules per ip:

192.168.0.71 all
192.168.0.10 all
192.168.0.32 all
192.168.0.123 all
192.168.0.84 all
192.168.0.11 all
192.168.0.55 all

Regards
 
If you've manually assigned some hosts to specific WAN, the ratio won't apply to these hosts at all. IMO you're already using dual WAN in a better way..

I would check the CPU load of the two cores during your speed tests. Probably they hit their limits. Hence, the other WAN slows down.
 
Hi here is a screenshot when doing 2 tests at the asme thru the different wans at 200 mbps
 

Attachments

  • cpu.PNG
    cpu.PNG
    183 KB · Views: 893
Your CPU utilisation on 87U is quite different from what I see on my AC56U.

Interestingly though core 1 caps at 50%...a coincidence of the timing of snapshot or consistently throughout the test?

Could you also describe a bit more of your two test machines..wireless connection? or wired to the router? e.g.
 
Hi all my network is wired with cat 6 and all my network is at 1 gbps, this happends in windows or mac without any difference.

I have attached my dual wan config and a snapshot of the 2 internets speed tests running at the same time



Regards
 

Attachments

  • ac87u.PNG
    ac87u.PNG
    157.4 KB · Views: 1,051
  • 2 tests.PNG
    2 tests.PNG
    186.6 KB · Views: 712
I'm not sure I understand how to set the Dual Wan. Should it be 1:1 with two lines that are the same speed?

Also how does VPN work with dual wan?

Thanks in advance. So far when I enable dual WAN I don't see traffic on the second WAN... what could I be doing wrong?
 
I'm not sure I understand how to set the Dual Wan. Should it be 1:1 with two lines that are the same speed?

No. Dual WAN does not imply that the WANs are the same. Actually, the opposite seems more likely, especially from a redundancy perspective (2 connections from ISP 1 are less reliable than 2 connections from different ISPs).

Also how does VPN work with dual wan?

Thanks in advance. So far when I enable dual WAN I don't see traffic on the second WAN... what could I be doing wrong?

Fail-over & load-balance are separate philosophies (I think). Respectively compared like "if this connection fails, choose the backup" vs "use either connection based on some some algorithm (latency, bandwidth, I dunno)".
 
No. Dual WAN does not imply that the WANs are the same. Actually, the opposite seems more likely, especially from a redundancy perspective (2 connections from ISP 1 are less reliable than 2 connections from different ISPs).
No, that's not what I meant. The default load balancing option is "3:1" which I assume means the first WAN will do three times the traffic as the second WAN? I'm assuming that's because most scenarios probably have a faster connection then a slower secondary? In my case, both are identical DSL lines so I am asking if the setting should be "1:1" to equally share the traffic across both lines?

Fail-over & load-balance are separate philosophies (I think). Respectively compared like "if this connection fails, choose the backup" vs "use either connection based on some some algorithm (latency, bandwidth, I dunno)".

I don't think there's any intelligence in the choice of connection on load balancing; it just alternates requests. I could be wrong.

In any case, mine doesn't seem to work at all.
 
In my case, both are identical DSL lines so I am asking if the setting should be "1:1" to equally share the traffic across both lines?

When you set to 1:1, stochastically the "traffic" going through the two WANs on a long enough timeline will be equal. I'm not quite sure the measurement unit is bytes or connections. I would guess it's counting the number of connections.

So if you have two WANs with same bandwidth. 1:1 is a reasonable ratio. If you have a 200 Mbit/s WAN and another 100 Mbit/s, you may try 2:1.

Effect of load balance is more apparent if you have high volume of traffic going through Internet. But it's difficult to predict which WAN you'll go next. IMO the OP assigning hosts on LAN to a specific WAN is a better use of dual WANs.
 
...
I don't think there's any intelligence in the choice of connection on load balancing; it just alternates requests. I could be wrong.

...

I am not saying you (or I) are wrong, but the logic that decides which WAN to choose in a multi-WAN situation is "intelligent". There is no perfect way to choose which WAN is optimal.

My perspective, which I think is related (but may not be), comes from a similar philosophy; fair queueing. The definition of what is "fair" is not easily or obviously defined.


tl;dr
The user must explicitly define what is "obvious", otherwise unpredictable things may happen.
 
I don't think there's any intelligence in the choice of connection on load balancing; it just alternates requests.

My perspective, which I think is related (but may not be), comes from a similar philosophy; fair queueing. The definition of what is "fair" is not easily or obviously defined.

You got me curious what actually happens to those ratios. It seems not so intelligent (Example 5.2.2) as people may expect, at least in asuswrt. For a ratio of 1:1, each alternate UDP packet is routed through the same WAN. For a ratio of 3:1, three UDP packets go to one WAN and the fourth packet goes to the other WAN. Apparently that will cause problem for TCP, so TCP goes with "flows" or connections.

Applications like BitTorrent by its mother nature can make good use of load balanced WANs. Most applications probably can't..not if running into issues. For services, perhaps better to bind to a specific interface.

One fun people could play with a VPN server in dual WAN. Assign one WAN for the VPN between router and the client and the other WAN for any other Internet traffic. Your overall throughput between the VPN client and Internet may increase by 10% or more when compared to everything going through the same WAN.
 
Load balancing is on a connection basis, not on a packet basis. A TCP (or UDP) session is a point-to-point connection, it's bound to only one specific WAN, as it cannot be bound to two different local endpoints (your two ISPs).

Torrents work great because it establishes dozens of separate connections, all of them balanced between the interfaces. Web browsing - not so much, it's typically one single connection.
 
So can have each WAN a seperstely VPN? If not, what happens? Just one connection is protected? Specifically for torrenting, where I'd want to use both connections but still have some VPN protection.
 
Effect of load balance is more apparent if you have high volume of traffic going through Internet. But it's difficult to predict which WAN you'll go next. IMO the OP assigning hosts on LAN to a specific WAN is a better use of dual WANs.
.

Seems like manual assignment sort of defeats the purpose of load balancing? Plus I tried it and it didn't seem to work. I watch the traffic monitor and never seem to get traffic in both WANS...
 
Load balancing is on a connection basis, not on a packet basis. A TCP (or UDP) session is a point-to-point connection, it's bound to only one specific WAN, as it cannot be bound to two different local endpoints (your two ISPs).

Torrents work great because it establishes dozens of separate connections, all of them balanced between the interfaces. Web browsing - not so much, it's typically one single connection.

TPC is right. I think not for UDP which is stateless. Usually need a little bit more care for applications using UDP in multi WANs. Web browsing has been parallelized with pipelines for quite some time but just not in the scale of bittorrent. But web browsing is one application that I suspect will easily run into issues from an environment of load balanced WANs :)
 
So can anyone help me with my issue of the load balance topic?

I was trying to...

You might want to check again on AC87's CPU utilisation when pulling data on both WANs. It shall be 100% or close on the first core, not 50%. CPU or rather the way CPU is used in AC87U might be the cause for your issue.

The dual support in asuswrt is not good nor well tested. E.g. as Authority mentioned above assigning hosts work for you but not him... I won't expect much on dual WAN from Asus at the moment..

EDIT:

worth disabling HW NAT and try again as last resort..
 
Last edited:
TPC is right. I think not for UDP which is stateless. Usually need a little bit more care for applications using UDP in multi WANs. Web browsing has been parallelized with pipelines for quite some time but just not in the scale of bittorrent. But web browsing is one application that I suspect will easily run into issues from an environment of load balanced WANs :)

UDP is connectionless, not stateless.

A stateful firewall can track a UDP DNS query and the resulting response, for example.
 
UDP is connectionless, not stateless.

A stateful firewall can track a UDP DNS query and the resulting response, for example.

A stateful firewall such as Netfilter/iptables in Linux is made possible for all protocol because of conntrack modules. The reason that these guys have to add a conntrack for some protocols.

Load balanced dual WANs as in asuswrt is implemented in iproute2, nothing to do with iptables or any stageful firewall..
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top