Setting up SQM on a Dumb AP

My problem: I have no idea how to set up the Interface and Switch settings in Luci in order to be able to use SQM on all the traffic leaving my dumb AP upstream towards my ISP router.

What I've tried so far: -As a LAN-WAN connection, SQM works as expected with it applied to the WAN interface. Easy. The problem with this is that I don't want double NAT and I also want to offload that work upstream due to my crappy router. It just works way better as a dumb AP in general even with stock TPlink firmware (for some reason it messes with my upload bandwidth). The ISP router/modem combo upstream is extremely restricted in what it can do and it can't be set to bridge mode.

-As a dumb AP, applying SQM on any of the interfaces available does nothing. From my own reading, I'm already aware my ingress and egress will be swapped, and that traffic needs to go through the router CPU somehow. For the time being I'm reading up on VLANs.

To be completely honest, I'm hoping someone can throw me a bone. I'm desperate since we're all trapped inside the house from covid and my internet is 6mbit/1mbit.

1 Like

You can run sqm on any interface, so should run sqm on eth1.1 or wlan0.

So SQM on wlan0 works fine. I tried that before, but that isn't what I wanted.

SQM on eth1.1 didn't work for my ethernet connected PC on Lan 3, but I just tested with a wireless device and it works for that.

So why is it that eth1.1 is only working for one and not the other? I want to have both the Lan 3 connected PC and Wireless clients go through SQM.

You are probably plugging your PC into the switch... the switch does all the switching, and the AP never sees the packets. Put your switch ports onto a different vlan, untagged, and bridge the two vlans using a bridge... voila all the packets will go through the AP, but it'll be slower!

Honestly I don't understand why you are using the OpenWrt as an AP here, instead of using it as a router. You NEVER want to trust your ISP's router, for security reasons.

A dumb AP has only one network, the LAN. Get rid of the wan entirely. Even in a LAN to WAN routing situation, you would never do the configuration you have where eth1.1 is attached to both lan and wan.

As @dlakelan said if you want to have SQM on Ethernet users you need to bypass the hardware switch by breaking them out to a different VLAN then software bridge them back over to your upstream port. Done properly, LAN to LAN usage like file sharing would still be switched by hardware and not subject to SQM. Or use the separate eth0 port for upstream since on the hardware you have, it is already separate in the CPU.

Thanks to you and @dlakelan for helping out first of all. I deleted the WAN interface, but I'm still trying to figure out how to do what you've both mentioned exactly. I created a VLAN 2, untagged the switch ports on VLAN2 except for the port to the upstream router, tagged the CPU on VLAN2. Same switch ports are off in VLAN 1 instead of untagged.

When I set up the bridge between VLAN 2 and 1 nothing seems to happen. I just lose connectivity on my LAN PC when I apply the settings. Sorry I'm asking the most basic things I'm in way over my head with any of this.

That sounds right on the switch configuration. You should have eth1.1 and eth1.2 in the lan bridge. Also you can add eth0 as well and use it as an additional LAN port.

Do not attach plain eth1 to anything.

1 Like

first make sure eth1.1 and eth1.2 should be both in br-lan.

The upstream router should NOT be part of VLAN2. It should be part of VLAN1 only, probably untagged unless you're already using tags. Also the CPU port should be tagged for vlan 1 and vlan 2

If the br-lan is already set up with both eth1.1 and eth1.2, then when you reconfigure the switch it shouldn't lose connectivity.

@dlakelan @mk24 I've set up the bridge between eth1.1 and 1.2 before setting the untagging etc. I don't know what protocol I need to use for the bridge nor what correct settings would look like. I just tried setting a static one as 192.168.2.13, with both dhcp disabled and enabled, and as a DHCP client. All kinds of random settings.

I still can't get a connection on the LAN PC once I flip the VLAN switch port tagging and apply.

bridging3

actually, don't create a new bridge, delete vlanbridge and just change LAN to bridge in eth1.1 and eth1.2

I deleted the vlanbridge. Setting eth1.1 and eth1.2 bridged in LAN got rid of my internet access. It only works with Eth1.1 and Wlan0. Adding eth1.2 to the Lan bridge also makes me lose connection. Unless you meant something else? I'm sorry I'm so confused even though I feel it might be something simple Im doing wrong.

Did you re-start your PC's network? It might have just been temporary during the change.

So I barred myself out of the router for a while. The eth1.1 and eth1.2 bridge was fine and I had internet access until I untagged VLAN 2 switch ports and turned off VLAN 1 switch ports. I couldn't access the router after that and didn't set up dropbear properly so I couldn't SSH. I had to TFTP it all back to the same point I was at.

If I'm understanding you about the bridging of eth1.1 and eth1.2 as opposed to what I had it to before (bridged eth1.1 + Wlan0), how am I supposed to add the Wlan into the picture? Either way I must be doing something terribly wrong or I'm still not understanding much.

wlan should also remain bridged in. you're basically just adding eth1.2 to what was already there.

