In my Linksys EA4500 setup I have bridged one lan port with the wan port, and I want to use Cake SQM on the wan interface. This was working with 19.07 using VLAN setup. With 21.02 and DSA, bridging is done without VLANs, but the SQM does not seem to be connected with the data flow. The interfaces tab in Luci shows that just a few packets go through this interface. How can I get all the data through this interface?
20.02 setup:
config device
option name 'ethernet4'
list ports 'ethernet4'
config interface 'lan'
option device 'ethernet4'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config device
option name 'br-internet'
option type 'bridge'
list ports 'ethernet1'
list ports 'internet'
config interface 'wan'
option proto 'none'
option device 'br-internet'
really don't know that device... and am not an expert in this area... but just from a quick glance...
that (working) 19.x config looks whacky to me... why would you have the same dot1q interface (eth0.1) in both a lan and wan bridge at the same time? (actually I would not expect that to even be possible)
You are right. The 19.x setup I posted was not correct. I have reinstalled the 19.07.8 version, tested and corrected the setup. This is a working setup:
yeah that looks more sensible... not sure where you got the 'internet' port name (or 'ethernet1' maybe that is normal on that device)
should look more like
config device
option name 'br-internet'
option type 'bridge'
list ports 'lan1'
list ports 'ethx.x'
config interface 'wan'
option proto 'none' #you probably want proto here
option device 'br-internet'
Properly configured, Ethernet to Ethernet in the same VLAN will be hardware switched. The CPU doesn't see the packets. On the other hand it happens at line speed, so SQM may not be necessary.
In order to do SQM you need to have the ports in different VLANs then software bridge the two VLANs, to force packets to go through the kernel instead of the hardware switch.
Thank you. This was clarifying. I was trying to do this with VLANs, but could not figure out how to do VLANS with DSA. Any suggestions about that would very helpful.
Yes, thank you. I have read the guide, and tested the VLAN setup there. The examples are about bridge-vlan. I need to assign a single port to a VLAN and I am unsure if "config bridge-vlan" is the right way to do it.
Maybe this will do to define VLAN 1 and VLAN 2?
config device
option name 'br-internet'
option type 'bridge'
list ports 'ethernet1.1'
list ports 'internet.2'
Yes, I want to bridge two VLANs such that the CPU will forward the packets to Cake SQM.
Some background:
This device is used in a public ski arena in a rural area where internet access is via 4G broadband modems. We experience quite a bit of bufferbloat delays. The internal network have some complexity with several switches, high speed connections between buldings and several WiFi access points. This device is used internally in the network for traffic shaping. The initial setup (19.x) is based on the "bump in the wire" concept as described here: A little bump in the wire that makes your Internet faster (see BYOB (Build Your Own Bump) for the implementation).
So, I just want this bump in the wire concept to work with the 21.02 version, and my understanding is that I need to use DSA. The 19.x configuration files does not work.
I will try your suggested solution, and let you know.
config device
option name 'br-eth'
list ports 'ethernet1'
list ports 'internet'
config bridge-vlan
option device 'br-eth'
option vlan 1
list ports 'ethernet1'
config bridge-vlan
option device 'br-eth'
option vlan 2
list ports 'internet'
config interface 'wanbr'
option type 'bridge'
option proto 'none'
list device 'br-eth.1'
list device 'br-eth.2'
Behind the scenes, this should have the switch send each port independently on a VLAN to the CPU port. Then join the two CPU VLANs are joined in a software bridge. Which is also what the previous swconfig did.
Thank you. I have tried this, but unfortunately, ethernet1 port is not coming up, and no VLANs:
root@OpenWrt:~# logread -e VLAN
Tue Aug 3 20:26:30 2021 kern.info kernel: [ 1.155615] 8021q: 802.1Q VLAN Support v1.8
Tue Aug 3 20:26:30 2021 kern.info kernel: [ 4.232089] 8021q: adding VLAN 0 to HW filter on device ethernet1
Tue Aug 3 20:26:36 2021 kern.info kernel: [ 19.419942] 8021q: adding VLAN 0 to HW filter on device ethernet4
root@OpenWrt:~# ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1508 qdisc mq state UP qlen 1000
link/ether 20:aa:4b:74:a4:6a brd ff:ff:ff:ff:ff:ff
3: ethernet1@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN qlen 1000
link/ether 20:aa:4b:74:a4:6a brd ff:ff:ff:ff:ff:ff
4: ethernet2@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 20:aa:4b:74:a4:6a brd ff:ff:ff:ff:ff:ff
5: ethernet3@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 20:aa:4b:74:a4:6a brd ff:ff:ff:ff:ff:ff
6: ethernet4@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
link/ether 20:aa:4b:74:a4:6a brd ff:ff:ff:ff:ff:ff
7: internet@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 20:aa:4b:74:a4:6a brd ff:ff:ff:ff:ff:ff
8: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 20:aa:4b:74:a4:6c brd ff:ff:ff:ff:ff:ff
9: wlan1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 20:aa:4b:74:a4:6e brd ff:ff:ff:ff:ff:ff
The interface section in Luci say for WANBR, Error: Network device is not present.