Inter-SQM fairness (Multiple WANs, same SQM instance)?

I can get multiple public IPs from my ISP, so basically I can setup multiple WANs (at least from an IP point of view).
Now, it would be great if I could put all of these WAN interfaces under SQM control, but (since we are able to assign only one interface per SQM instance afaict) creating separate instances just doesn't guarantee a global overall fairness across the links (which I'd like to achieve), as they are in fact unlinked instances... also I obviously don't want to statically assign a fraction of my available badnwidth to each of them.

So, is it possible to "group" these interfaces under the same SQM instance?
How do I tune SQM in the case I have a mix of bridged and routed connections via the modem (I guess what changes are just the Link Layer Adaptation parameters... so maybe I should go with the highest packet overhead among them)?

Thanks all.

So you want to share your link's capacity equitably between the different IPs? In that case dual-dsthost on ingress without the nat keyword should solve your issue. For egress dual-srchost without nat might actually also work. But that assumes you use either piece_of_cake.qos/cake or layer_cake.qos/cake.

You need to instantiate SQM in the single WAN interface that carries all that traffic and obviously all should not live in additional tunnels (say if half of them come in vie PPPoE and others via DHCP it is not going to work out of the box).

Yes in that case you should apply the maximum of the per-packet-overhead values of the individual "connections".

1 Like


Thanks, I can try this in the next days. No problem for that, I'm using piece_of_cake/cake. But...

Mhh this seems to be the case in my current setup... Ok I will have to play a bit with it and try to assign one main interface to SQM. Perhaps I move everything to PPPoE...

Well, if all traffic shares the same WAN ethernet interface (like eth0) you might be able to get away with instantiating SQM on that ethernet interface instead of on pppoe-wan or similar. Or if you can run everything through the same PPPoE tunnel pppoe-wan is also a decent option. On a router where the WAN port is attached via a switch you might need to specify the right VLAN interface...

Ok I'm reporting some updates and tests i did:

Yes, so, I ended up with a similar setup, where SQM applies to the 'eth' device on which multiple wan interfaces/networks are configured (and the highest per-packet overhead among the involved protocols).

I tested this setup both with and without the nat keyword:

  • with nat: bandwidth is allocated equally among internal hosts (in my case I'm actually better with this configuration)
  • without nat: bandwidth is allocated equally among wans (public IPs) as @moeller0 anticipated

Does this makes sense, right?
(I just made some rough tests with a bunch of wget transfers on different hosts routing to their corresponding wans, but I believe they should be representative enough)

Anyway, this post was just the consequence of my particular network setup and not of SQM itself, as it seems to be otherwise very straightforward and working out of the box. Thanks @moeller0 for helping out.


This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.