PacketLab
Switching · Spanning Tree

PortFast and spanning tree

Use BPDU evidence to resolve the common misconception that PortFast turns STP off.

Independent lab examples; selected output and frame summaries are illustrative. Port naming and command support vary by switch and software release.

Network and objective

Classic PVST+ is used to expose original STP behavior; rapid-PVST+ and MST are separate lessons.

Use three fresh isolated switches with Gigabit trunks: SW1 Gi1/0/23 ↔ SW2 Gi1/0/23; SW1 Gi1/0/24 ↔ SW3 Gi1/0/24; SW2 Gi1/0/24 ↔ SW3 Gi1/0/23. Both VLANs10/20 exist on every switch. Baseline SW1/SW2/SW3 priorities are4096/8192/12288, with short costs and no extra links. Start independently from the included baseline for each lesson; subsequent repair snippets apply to the named device.

Ethernet switchingIllustrative topology
Physical links are solid; device roles and relevant links are labeled.
Physical links are solid; device roles and relevant links are labeled.

How it works

PortFast changes how a port starts as an edge. The switch can still send and receive BPDUs and participate in election. Receiving a BPDU without guard can remove operational edge status and trigger ordinary role/state behavior.

A deliberate single-link lab can demonstrate this safely: classify SW3 Gi1/0/1 as edge, then connect one test switch with no other links. Inspect received BPDUs and operational state. This is a controlled exception for learning, not a recommendation to mark production inter-switch links as edges.

Configure or inspect

SW1

vlan 10
vlan 20
spanning-tree mode pvst
spanning-tree pathcost method short
spanning-tree vlan 10 priority 4096
spanning-tree vlan 20 priority 4096
interface range GigabitEthernet1/0/23 - 24
 switchport mode trunk
 switchport trunk allowed vlan 10,20
 switchport nonegotiate
 no shutdown
exit

SW2

vlan 10
vlan 20
spanning-tree mode pvst
spanning-tree pathcost method short
spanning-tree vlan 10 priority 8192
spanning-tree vlan 20 priority 8192
interface range GigabitEthernet1/0/23 - 24
 switchport mode trunk
 switchport trunk allowed vlan 10,20
 switchport nonegotiate
 no shutdown
exit

SW3

vlan 10
vlan 20
spanning-tree mode pvst
spanning-tree pathcost method short
spanning-tree vlan 10 priority 12288
spanning-tree vlan 20 priority 12288
interface range GigabitEthernet1/0/23 - 24
 switchport mode trunk
 switchport trunk allowed vlan 10,20
 switchport nonegotiate
 no shutdown
exit
interface GigabitEthernet1/0/1
 switchport mode access
 switchport access vlan 10
 spanning-tree portfast
 no shutdown

Verify the result

Illustrative output · selected lines
SW3#show spanning-tree interface GigabitEthernet1/0/1 detail
 Port 1 (GigabitEthernet1/0/1) of VLAN0010 is designated forwarding
 BPDU: sent 12, received 6
Illustrative observation: operational edge status is no longer asserted.

Received BPDUs prove control traffic reaches the interface. If BPDU guard is enabled instead, receiving a BPDU should trigger that policy; do not expect the unguarded demonstration’s result.

Failure and recovery

A learner seeing forwarding immediately may incorrectly assume BPDUs are disabled. Check actual counters and the running edge/guard/filter settings rather than inferring control behavior from data state alone.

Disconnect the test bridge, restore the intended endpoint attachment and confirm the configured edge and guard policy.

Further reading

Key Takeaways

  • PortFast is not STP disablement.
  • Data state alone does not describe BPDU handling.
  • Receiving BPDUs can change operational edge status.
  • Guard changes the demonstrated outcome.
  • Keep this controlled experiment free of redundant loops.

PortFast and spanning tree Quiz

Six questions · four options each · select one answer per question. Submit all answers to see your score and explanations.

1. Which observation disproves STP-off here?
2. What can a received BPDU change?
3. Which feature would instead enforce an unexpected-BPDU shutdown?
4. Is immediate forwarding proof of disabled STP?
5. How many links should the demonstration test bridge have?
6. What should follow the experiment?