How to show stp status?

how to show stp status ?whitch port is blocked ?

brctl showstp <Bridgename>?

ver 19.07.7
there is invalid argument 'showstp' to 'brctl'

STP support in Linux is quiet old so I would assume it is there.... Right now I can not check which package provides brctl and it there is a more full version of it available like with ip-full...

Sorry I assumed that it's there by default.

Edit: can you try to install ip-full and bridge? Sry I'm on the phone and can dig on a router atm....

Edit2: yes install bridge and ensure that the symlink to brctl by BusyBox is overwritten by the bridge package. See https://forum.archive.openwrt.org/viewtopic.php?id=42551

Ok I have taken a look at my devices.

On 21.02 brctl still comes from busybox but has (now) showstp included.

If you are able to install ip-full and ip-bridge you can use bridge link to get the port state, see:

root@cpe:~# bridge link
7: eth0.16@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-vlan16 state forwarding priority 32 cost 4 
9: eth0.17@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-vlan17 state forwarding priority 32 cost 4 
11: eth0.4094@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-vlan4094 state forwarding priority 32 cost 4 
13: eth0.64@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-vlan64 state forwarding priority 32 cost 4 
15: eth0.65@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-vlan65 state forwarding priority 32 cost 4 
17: eth0.66@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-vlan66 state forwarding priority 32 cost 4 
19: eth0.67@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-vlan67 state forwarding priority 32 cost 4 
22: bat0.16@bat0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-vlan16 state forwarding priority 32 cost 100 
23: bat0.17@bat0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-vlan17 state forwarding priority 32 cost 100 
24: bat0.64@bat0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-vlan64 state forwarding priority 32 cost 100 
25: bat0.65@bat0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-vlan65 state forwarding priority 32 cost 100 
26: bat0.66@bat0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-vlan66 state forwarding priority 32 cost 100 
27: bat0.67@bat0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-vlan67 state forwarding priority 32 cost 100 
95: bat0.1@bat0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-lan state forwarding priority 32 cost 100 
96: eth0.1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-lan state forwarding priority 32 cost 4 
121: wlan0-1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-vlan65 state forwarding priority 32 cost 100 
122: wlan1-1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-vlan65 state forwarding priority 32 cost 100 
123: wlan1-2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-vlan67 state forwarding priority 32 cost 100 
125: wlan0-2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master br-vlan67 state forwarding priority 32 cost 100 

To verify that STP is enabled see stp_state in

root@cpe:~# ip -d link show dev br-vlan4094
10: br-vlan4094: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 02:00:01:01:0f:fe brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 65535 
    bridge forward_delay 800 hello_time 100 max_age 1000 ageing_time 30000 stp_state 1 priority 32767 vlan_filtering 0 vlan_protocol 802.1Q bridge_id 7fff.02:00:01:01:0F:FE designated_root 7fff.02:00:01:01:0F:FE root_port 0 root_path_cost 0 topology_change 0 topology_change_detected 0 hello_timer    0.96 tcn_timer    0.00 topology_change_timer    0.00 gc_timer  274.26 vlan_default_pvid 1 vlan_stats_enabled 0 vlan_stats_per_port 0 group_fwd_mask 0 group_address 01:80:c2:00:00:00 mcast_snooping 0 mcast_router 1 mcast_query_use_ifaddr 0 mcast_querier 0 mcast_hash_elasticity 16 mcast_hash_max 512 mcast_last_member_count 2 mcast_startup_query_count 2 mcast_last_member_interval 100 mcast_membership_interval 26000 mcast_querier_interval 25500 mcast_query_interval 12500 mcast_query_response_interval 1000 mcast_startup_query_interval 3124 mcast_stats_enabled 0 mcast_igmp_version 2 mcast_mld_version 1 nf_call_iptables 0 nf_call_ip6tables 0 nf_call_arptables 0 addrgenmode eui64 numtxqueues 1 gso_max_size 65536 gso_max_segs 65535 

In case available space does not allow installing further packages, most info can also be directly found in sysfs.

Bridge properties:
ls /sys/class/net/br-xyz/bridge/

Bridge port properties:
ls /sys/class/net/br-xyz/lower_*/brport/

2 Likes

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