[Solved] SQM between wan and lan on wr1043nd in dumb ap

Hi, I use openwrt in dumb ap mode (lan+wlan+wan bridged together), router is tp-link wr1043nd v2. But I'd like to prevent congestion using SQM between local ports and wan. I don't want to route to different range and I want to avoid double nat (ISP modem cannot be set to bridge and they have forwarded some ports for me). When I assign wan port to bridge, the traffic does not pass over CPU and so SQM does not work. When I remove eth1.1 from bridge, internet will (obviously) not work, so I guess it will be some magic in switch section.

How can I assign wan port to switch in a way packets will travel over CPU and SQM? On mikrotik I'd simply untick fastpath, but on openwrt I don't know how to do this.

Thank you.

root@wr1043nd:~# cat /etc/config/network
.
.
config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.2 eth1.1' #eth1.1 is wan port
.
.
config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '1 2 3 4 0t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '5 6t'

In that configuration eth0.2 leads to the blue WAN port, and eth1.1 leads to the yellow LAN ports. The 4 LAN ports are combined in the switch config thus they will be hardware switched, but everything from the WAN port does go to the CPU port 6 (eth0) and software bridge. So with the "WAN" port attached to the main router, you could simply attach SQM to eth0.2 to control speed leaving the AP to the Internet (and also any LAN devices not locally connected).

Though SQM works much better installed at the true choke point, which is the WAN interface of the main router leading to the ISP modem. This way all users of the network to Internet are subject to SQM.

3 Likes

Thanks, I hope you are right. I was pretty sure eth1.1 is the blue wan port, but it looks you are right in this, it's eth0.2, my bad. I will try it.

Oh thank you Mr. @mk24 You were right! With eth0.2 it works like a charm.

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

1 Like

Thanks for reminder, I haven't been here for a while... :flushed:

1 Like

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