For detailed descriptions of the parameters and features, see the sections STP parameters and STP features.
device# configure terminal
device(config)# protocol spanning-tree rpvst
You can shut down R-PVST+ by entering the
shutdown command when in
rpvst
configuration mode.
device(config-rpvst)# bridge-priority 4096
device(config-rpvst)# forward-delay 20
device(config-rpvst)# hello-time 8
device(config-rpvst)# max-age 22
device(config-rpvst)# transmit-holdcount 5
device(config-rpvst)# vlan 100 priority 0
device(config-rpvst)# vlan 201 priority 12288
device(config-rpvst)# vlan 301 priority 20480
device(config-rpvst)# interface ethernet 0/3
device(conf-if-eth-0/3)# switchport
device(conf-if-eth-0/3)# switchport mode trunk
device(conf-if-eth-0/3)# switchport trunk allowed vlan add 100
device(conf-if-eth-0/3)# switchport trunk allowed vlan add 201
device(conf-if-eth-0/3)# switchport trunk allowed vlan add 301
device(conf-if-eth-0/3)# no spanning-tree shutdown
device(conf-if-eth-0/3)# exit
device(config-rpvst)# interface ethernet 0/4
device(conf-if-eth-0/4)# switchport
device(conf-if-eth-0/4)# switchport mode trunk
device(conf-if-eth-0/4)# switchport trunk allowed vlan add 100
device(conf-if-eth-0/4)# switchport trunk allowed vlan add 201
device(conf-if-eth-0/4)# switchport trunk allowed vlan add 301
device(conf-if-eth-0/4)# no spanning-tree shutdown
device(conf-if-eth-0/4)# exit
device(config)# interface ethernet 0/12
device(conf-if-eth-0/12)# spanning-tree bpdu-mac 0100.0ccc.cccd
device(conf-if-eth-0/12)# no spanning-tree shutdown
device(conf-if-eth-0/12)# end
device# show spanning-tree VLAN 1 Spanning-tree Mode: Rapid PVST Protocol Root Id: 0001.01e0.5200.0180 (self) Bridge Id: 0001.01e0.5200.0180 Root Bridge Forward Delay: 15; Hello Time: 2; Max Age: 20; Max-hops: 20 Configured Forward Delay: 20; Hello Time: 8; Max Age: 22; Max-hops: 20 Tx-HoldCount 5 Number of topology change(s): 0 Bpdu-guard errdisable timeout: disabled Bpdu-guard errdisable timeout interval: 300 sec Port Et 0/3 enabled Ifindex: 201351168; Id: 8001; Role: Disabled; State: Disabled Designated Path Cost: 0 Configured Path Cost: 20000000 Designated Port Id: 0; Port Priority: 128 Designated Bridge: 0000.0000.0000.0000 Number of forward-transitions: 0 Version: Per-VLAN Spanning Tree Protocol - Received None - Sent STP Portfast: off Configured Root guard: off; Operational Root guard: off Bpdu-guard: off Link-type: point-to-point Received BPDUs: 0; Sent BPDUs: 0 Port Et 0/4 enabled Ifindex: 201359360; Id: 8002; Role: Disabled; State: Disabled Designated Path Cost: 0 Configured Path Cost: 20000000 Designated Port Id: 0; Port Priority: 128 Designated Bridge: 0000.0000.0000.0000 Number of forward-transitions: 0 Version: Per-VLAN Spanning Tree Protocol - Received None - Sent STP Portfast: off Configured Root guard: off; Operational Root guard: off Bpdu-guard: off Link-type: point-to-point Received BPDUs: 0; Sent BPDUs: 0 VLAN 100 Spanning-tree Mode: Rapid PVST Protocol Root Id: 0064.01e0.5200.0180 (self) Bridge Id: 0064.01e0.5200.0180 Root Bridge Forward Delay: 15; Hello Time: 2; Max Age: 20; Max-hops: 20 Configured Forward Delay: 20; Hello Time: 8; Max Age: 22; Max-hops: 20 Tx-HoldCount 5 Number of topology change(s): 0 Bpdu-guard errdisable timeout: disabled Bpdu-guard errdisable timeout interval: 300 sec Port Et 0/3 enabled Ifindex: 201351168; Id: 8001; Role: Disabled; State: Disabled Designated Path Cost: 0 Configured Path Cost: 20000000 Designated Port Id: 0; Port Priority: 128 Designated Bridge: 0000.0000.0000.0000 Number of forward-transitions: 0 Version: Per-VLAN Spanning Tree Protocol - Received None - Sent STP Portfast: off Configured Root guard: off; Operational Root guard: off Bpdu-guard: off Link-type: point-to-point Received BPDUs: 0; Sent BPDUs: 0 Port Et 0/4 enabled Ifindex: 201359360; Id: 8002; Role: Disabled; State: Disabled Designated Path Cost: 0 Configured Path Cost: 20000000 Designated Port Id: 0; Port Priority: 128 Designated Bridge: 0000.0000.0000.0000 Number of forward-transitions: 0 Version: Per-VLAN Spanning Tree Protocol - Received None - Sent STP Portfast: off Configured Root guard: off; Operational Root guard: off Bpdu-guard: off Link-type: point-to-point Received BPDUs: 0; Sent BPDUs: 0 VLAN 201 Spanning-tree Mode: Rapid PVST Protocol Root Id: 30c9.01e0.5200.0180 (self) Bridge Id: 30c9.01e0.5200.0180 Root Bridge Forward Delay: 15; Hello Time: 2; Max Age: 20; Max-hops: 20 Configured Forward Delay: 20; Hello Time: 8; Max Age: 22; Max-hops: 20 Tx-HoldCount 5 Number of topology change(s): 0 Bpdu-guard errdisable timeout: disabled Bpdu-guard errdisable timeout interval: 300 sec Port Et 0/3 enabled Ifindex: 201351168; Id: 8001; Role: Disabled; State: Disabled Designated Path Cost: 0 Configured Path Cost: 20000000 Designated Port Id: 0; Port Priority: 128 Designated Bridge: 0000.0000.0000.0000 Number of forward-transitions: 0 Version: Per-VLAN Spanning Tree Protocol - Received None - Sent STP Portfast: off Configured Root guard: off; Operational Root guard: off Bpdu-guard: off Link-type: point-to-point Received BPDUs: 0; Sent BPDUs: 0 Port Et 0/4 enabled Ifindex: 201359360; Id: 8002; Role: Disabled; State: Disabled Designated Path Cost: 0 Configured Path Cost: 20000000 Designated Port Id: 0; Port Priority: 128 Designated Bridge: 0000.0000.0000.0000 Number of forward-transitions: 0 Version: Per-VLAN Spanning Tree Protocol - Received None - Sent STP Portfast: off Configured Root guard: off; Operational Root guard: off Bpdu-guard: off Link-type: point-to-point Received BPDUs: 0; Sent BPDUs: 0 VLAN 301 Spanning-tree Mode: Rapid PVST Protocol Root Id: 512d.01e0.5200.0180 (self) Bridge Id: 512d.01e0.5200.0180 Root Bridge Forward Delay: 15; Hello Time: 2; Max Age: 20; Max-hops: 20 Configured Forward Delay: 20; Hello Time: 8; Max Age: 22; Max-hops: 20 Tx-HoldCount 5 Number of topology change(s): 0 Bpdu-guard errdisable timeout: disabled Bpdu-guard errdisable timeout interval: 300 sec Port Et 0/3 enabled Ifindex: 201351168; Id: 8001; Role: Disabled; State: Disabled Designated Path Cost: 0 Configured Path Cost: 20000000 Designated Port Id: 0; Port Priority: 128 Designated Bridge: 0000.0000.0000.0000 Number of forward-transitions: 0 Version: Per-VLAN Spanning Tree Protocol - Received None - Sent STP Portfast: off Configured Root guard: off; Operational Root guard: off Bpdu-guard: off Link-type: point-to-point Received BPDUs: 0; Sent BPDUs: 0 Port Et 0/4 enabled Ifindex: 201359360; Id: 8002; Role: Disabled; State: Disabled Designated Path Cost: 0 Configured Path Cost: 20000000 Designated Port Id: 0; Port Priority: 128 Designated Bridge: 0000.0000.0000.0000 Number of forward-transitions: 0 Version: Per-VLAN Spanning Tree Protocol - Received None - Sent STP Portfast: off Configured Root guard: off; Operational Root guard: off Bpdu-guard: off Link-type: point-to-point Received BPDUs: 0; Sent BPDUs: 0
Observe that the settings comply with the formula set out in the STP parameters section, as:
(2 × (forward delay - 1)) ≥ maximum age ≥ (2 × (hello time + 1))
or in this case: 28 ≥ 20 ≥ 6.
device# copy running-config startup-config
device# configure terminal device(config)# protocol spanning-tree rpvst device(config-rpvst)# bridge-priority 4096 device(config-rpvst)# forward-delay 20 device(config-rpvst)# hello-time 8 device(config-rpvst)# max-age 22 device(config-rpvst)# transmit-holdcount 5 device(config-rpvst)# vlan 100 priority 0 device(config-rpvst)# vlan 201 priority 12288 device(config-rpvst)# vlan 301 priority 20480 device(config-rpvst)# interface ethernet 0/3 device(conf-if-eth-0/3)# switchport device(conf-if-eth-0/3)# switchport mode trunk device(conf-if-eth-0/3)# switchport trunk allowed vlan add 100 device(conf-if-eth-0/3)# switchport trunk allowed vlan add 201 device(conf-if-eth-0/3)# switchport trunk allowed vlan add 301 device(conf-if-eth-0/3)# no spanning-tree shutdown device(conf-if-eth-0/3)# exit device(config)# interface ethernet 0/4 device(conf-if-eth-0/4)# switchport device(conf-if-eth-0/4)# switchport mode trunk device(conf-if-eth-0/4)# switchport trunk allowed vlan add 100 device(conf-if-eth-0/4)# switchport trunk allowed vlan add 201 device(conf-if-eth-0/4)# switchport trunk allowed vlan add 301 device(conf-if-eth-0/4)# no spanning-tree shutdown device(conf-if-eth-0/4)# end device# show spanning-tree device# copy running-config startup-config