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.

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.