Get RSTP Root-Bridge information

Hi,

I have activated the RSTP- protocol on all 4 TSW212 switches (WebGui: Network → Spanning Tree → General → Mode: RSTP). Allong with the TSW212 switches, I also attach a embedded device which shall support RSTP as well. This embedded device I’m going to test. Accroding to the Wireshark traces the switches react as they should.

For testing purposes, I need to know which bridge get’s root-bridge and which information is the root-bridge sharing (I do not have access to the embedded device but must known the these information’s when the embedded device get’s root-bridge)

Therefore, I was using the follow cmd on a TSW212 switch:

brctl showstp br0

And it seem every bridge detect itself as root, even the wireshark trace proof the switch send’s the correct BPDU’s.

TSW212 with MC 20:97:27:6e:b8:b1 (expected as Root - Priority 4096):

BusyBox v1.36.0 (2025-07-08 05:05:13 UTC) built-in shell (ash)

  _____ ______        _____  ____
 |_   _/ ___\ \      / / _ \/ ___|
   | | \___ \\ \ /\ / / | | \___ \
   | |  ___) |\ V  V /| |_| |___) |
   |_| |____/  \_/\_/  \___/|____/

------------------------------------
     Teltonika TSW2 series 2025
------------------------------------
   Device:     TSW212
   Kernel:     5.10.236
   Firmware:   TSW2_R_00.01.06.3
   Build:      beb6372c
   Build date: 2025-07-14 11:55:46
------------------------------------
admin@TSW212:/$ brctl showstp br0
br0
 bridge id              7fff.2097276eb8b1
 designated root        7fff.2097276eb8b1
 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.00                 tcn timer                  0.00
 topology change timer     0.00                 gc timer                  35.93
 flags

port6 (6)
 port id                8006                    state                forwarding
 designated root        7fff.2097276eb8b1       path cost                 19
 designated bridge      7fff.2097276eb8b1       message age timer          0.00
 designated port        8006                    forward delay timer        0.00
 designated cost           0                    hold timer                 0.00
 flags

TSW212 with MC 20:97:27:68:95:63 (Priority 57344):

BusyBox v1.36.0 (2025-07-08 05:05:13 UTC) built-in shell (ash)

  _____ ______        _____  ____
 |_   _/ ___\ \      / / _ \/ ___|
   | | \___ \\ \ /\ / / | | \___ \
   | |  ___) |\ V  V /| |_| |___) |
   |_| |____/  \_/\_/  \___/|____/

------------------------------------
     Teltonika TSW2 series 2025
------------------------------------
   Device:     TSW212
   Kernel:     5.10.236
   Firmware:   TSW2_R_00.01.06.3
   Build:      beb6372c
   Build date: 2025-07-14 11:55:46
------------------------------------
admin@TSW212:/$ brctl showstp br0
br0
 bridge id              7fff.209727689563
 designated root        7fff.209727689563
 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.00                 tcn timer                  0.00
 topology change timer     0.00                 gc timer                  80.66
 flags

port4 (4)
 port id                8004                    state                forwarding
 designated root        7fff.209727689563       path cost                 19
 designated bridge      7fff.209727689563       message age timer          0.00
 designated port        8004                    forward delay timer        0.00
 designated cost           0                    hold timer                 0.00
 flags

Wireshark trace:

Does anyone have experience with RSTP in connection with TSW212 switches?

Hi there,

I have been informed by one of my colleagues that your case is already being worked on by our engineers. Once the issue has been resolved, you can share the solution here.

Kind regards,
M.

Solution:
brctl only supports classic STP and cannot display RSTP status. To check RSTP information on TSW212, use ubus via SSH (or CLI). Example:

ubus call tswconfig.rstp get_bridge_status "{'bridge': 'br0'}"

This returns the current RSTP bridge status, including root-bridge details:

BusyBox v1.36.0 (2025-12-03 11:50:35 UTC) built-in shell (ash)

 _____ ______        _____  ____
|_   _/ ___\ \      / / _ \/ ___|
  | | \___ \\ \ /\ / / | | \___ \
  | |  ___) |\ V  V /| |_| |___) |
  |_| |____/  \_/\_/  \___/|____/

----------------------------------
    Teltonika TSW2 series 2025
----------------------------------
   Device:     TSW212
   Kernel:     5.10.245
   Firmware:   TSW2_R_00.01.08
   Build:      a20181db
   Build date: 2025-12-03 13:51:34
----------------------------------
root@TSW212:~# ubus call tswconfig.rstp get_bridge_status "{'bridge': 'br0'}"
{
        "bridge": "br0",
        "enabled": true,
        "bridge-id": "8.000.20:97:27:68:95:63",
        "designated-root": "1.000.20:97:27:6E:B8:B1",
        "regional-root": "8.000.20:97:27:68:95:63",
        "root-port": "port7 (#6)",
        "path-cost": 400000,
        "internal-path-cost": 0,
        "max-age": 11,
        "bridge-max-age": 20,
        "forward-delay": 11,
        "bridge-forward-delay": 15,
        "tx-hold-count": 6,
        "max-hops": 20,
        "hello-time": 2,
        "ageing-time": 300,
        "force-protocol-version": "rstp",
        "time-since-topology-change": 252537,
        "topology-change-count": 2,
        "topology-change": false,
        "topology-change-port": "port1",
        "last-topology-change-port": "port7"
}

Important:
Log in via SSH as root user. The default admin account does not have access to these objects.

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