Spanning Tree Protocol

1.1.e i PVST+, Rapid PVST+, MST

Introduction (Not on blueprint)

Basic STP purpose:

Network loops:

BPDU (Bridge Protocol Data Unit):

BPDU default timers:

Diameter:

Extended Bridge ID:

// Graphic missing - Coming soon //

Extended Bridge ID explained:

32768 16384 8192 4096
0 0 0 0
2048 1024 512 256 128 64 32 16 8 4 2 1
0 0 0 0 0 0 0 0 0 0 0 0

Root Bridge configuration:

Root bridge election characteristics:

Root bridge election process:

Root bridge port characteristics:

Root port/Designated port election on non-root bridge switches:

  1. Port with lowest path cost (cumulated) to root bridge
  2. On tie: Lowest Sender (Upstream) BID
  3. On tie: Lowest Sender (Upstream) Port ID (= combination of Port Priority and Interface Index Number, eg. Gi1/2 has a default PortID of 128.7)

Designated port election on shared segment:

Cisco default STP settings:

STP (802.1d) (Not on blueprint)

Spanning Tree Protocol

STP characteristics:

Port Types:

Port States:

“STP 802.1d” CLI show commands:

## Showing STP configuration in brief
Switch# show spanning-tree summary

## Showing STP configuration in detail
Switch# show spanning-tree detail

## Showing STP configuration for a specific VLAN
Switch# show spanning-tree vlan <vlan-id>

PVST+

Per VLAN Spanning Tree Plus

PVST+ characteristics:

Extended Bridge ID:

Root Bridge Election:

Port Roles/States:

“PVST+” CLI configuration commands:

## Enabling PVST+
Switch(config)# spanning-tree mode pvst

## Configuring the PVST+ primary and secondary root bridge for a specific VLAN
Switch(config)# spanning-tree vlan <vlan-ids> root primary
Switch(config)# spanning-tree vlan <vlan-ids> root secondary

RPVST+

Rapid Per VLAN Spanning Tree Plus

RPVST+ general characteristics:

RPVST+ convergence/timer characteristics:

Proposal/Agreement/Sync Process:

RPVST+ BPDU characteristics:

Extended Bridge ID:

Root bridge election:

Link Types:

Port Types:

Port Roles:

Port States:

“RPVST+” CLI configuration commands:

## Enabling RPVST+
Switch(config)# spanning-tree mode rapid-pvst

## Configuring the RPVST+ link type for a specific interface
Switch(config)# interface <if>
Switch(config-if)# spanning-tree link type [point-to-point | shared]

## Configuring the RPVST+ primary and secondary root bridge for a specific VLAN
Switch(config)# spanning-tree vlan <vlan-ids> root primary
Switch(config)# spanning-tree vlan <vlan-ids> root secondary

MST

Multiple Spanning Tree

MST characteristics:

MST VLAN pruning:

Important MST configuration similarities on all participating switches:

Instance Types:

Root bridges within MST:

// Graphic missing - Coming soon //

“MST” CLI configuration commands:

## Enabling RPVST+
Switch(config)# spanning-tree mode mst

## Configuring MST including instances
Switch(config)# spanning-tree mst configuration
Switch(config-mst)# name <mst-name>
Switch(config-mst)# revision <rev-id>
Switch(config-mst)# instance <id> vlan <vlan-ids>

## Fine-tuning MST parameters
Switch(config)# spanning-tree mst hello-time <value>
Switch(config)# spanning-tree mst forward-time <value>
Switch(config)# spanning-tree mst max-age <value>

## Configuring the MST bridge priority for a specific instance
Switch(config)# spanning-tree mst <instance> priority <value>

## Configuring the MST primary and secondary root bridge for a specific instance
Switch(config)# spanning-tree mst <instance> root primary
Switch(config)# spanning-tree mst <instance> root secondary

“MST” CLI show commands:

## Showing the current MST configuration parameters
Switch(config-mst)# show current

## Showing the pending MST configuration parameters
Switch(config-mst)# show pending

## Fine-tuning MST parameters
Switch# show spanning-tree mst

1.1.e MST/(Rapid-)PVST+ interoperability (not on blueprint)

General Information on “MST/(Rapid-)PVST+ interoperability”:

1.1.e ii Switch priority, port priority, path cost, STP timers

