Skip to content

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.

AreaLevelNotes
Classic STPSupportedBPDU exchange, local election, Max Age, forward-delay ladder, TCN/TCA.
PVST+ / Rapid-PVST+SupportedOne tree per VLAN, each with its own root, root port and blocked ports.
RSTPSupportedProposal/agreement handshake and topology-change propagation.
MSTSupportedInstance 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 guardBehaviour modelEdge-port protection can block/error-disable ports.
StandardCoverageNotes
IEEE 802.1DSupportedBPDUs, roles, forward delay, TCN.
IEEE 802.1wSupportedProposal/agreement, sync, rapid TC.
IEEE 802.1sPartialMSTIs, and the configuration digest (HMAC-MD5) in the BPDU. Region boundaries from differing names or revisions are not modelled.
FeatureStatusNotes
Root bridge electionSupportedPriority then bridge ID tie-break.
Root port selectionSupportedPath cost and stable tie-breaks.
Designated/blocking portsSupportedPrevents modelled L2 loops.
PortFastSupportedEdge intent and guard interaction.
BPDU guardSupportedProtects edge ports.
Root guardSupportedA superior BPDU blocks the port.
Loop guardSupportedAs 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 AssuranceSupportedOn 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 / BackboneFastPartialUplinkFast 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 filterSupportedA filtered port sends nothing and takes no part in the tree.
Per-VLAN cost and prioritySupportedspanning-tree vlan <list> priority/cost; the last line naming a VLAN wins.
Cost from speedSupportedPath cost follows bandwidth; pathcost method long supported.
BPDUs in a captureSupportedSTP, RSTP, MST and per-VLAN PVST+ BPDUs are on the wire in a capture (Packet Lens), decoded by Wireshark.
Storm controlSupportedSee Layer-2 Security.
CommandIOS-styleJunos-styleVyOS-styleNotes
spanning-tree vlan 10 priority 4096SupportedSupportedSupportedRoot election influence. Junos bridge-priority, per VLAN under VSTP. VyOS: interfaces bridge BR priority N, one tree per bridge.
spanning-tree mode rapid-pvstSupportedSupportedPartialMode 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 portfastSupportedSupportedNot modelledEdge port intent. Junos: interface IF edge.
spanning-tree guard root / guard loopSupportedSupportedNot modelledRoot guard / loop guard. Junos: interface IF no-root-port / bpdu-timeout-action block.
spanning-tree bpdufilter enableSupportedn/an/aBPDU filter.
spanning-tree bpduguard enableSupportedSupportedNot modelledEdge protection. Junos: bpdu-block-on-edge, for every edge port.
show spanning-treeSupportedSupportedn/aPer-VLAN blocks; vlan, root, summary, interface, mst. Junos layout on Junos.

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.

Canonical example
configure terminal
spanning-tree mode rapid-pvst
spanning-tree vlan 10 priority 4096
interface GigabitEthernet0/1
spanning-tree portfast
spanning-tree bpduguard enable
end
show spanning-tree

Vendor styles

IOS-style
spanning-tree mode rapid-pvst
spanning-tree vlan 10 priority 4096
interface GigabitEthernet0/1
spanning-tree portfast
spanning-tree bpduguard enable
Junos-style
set protocols rstp bridge-priority 4k
set protocols rstp interface ge-0/0/1.0 edge
set protocols rstp bpdu-block-on-edge

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.