Spanning Tree
Protocol
Enhancements
Implementing Spanning Tree
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-1
STP Standards
 802.1D-1998: The legacy standard for bridging and STP.
 CST: Assumes one spanning-tree instance for the entire bridged
network, regardless of the number of VLANs.
 PVST+: A Cisco enhancement of STP that provides a separate 802.1D
spanning-tree instance for each VLAN configured in the network.
 802.1D-2004: An updated bridging and STP standard.
 802.1s (MST): Maps multiple VLANs into the same spanning-tree
instance.
 802.1w (RSTP): Improves convergence over 1998 STP by adding roles
to ports and enhancing BPDU exchanges.
 PVRST+: A Cisco enhancement of RSTP using PVST+.
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-2
Comparison of Spanning-Tree Protocols
Standard
Resources
Needed
Convergence
CST
802.1D
Low
Slow
All VLANs
PVST+
Cisco
High
Slow
Per VLAN
RSTP
802.1w
Medium
Fast
All VLANs
PVRST+
Cisco
Very high
Fast
Per VLAN
MSTP
802.1s
Cisco
Medium or
high
Fast
VLAN list
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-3
About STP
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-4
About STP (Cont.)
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-5
Spanning-Tree Cost and Priority
 Cost determines root port determination.
 For ports with equal costs, priority is used.
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-6
Default Spanning-Tree Configuration
 Cisco Catalyst switches support three types of spanning tree:
– PVST+ – Cisco default.
– PVRST+.
– MSTP.
 Default spanning-tree configuration:
– PVST+.
– A separate STP instance for each VLAN.
– Same switch is root bridge for all VLANs.
– No load sharing between links.
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-7
PVRST+ Configuration
 Enable PVRST+ globally.
 Should be configured on all switches in the broadcast domain.
 Configure a switch as the root bridge for each VLAN.
 Configure a switch as the secondary root bridge for each VLAN.
 Load sharing on uplinks.
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-8
PVRST+ Configuration (Cont.)
In this example scenario, bridge priority, cost, and priority
are manipulated.
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-9
RSTP Port Roles
 Ports in forwarding mode:
– Root: chosen path to root
bridge
– Designated: port that
sends the best BPDU on
the segment to which it is
connected
 Ports in blocking mode:
– Alternate: receives more
useful BPDUs from
another bridge
– Backup: receives more
useful BPDUs from the
same bridge
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-10
Spanning-Tree Port Types and States
STP Port Role
Root port
RSTP Port Role STP Port State
Root port
Designated port Designated port
RSTP Port State
Forwarding
Forwarding
Forwarding
Forwarding
Nondesignated
port
Alternative or
backup port
Blocking
Discarding
Disabled
Disabled
—
Discarding
Transition
Transition
Listening
Learning
Learning
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-11
RSTP State Transitions
 Standard spanning-tree state transitions:
Standard spanning tree has no mechanism to determine
when network has converged, blocking all transmissions
for twice the forward delay.
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-12
RSTP State Transitions (Cont.)
 RSTP state transitions:
Because RSTP relies on local negotiations, transition
occurs as soon as the negotiation is completed.
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-13
RSTP Proposal-Agreement Sequence
Ports negotiate locally as soon as different BPDUs are
received.
Transition occurs as soon as negotiation is completed.
Negotiation is then immediately started on other ports.
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-14
RSTP Link Types
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-15
RSTP Edge Ports
 Will never have a switch
connected to it
 Immediately transitions to
forwarding
 Functions similarly to
PortFast
 Is configured with spanningtree portfast command
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-16
PortFast Configuration
 Configure PortFast on
edge ports connected to
nonswitch devices.
 Ports transition directly to
forwarding, bypassing
listening and learning
states of spanning tree.
 Configures PortFast on an interface.
 Use trunk parameter for trunk interfaces with no switches
connected (e.g., routers or servers with trunks).
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-17
Bridge Priority with Extended System ID
 Only four high-order bits of
the 16-bit Bridge Priority
field carry actual priority.
 Therefore, priority can be
incremented only in steps
of 4096, onto which will be
added the VLAN number.
 Example:
For VLAN 11: If the priority
is left at default, the 16-bit
Priority field will hold
32768 + 11 = 32779.
© 2009 Cisco Systems, Inc. All rights reserved.
Priority Values (Hex)
0
1
2
.
8 (default)
.
F
Priority Values (Dec)
0
4096
8192
.
32768
.
61440
SWITCH v1.0—3-18
Verifying PVRST+
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-19
Verifying PVRST+ (Cont.)
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-20
Introducing MSTP
 In some scenarios, many
VLANs are spanning several
switches.
 PVRST+ would need six
instances.
 Grouping instances simplifies
the tree structure.
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-21
MST Regions
MST configuration on each switch:
 Name
 Revision number
 VLAN association table
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-22
Extended System ID in Bridge ID Field
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-23
Implementing MST
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-24
Implementing MST (Cont.)
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-25
Implementing MST (Cont.)
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-26
Verifying MSTP
switch# show spanning-tree mst configuration
 Displays MSTP configuration
switch# show spanning-tree mst configuration
Name
[XYZ]
Revision 1
Instances configured 2
Instance Vlans mapped
-------- -------------------------------------------------------0
1-10,13-20,23-30,34-4094
1
11,21,31
2
12,22,32
------------------------------------------------------------------
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-27
Verifying MSTP (Cont.)
switch# show spanning-tree mst instance_number
 Displays configuration information for a specific MSTP instance
switch# show spanning-tree mst 1
##### MST1
Bridge
Root
vlans mapped:
11,21,31
address 001a.e372.ab00 priority
this switch for MST1
Interface
--------------Fa0/1
Fa0/8
Role
---Mstr
Desg
Sts
--FWD
FWD
Cost
--------200000
200000
Prio.Nbr
-------128.1
128.9
24577 (24576 sysid 1)
Type
-----------------------P2p
P2p
 Forces renegotiation with neighboring switches during migration
process
switch# clear spanning-tree detected-protocols [interface interface-id]
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-28
Summary
 Enhancements now enable STP to converge more quickly and
run more efficiently.
 RSTP provides faster convergence than 802.1D STP when
topology changes occur.
 RSTP configuration includes enabling RSTP and designing the
root and secondary root bridges.
 RSTP allows several additional port roles to increase the
efficiency of the overall mechanism.
 show spanning-tree is the main family of commands used to verify
RSTP operations.
 MSTP reduces the encumbrance of PVST by allowing a single
instance of spanning tree to run for multiple VLANs.
 MSTP BPDUs carry the MST instance number in the extended
system ID field.
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-29
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—3-30