The switch settings you show above:
https://forum.openwrt.org/uploads/default/original/3X/1/f/1fadfbb3b27fc80d7ad04a5fe079ea78beeee657.jpeg

are correct provided that lan4 goes to your upstream router, and LAN1,2,3 are used by your PCs and things.

Hello. Have read the discussion above several times. Trying to understand getting SQM to work on a Dumb AP. My goal is to get an A+ on Waveform bufferbloat when using computers downstream from the Dumb AP connected to wired ethernet switch ports. I have a configuration that when used on a router, gets the A+, but not on a Dumb AP. On a Dumb AP, what I'm getting with the existing router configuration is that SQM does seem to reduce latency the most when bandwidth limits are lowest in the corresponding instance of SQM setup (reversing upload and download of course); however, results vary considerably. On Dumb AP, my existing config often gets me a bufferbloat grade of "A" through Local Cable Co Internet, but I can get an "F" with a T-Mobile Home Wireless network I've also tested.

Anyhow... (Working with DSA, non-swconfig):

I have 2 vlans both defined in devices->br-lan->bridge vlan filtering:
Vlan 3 is the 'primary' vlan, which is now the "device" for LAN interface, and is untagged on ports 1 & 2.
Vlan 4 is another vlan, which has it's own interface, own DHCP subnet, and is untagged on ports 3 & 4.
LAN Interface is a "DHCP Client" of course, making the router a Dumb AP.

Both vlans seem to have full functionality in terms of receiving IPs from the expected subnets through DHCP, and have connectivity to the Internet. From here, how should I configure to get an A+ on waveform bufferbloat through SQM on Dumb AP regardelss of which network I'm on? Thank you.

Your AP need a wireless chipsets that support "TXQS|AIRTIME_FAIRNESS|AQL" :wink:

Good call. The page says: SSH into your router, run the commands below and post the results. Results for my router:

ubus call system board | grep 'model|description'

"model": "Netgear R6260", "description": "OpenWrt 23.05.3 r23809-234f1a2efa"

iw list | grep 'Wiphy|TXQS|AIRTIME_FAIRNESS|AQL'

Wiphy phy1

*[ TXQS ]: FQ-CoDel-enabled intermediate TXQs
* [ AIRTIME_FAIRNESS ]: airtime fairness scheduling
* [ AQL ]: Airtime Queue Limits (AQL)
Wiphy phy0
* [ TXQS ]: FQ-CoDel-enabled intermediate TXQs
* [ AIRTIME_FAIRNESS ]: airtime fairness scheduling
* [ AQL ]: Airtime Queue Limits (AQL)

iwinfo | grep 'Hardware:|PHY name'

      Hardware: 14C3:7603 14C3:7603 [MediaTek MT7603E]
      Supports VAPs: yes  PHY name: phy0
      Hardware: 14C3:7615 7615:14C3 [MediaTek MT7615E]
      Supports VAPs: yes  PHY name: phy1

Is this dumb AP up to the task? If so, what are next steps?

Yes, you can further tweak with "aql_txq_limit" setting.

1 Like

Would like to understand what is needed to make SQM get a consistently high waveform bufferbloat grade on any network.

As described above, I have setup vlans and gotton SQM working with devices on the untagged br-lan.2 switch ports. Issue was that br-lan.2 has it's own subnet, which I don't want to place client devices on. Want to keep client devices on LAN subnet, which is DHCP for my dumb access point.

Is using vlans for SQM necessary anymore? Another way I got SQM to work was just simply to add WAN port to br-lan, and specify the WAN port in SQM. Easy, but hasn't seemed to get the same waveform bufferbloat grade consistently on every network. Grade was better than not using SQM, but still varied considerably.

Wonder if what keeps SQM from being more consistent is just that my router has much lower CPU speed than a PC. There is an X86 version of OpenWRT. A very basic PC might have a 3.2 Ghz CPU, which is several times faster than my 800Mhz Netgear router.

Maybe getting more performance from OpenWRT is what dudez7 was getting at above.

If vlans are still needed for SQM:

...not sure I understood the directions quoted above. Could someone give a bit more specific instructions on "bridging" vlans back to upstream port, if this goes beyond what I did? Would this keep client devices used to test SQM on the LAN subnet rather than the vlan subnet for br-lan.2?

Maybe will try X86 version of OpenWRT on a PC, but not sure more CPU speed is a complete solution. Seems strange that sometimes SQM gets an A+, and later on the same network, it can get a C. Can someone explain the bigger picture?

Thank you.

Hi @dlakelan I apologize for trying to revive a 4 year old thread. But could you please help me setting this up? I can't seem to manage to use Lan 1 without the switch. I'm new into this. Basically I'm trying to accomplish what the OP wanted. I want to use a configuration to WAN-LAN without the need of the Bridge. And eventually, based on your words, make SQM work directly on the Lan interface. Could you please give me some hints on this? Kind regards

@moeller0, if you eventually have some spare time to help me out with this, I'll be grateful.