I noticed something weird about the integrated switch on the RT-AC65P router.
The bridging is set up as follows:
root@OpenWrt:~# brctl show
bridge name bridge id STP enabled interfaces
br-lan 7fff.04922646bb54 no wlan0
switch.1
wlan1
switch 7fff.04922646bb54 no lan4
lan2
lan3
lan1
network config excerpt:
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config device
option type 'bridge'
option name 'switch'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
config bridge-vlan
option device 'switch'
option vlan '1'
list ports 'lan1:u*'
list ports 'lan2:u*'
list ports 'lan3:u*'
list ports 'lan4:u*'
config device
option name 'br-lan'
option type 'bridge'
list ports 'switch.1'
As far as I'm aware, this is how it's supposed to be set up if I were to use multiple vlans with multiple ssid-s. In this test setup, I only have one for simplicity.
I have a PC connected to lan1 and another one to lan2. I also have a phone connected to the wifi and a router connected to wan for internet access.
If I send any traffic (be it ping or whatever) directly from one PC to the phone, the integrated switch sends out the ethernet frames to the other PC and presumably it would send it out on all other ports. Traffic from PC to the internet (so if the ethernet frame destination MAC is the RT-AC65P itself) is handled as expected.
This doesn't seem to happen with the default configuration where the lan ports and the wifi interfaces are directly bridged to br-lan.
I tested it with the latest RC of 24.10.0, 23.05.5, 22.03.7 and 21.02.7. There doesn't seem to be a difference between 24.10.0 RC7 and 23.05.5. Interestingly, it happens rarely on 22.03.7 and doesn't seem to happen at all on 21.02.7.
Am I doing something wrong with the setup, or could this be a bug? It almost seems like the integrated switch has trouble learning MAC addresses via the CPU port.
Has anyone else with similar hardware experienced this?
Edit: I added modified "br-lan" bridge configuration to the config snippet as I forgot to add that initially.
Edit2: Here is the wireless config as well for good measure:
I didn't say in the post that my setup is not working. It is working with the configuration in the snippet. With your suggestion, the wifi interface is not getting bridged. I not only knew that already, I gave it a try anyway just now.
What the post is about is that there are frames being sent to switchports to which they shouldn't be sent.
Thanks for linking that, but that guide doesn't deal with multiple networks and vlan tagging and multiple wifi ssid-s. I don't mind that though, as the config I made is working as intended other than this weird thing with the switching behavior.
I also noticed that I forgot to add the br-lan bridge configuration to the config snippet, which may have influenced your train of thoughts on this matter. I fixed now so kindly take another look if you are still interested in this topic.
I captured the traffic on the ethernet interface (with Wireshark) on the other PC (let's call it PC2) and I see that frames coming from the first PC (call it PC1) destined for the phone are picked up by the capture. Normally, this should not happen, and it doesn't happen with the default config where there is only "br-lan", so only one "layer" of bridging not two (one for the switch and a second one for the vlan interface and wifi interfaces) like the config I posted.
The guide is universal and applicable to zero, one, or multiple SSIDs.
Some basic principles:
When creating a bridge device, you only list valid physical ports (lanX, wan, ethX, etc.)
A given physical port can be a member of only one bridge
With DSA devices, you can achieve everything with just one bridge (for some devices this is even your only choice)
The port separation is based on bridge vlan filtering
In the bridge-vlan section, you set the VLAN ID and tagged/untagged port membership (specifying the bridge device name)
A given physical port can be an untagged member of only one VLAN
The device specified in the interface section determines which VLAN will be used by this network. It should consist of the name of the bridge device (no matter br-lan, bridge, switch or whatever), a dot <.> and the vlan id
No problem with the clarity of it. Every time I did it this way, the wireless interfaces didn't get bridged. I tried it this way again, and got the same result. Then I restarted the wifi radios and then it's got bridged.
Thanks for confirming that I've been doing the bridging of wireless networks wrong! Now things appear to be operating as expected.