Making sure I have the right interface for SQM (wan vs pppoe-wan)

Very trivial but making sure I have this right. Both seem to work fine:

Below command says my wan is pppoe-wan

putty_2023-12-30_14-14-54

Here is the interface section

The sqm dropdown is like this:

I don't know if it should select "Tunnel Interface: "pppoe-wan" or "Ethernet Adapter: "wan". Both seem to offer similar results within margin of error (1-2ms in bufferbloat tests). I just want to know which one is factually correct if that makes sense.

Thank you

The wiki on SQM setup indicates that you should pick the Ethernet Adapter.

1 Like

Thanks you for confirming. Makes sense.

Btw make sure to add wan_6 to the correct firewall zone. And you can delete wan6. Or alternatively in wan put obtain ipv6 address on manual and configure wan6.

This is a bit nicer:

# find wan device openwrt
ifstatus wan | awk -F\" '/l3_device/ {print $4}'

Or simply:

 uci show network.wan.device

OR

uci get network.wan.device # best option in my opinion

Tbh I have no need for ipv6 (which I assume that is what wan_6 is for).

If I click edit on wan_6 I get this error:

Cannot read properties of null (reading '.name')

If I click edit on wan6 firewall settings are already applied (they were also present for my ipv4 pppoe wan).

SQM will Automatically apply to all WAN interfaces both IPv4/IPv6. You can disable IPv6 at startup boot in the interface settings, but it doesn't matter much as far as performance or cpu cycles.

It would be nice to have LUCI automatically place the proper WAN device as the default selection.

Does it? I would pick pppoe-wan in your position...

Well, the thing is, sqm is pretty versatile and depending on what people want to achieve this can or can not be the right thing to do. I really like the flexibility sqm offers...

With your above command I also get "pppoe-wan" so again I'm kind of back at not knowing if I select that (the tunnel interface) or just wan (Ethernet adapter).

I doubt it really matters at the end of the day both have given me great results.

Well unless you also use the wan ethernet interface to reach other devices than the internet (e.g. to reach the modem) these will more or less result in similar performance. But if your goal is to control internet latency then IMHO pppoe-wan is the preferable interface to operate on.

correct it is the auto generated IPv6 wan interface if you have this on automatic:

Put it to disabled if you dont need IPv6. Like I said you can also put it on manual, then adjust wan6 in this way:

Or if you want to keep it on automatic, go to firewall and edit the wan zone, and add the wan_6 there manually.

Note all of this has no impact on SQM, but it is good to have the right firewall zones defined.

Fortunately it seems like it was already applied at default:

@moeller0 Sorry I'm abit confused by your wording. Your saying if I just have the wan interface to contact a modem etc to get on the internet, I should select pppoe-wan or the opposite of that? My only goal is to help control internet latency so I will be contacting a modem/ont.

that is wan6 not wan_6

Oh yes that's the interface that gives me a Cannot read properties of null (reading '.name') error so can't really do much. :stuck_out_tongue:

wan_6 interface is created dynamically after the pppoe connection is established. (see also the description of wan_6 in LuCI: Virtual dynamic interface (DHCPv6 client)) . That's why it can't be added (or at least permanently added) to a firewall zone. As long as the interface that has Protocol: PPPoE (wan in your case) has the wan zone assgined, everythings fine.

SQM needs to be assigned to Ethernet Adapter: wan.

So a shaper on ethX will throttle all traffic across that ethernet interface, a traffic shaper on pppoe-wan will only shape traffic in the pppoe tunnel. In my case I use eth2.7 to reach the internet (via a bridged modem) and eth2.42 to reach the actual modem's GUI. I do not really want/need to traffic shape my traffic to the modems's GUI, so a shaper on eth2 would not help me, now my choice is eth2.7 or pppoe-wan (which operates on top of eth2.7). I choose pppoe-wan as that is where my internet traffic resides.

Care to explain why?

The OpenWrt docs say so and that was the only way it worked for me.
I was under the impression, that bufferbloat happens at the physical port and it's buffers, not the interfaces. Is that not correct?

Since I wrote much of that documentation, please point me where you found that as it is incorrect as a general statement.
And you have a pppoe internet access link and sqm on pppoe-wan did not work? I am not doubting your report I just want to understand what is happening as that is not expected behavior.
ALSO, sqm should work well whether on the ethernet interface or on pppoe-wan, so my point is not one is correct the other incorrect, but that both should work and one can select based on secondary considerations (and while I prefer pppoe-wan on my link, there is nothing wrong with selecting ethN per se.).

Yes and no... Linux will happily create queues for "virtual interfaces" and SQM will happily act on such a "non-hardware" queue; the general trick is to traffic shape sqm's queue so that further downstream hardware queues never fill up... that works pretty well, even for ingressing traffic.