Switch priority

Switch priority characteristics:

“STP Switch priority” CLI configuration commands:

## Configuring the STP bridge priority for a specific VLAN
Switch(config)# spanning-tree vlan <vlan-ids> priority <value>

Port priority

Port priority characteristics:

“STP Port priority” CLI configuration commands:

## Configuring the STP port priority for all VLAN
Switch(config)# interface <if>
Switch(config-if)# spanning-tree port-priority <value>

## Configuring the STP port priority for a specific VLAN
Switch(config)# interface <if>
Switch(config-if)# spanning-tree vlan <vlan-ids> port-priority <value>

Path cost

Path cost characteristics:

Data rate STP Cost (802.1D-1998) STP Cost (802.1D-2004)
4 Mbps 250 5,000,000
10 Mbps 100 2,000,000
16 Mbps 62 1,250,000
100 Mbps 19 200,000
1 Gbps 4 20,000
2 Gbps 3 10,000
10 Gbps 2 2000

“STP Path cost” CLI configuration commands:

## Configuring STP to use the long path cost calculation method
Switch(config)# spanning-tree pathcost method long

## Modifying the STP path cost of a specific interface manually
Switch(config)# interface <if>
Switch(config-if)# spanning-tree cost <value>

## Modifying the STP path cost on a specific interface for a specific VLAN manually
Switch(config)# interface <if>
Switch(config-if)# spanning-tree vlan <vlan-ids> cost <value>

STP timers

Default values (Classic STP):

Timer meanings:

STP timer characteristics:

“STP timers” CLI configuration commands:

## Configuring the STP hello timer manually
Switch(config)# spanning-tree vlan <vlan-ids> hello-time <value>

## Configuring the STP forward delay timer manually
Switch(config)# spanning-tree vlan <vlan-ids> forward-time <value>

## Configuring the STP max age timer manually
Switch(config)# spanning-tree vlan <vlan-ids> max-age <value>

1.1.e iii PortFast, BPDU Guard, BPDU Filter

PortFast

What PortFast does:

PortFast characteristics:

“STP PortFast” CLI configuration commands:

## Enabling PortFast globally
Switch(config)# spanning-tree portfast default

## Enabling PortFast per interface (access interfaces)
Switch(config)# interface <if>
Switch(config-if)# spanning-tree portfast

## Enabling PortFast per interface (trunk interfaces)
Switch(config)# interface <if>
Switch(config-if)# spanning-tree portfast trunk

“STP PortFast” CLI show commands:

## Showing if PortFast is enabled for a specific interface
Switch# show spanning-tree interface <if> portfast

BPDUguard

BPDU = Bridge Protocol Data Unit = Contains STP information

What BPDUguard does:

BPDUguard characteristics:

“STP BPDUguard” CLI configuration commands:

## Enabling BPDUguard globally
Switch(config)# spanning-tree portfast bpduguard default

## Enabling BPDUguard per interface
Switch(config)# interface <if>
Switch(config-if)# spanning-tree bpduguard enable

BPDUfilter

What BPDUfilter does:

BPDUfilter characteristics:

“STP BPDUfilter” CLI configuration commands:

## Enabling BPDUfilter globally
Switch(config)# spanning-tree portfast bpdufilter default

## Enabling BPDUfilter per interface
Switch(config)# interface <if>
Switch(config-if)# spanning-tree bpdufilter enable

1.1.e iv Loop Guard, Root Guard

Loop Guard

What Loop Guard does:

Loop Guard characteristics:

“STP Loop Guard” CLI configuration commands:

## Enabling Loop Guard globally
Switch(config)# spanning-tree loopguard default

## Enabling Loop Guard per interface
Switch(config)# interface <if>
Switch(config-if)# spanning-tree guard loop

“STP Loop Guard” CLI show commands:

## Showing inconsistent STP interfaces
Switch# show spanning-tree inconsistentports

Root Guard

What Root Guard does:

Root Guard characteristics:

Root Guard best practice:

“STP Root Guard” CLI configuration commands:

## Enabling Root Guard per interface
Switch(config)# interface <if>
Switch(config-if)# spanning-tree guard root

“STP Root Guard” CLI show commands:

## Showing inconsistent STP interfaces
Switch# show spanning-tree inconsistentports