Load balancing and failover

I have 2 ISP that is WAN 1 and WAN2 I. I want to do load balancing and failover. Then I want all traffic from LAN to go through WAN 1 only. Any idea how to achieve this please. Thanks

Your statements are confusing if not conflicting.

Load Balance - what kind of LB are you looking for or better, what functionality do you wish to achieve?
1/2 and 1/2 1:5 to 1, WAN1 up to 80Megs down and then switch to WAN2??

Just saying Load Balancing is not enough information, how would you like to share or dispense the available bandwidth is the question you need to answer.

In terms of fail over,
If WAN2 fails, shift all users/traffic to WAN1
If WAN1 fails … ???

This is what I mean.
I have 2 ISP’s. ISP1 give me 5Mbps and ISP2 give me 10Mbps.

what I want to achieve is

  1. I want my total bandwidth to be 5+10=15Mbps.
  2. When someone check my public IP, ISP1 IP should always be the result. I don’t want ISP2 IP to be seen
    Lastly is it possible to limit the bandwidth coming from ISP1 from 5Mbps to 1kbps?

This is possible by using a PCC (per-connection-classifier), you’ll use three rules, one marking the connections to use ISP1 and the other two marking the connections to use ISP2. Of course the1:2 distribution will be seen in average on a high number of connections, as each individual connection may have different bandwidth requirements.


Unless you had an agreement with both ISP1 and ISP2 on use of dynamic routing protocols, this is not possible. If the usual customer setup is used, the packets leaving via ISP2 will have source address of ISP2.


This can be done only indirectly and only for TCP connections (by limiting the WAN->LAN bandwidth). UDP connections don’t care about acknowledgements (unless the application protocol using UDP does, like in case of QUIC), so the packets will be coming as fast as the source will send them.

Thanks for the clarification.
Also, the reasons for the setup are not clear and thus hard to gauge making any solutions…

Why do you not want ISP2 public iP address not to be seen.
This is not a usual request so what is the reason?

Understand you want the total throughput available to all users.
As noted that is doable.

We need clarification is your bandwidth symmetrical??
ISP 1 is 10down and 10 up?and ISP2 is 5 down and 5 up?

Which means basically a 2:1 ratio.
Sindy where I argue with PCC is the lack of control over packet sharing. Its one to one.
That makes no sense to me because it should be more like for every two sessions with the higher throughput ISP, send one session through the lower throughput ISP.
Explain to me where PCC beats Nth in this regard?

Finally, I do not understand the requirement to limit the outgoing throughput from the router on ISP1 from 5 to 1?
Is it the router you wish to limit or some users and why? If its the router, you are in direct conflict with your wish to share equally the available throughput.

Without clear requirements, we are just guessing.

I’m not sure whether it beats it.

The per-connection-classifier uses various combination of source and destination addresses and ports which are the same for all packets of the same direction of any particular session, so you can use it directly for route-marking and maybe there are application scenarios where a particular choice of the hash components can optimize the distribution of particular traffic patterns.

The nth has to be used only with initial packets of the connections and in conjunction with connection marking if we talk about its use for traffic distribution in setups using policy routing (i.e. you cannot use nth to assign a routing-mark directly), and does not take into account anything but the order of these initial packets.

Regardless whether you use nth or per-connection-classifier, the distribution ratio of connections between the WANs depends on how many rules you use (e.g. a 3:7 ratio requires 10 rules with either nth or per-connection-classifier); the distribution ratio of traffic volume follows the distribution ratio of connections only in average.