Description
Describe the bug
I wanted to connect more than 2 switches (everything running OpenWrt) in a loop to make it HA in case of a cable / switch failure but I noticed when I finish the loop, the switches stop working properly since Spanning Tree Protocol (STP) that I enabled in Bridge configuration on all switches doesn't work. I tested that both on the most current stable version and the current snapshot and with ZyXEL GS1900-24 with RTL838x switches and ZyXEL GS1900-48 with RTL839x switches.
Thank you all Developers and Maintainers for building and supporting OpenWrt. OpenWrt is the best! Thank you!
OpenWrt version
r22000-6bc675c0be
OpenWrt target/subtarget
realtek/rtl838x
Device
ZyXEL GS1900-24 v1
Image kind
Official downloaded image
Steps to reproduce
- Enable STP:
network.switch.stp='1' - Connect switches in a loop
- Later I tried to change the following values but that had no effect:
network.switch.priority=<different for different switches>
network.switch.hello_time='4'
network.switch.forward_delay='15'
network.switch.max_age='20'
Actual behaviour
- STP seems to be doing something since I can see the following messages in serial terminal:
[40254.045245] switch: port 3(lan3) entered blocking state
[40254.051121] switch: port 3(lan3) entered listening state
[40270.584219] switch: port 3(lan3) entered learning state
[40287.224253] switch: port 3(lan3) entered forwarding state
- But when I run:
brctl showstp switchI get:
switch
bridge id <same for all ports>
designated root <same for all ports>
root port 0 path cost 0
max age 10.00 bridge max age 10.00
hello time 1.00 bridge hello time 1.00
forward delay 8.00 bridge forward delay 8.00
ageing time 300.00
hello timer 0.16 tcn timer 0.00
topology change timer 0.00 gc timer 91.99
flags
lan23 (23)
port id 8017 state disabled
designated root <same for all ports> path cost 100
designated bridge <same for all ports> message age timer 0.00
designated port 8017 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags
...
-
That tells me that all switches are Root bridge which means that the switches don't know about each other.
-
I can verify that STP doesn't work also because when I finish the loop connection, the switching stop working completely or partially and I get the following messages in serial terminal:
[ 83.135326] switch: received packet on lan3 with own address as source address (addr:<switch MAC>, vlan:0)
[ 83.147165] switch: received packet on lan9 with own address as source address (addr:<switch MAC>, vlan:0)
- That means that broadcast storm is happening.
Expected behaviour
brctl showstp switch should should different IDs for all switches except one.
Additional info
I made sure I'm testing the most simple configuration as possible so I disabled VLANs, firewall accepting everything, etc.. This is my configuration that is same on all switches:
Diffconfig
No response
Terms
- I am reporting an issue for OpenWrt, not an unsupported fork.