STP
STP prevents layer-2 loops in switched topologies. netverdict models root election, path cost, blocked/forwarding decisions, and common protection features in a deterministic way.
Support level
Section titled “Support level”| Area | Level | Notes |
|---|---|---|
| Classic STP | Supported | BPDU exchange, local election, Max Age, forward-delay ladder, TCN/TCA. |
| PVST+ / Rapid-PVST+ | Supported | One tree per VLAN, each with its own root, root port and blocked ports. |
| RSTP | Supported | Proposal/agreement handshake and topology-change propagation. |
| MST | Supported | Instance VLAN lists in every form (10,20, 10, 20, 10 20, ranges), written back as IOS prints them; spanning-tree mst 0 priority is the CIST priority, and another instance’s own priority is noted, not modelled (instances elect from the CIST). Per-instance trees from the VLAN-to-instance map, per-MSTI proposal/agreement, PVST+ interop. Every MST switch is in one region: the region name and revision are read, reported and change nothing. |
| BPDU guard | Behaviour model | Edge-port protection can block/error-disable ports. |
Standards coverage
Section titled “Standards coverage”| Standard | Coverage | Notes |
|---|---|---|
| IEEE 802.1D | Supported | BPDUs, roles, forward delay, TCN. |
| IEEE 802.1w | Supported | Proposal/agreement, sync, rapid TC. |
| IEEE 802.1s | Partial | MSTIs, and the configuration digest (HMAC-MD5) in the BPDU. Region boundaries from differing names or revisions are not modelled. |
Feature matrix
Section titled “Feature matrix”| Feature | Status | Notes |
|---|---|---|
| Root bridge election | Supported | Priority then bridge ID tie-break. |
| Root port selection | Supported | Path cost and stable tie-breaks. |
| Designated/blocking ports | Supported | Prevents modelled L2 loops. |
| PortFast | Supported | Edge intent and guard interaction. |
| BPDU guard | Supported | Protects edge ports. |
| Root guard | Supported | A superior BPDU blocks the port. |
| Loop guard | Supported | As Cisco describes it: a root or alternate port on a point-to-point link that heard BPDUs since link-up and stops hearing them goes loop-inconsistent once its BPDU ages out, and recovers when BPDUs return. A link one-way since link-up and a shared link are not caught. spanning-tree loopguard default turns it on for every port; guard none opts a port out. show spanning-tree inconsistentports lists Loop, Root, PVST Sim. and Bridge Assurance inconsistencies. |
| Bridge Assurance | Supported | On by default in Rapid-PVST+ and MST: a point-to-point network port (spanning-tree portfast network, port type network, … network default) that hears no BPDU goes *BA_Inc. no spanning-tree bridge assurance turns it off. |
| UplinkFast / BackboneFast | Partial | UplinkFast on PVST+ sets priority 49152 (unless configured), adds 3000 to path costs below 3000, and lets an alternate uplink that becomes root port forward at once; inactive under rapid modes, as on IOS. BackboneFast is read, shown and written back, and changes nothing: the model already accepts a designated bridge’s inferior BPDU at once. |
| BPDU filter | Supported | A filtered port sends nothing and takes no part in the tree. |
| Per-VLAN cost and priority | Supported | spanning-tree vlan <list> priority/cost; the last line naming a VLAN wins. |
| Cost from speed | Supported | Path cost follows bandwidth; pathcost method long supported. |
| BPDUs in a capture | Supported | STP, RSTP, MST and per-VLAN PVST+ BPDUs are on the wire in a capture (Packet Lens), decoded by Wireshark. |
| Storm control | Supported | See Layer-2 Security. |
Vendor command matrix
Section titled “Vendor command matrix”| Command | IOS-style | Junos-style | VyOS-style | Notes |
|---|---|---|---|---|
spanning-tree vlan 10 priority 4096 | Supported | Supported | Supported | Root election influence. Junos bridge-priority, per VLAN under VSTP. VyOS: interfaces bridge BR priority N, one tree per bridge. |
spanning-tree mode rapid-pvst | Supported | Supported | Partial | Mode selection. Junos protocols rstp, stp, mstp, vstp. VyOS: interfaces bridge BR stp turns on classic STP; a bridge without it runs none and takes no part in the tree. |
spanning-tree portfast | Supported | Supported | Not modelled | Edge port intent. Junos: interface IF edge. |
spanning-tree guard root / guard loop | Supported | Supported | Not modelled | Root guard / loop guard. Junos: interface IF no-root-port / bpdu-timeout-action block. |
spanning-tree bpdufilter enable | Supported | n/a | n/a | BPDU filter. |
spanning-tree bpduguard enable | Supported | Supported | Not modelled | Edge protection. Junos: bpdu-block-on-edge, for every edge port. |
show spanning-tree | Supported | Supported | n/a | Per-VLAN blocks; vlan, root, summary, interface, mst. Junos layout on Junos. |
Behaviour notes
Section titled “Behaviour notes”STP runs as a protocol. Each switch sends BPDUs every 2 seconds from its designated ports, ages received BPDUs out after Max Age, and elects its root and port roles from what it heard. On a PVST+ switch each VLAN runs its own tree, so two uplinks can block different VLANs. VLAN 1 is the Common Spanning Tree, which is how PVST+ meets an IEEE bridge or an MST region.
Examples
Section titled “Examples”Canonical example
configure terminalspanning-tree mode rapid-pvstspanning-tree vlan 10 priority 4096interface GigabitEthernet0/1 spanning-tree portfast spanning-tree bpduguard enableendshow spanning-treeVendor styles
IOS-style
spanning-tree mode rapid-pvstspanning-tree vlan 10 priority 4096interface GigabitEthernet0/1 spanning-tree portfast spanning-tree bpduguard enableJunos-style
set protocols rstp bridge-priority 4kset protocols rstp interface ge-0/0/1.0 edgeset protocols rstp bpdu-block-on-edgeTry it
Section titled “Try it”Known limits
Section titled “Known limits”Vendor debug output is not modelled. MST region boundaries are not modelled.
VyOS reads a bridge’s stp, priority, forwarding-delay and its members’ cost and priority; portfast, guards and BPDU guard are not read.