mod-5-CCNA v7 - SRWE - Module 5 STP Conceptsl
mod-5-CCNA v7 - SRWE - Module 5 STP Conceptsl
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 59
Purpose of STP
Redundancy in Layer 2 Switched Networks
• This topic covers the causes of loops in a Layer 2 network and briefly explains how spanning tree protocol
works. Redundancy is an important part of the hierarchical design for eliminating single points of failure
and preventing disruption of network services to users. Redundant networks require the addition of
physical paths, but logical redundancy must also be part of the design. Having alternate physical paths for
data to traverse the network makes it possible for users to access network resources, despite path
disruption. However, redundant paths in a switched Ethernet network may cause both physical and logical
Layer 2 loops.
• Ethernet LANs require a loop-free topology with a single path between any two devices. A loop in an
Ethernet LAN can cause continued propagation of Ethernet frames until a link is disrupted and breaks the
loop.
Purpose of STP
Spanning Tree Protocol
• Spanning Tree Protocol (STP) is a
loop-prevention network protocol
that allows for redundancy while
creating a loop-free Layer 2
topology.
• STP logically blocks physical loops
in a Layer 2 network, preventing
frames from circling the network
forever.
Purpose of STP
STP Recalculation
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 68
STP Operations
Steps to a Loop-Free Topology
Using the STA, STP builds a loop-free topology in a four-step process:
STP can be configured to operate in an environment with multiple VLANs. In Per-VLAN Spanning Tree (PVST)
versions of STP, there is a root bridge elected for each spanning tree instance. This makes it possible to have
different root bridges for different sets of VLANs. STP operates a separate instance of STP for each individual
VLAN. If all ports on all switches are members of VLAN 1, then there is only one spanning tree instance.
5.3 Evolution of STP
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 83
Evolution of STP
Different Versions of STP (Cont.)
STP
Description
Variety
This is the original IEEE 802.1D version (802.1D-1998 and earlier) that provides a loop-free topology in a network with
STP redundant links. Also called Common Spanning Tree (CST), it assumes one spanning tree instance for the entire bridged
network, regardless of the number of VLANs.
Per-VLAN Spanning Tree (PVST+) is a Cisco enhancement of STP that provides a separate 802.1D spanning tree instance
PVST+ for each VLAN configured in the network. PVST+ supports PortFast, UplinkFast, BackboneFast, BPDU guard, BPDU filter,
root guard, and loop guard.
802.1D-
This is an updated version of the STP standard, incorporating IEEE 802.1w.
2004
RSTP Rapid Spanning Tree Protocol (RSTP) or IEEE 802.1w is an evolution of STP that provides faster convergence than STP.
Rapid This is a Cisco enhancement of RSTP that uses PVST+ and provides a separate instance of 802.1w per VLAN. Each
PVST+ separate instance supports PortFast, BPDU guard, BPDU filter, root guard, and loop guard.
Multiple Spanning Tree Protocol (MSTP) is an IEEE standard inspired by the earlier Cisco proprietary Multiple Instance
MSTP
STP (MISTP) implementation. MSTP maps multiple VLANs into the same spanning tree instance.
Multiple Spanning Tree (MST) is the Cisco implementation of MSTP, which provides up to 16 instances of RSTP and
MST combines many VLANs with the same physical and logical topology into a common RSTP instance. Each instance
supports PortFast, BPDU guard, BPDU filter, root guard, and loop guard.
Evolution of STP
RSTP Concepts
• RSTP (IEEE 802.1w) supersedes the original 802.1D while retaining backward compatibility. The 802.1w STP
terminology remains primarily the same as the original IEEE 802.1D STP terminology. Most parameters
have been left unchanged. Users that are familiar with the original STP standard can easily configure RSTP.
The same spanning tree algorithm is used for both STP and RSTP to determine port roles and topology.
• RSTP increases the speed of the recalculation of the spanning tree when the Layer 2 network topology
changes. RSTP can achieve much faster convergence in a properly configured network, sometimes in as
little as a few hundred milliseconds. If a port is configured to be an alternate port it can immediately
change to a forwarding state without waiting for the network to converge.
Note: Rapid PVST+ is the Cisco implementation of RSTP on a per-VLAN basis. With Rapid PVST+ an independent
instance of RSTP runs for each VLAN.
Evolution of STP
RSTP Port States and Port Roles
There are only three port states in Root ports and designated ports are the same
RSTP that correspond to the three for both STP and RSTP. However, there are two
possible operational states in STP. RSTP port roles that correspond to the blocking
The 802.1D disabled, blocking, and state of STP. In STP, a blocked port is defined as
listening states are merged into a not being the designated or root port. RSTP has
unique 802.1w discarding state. two port roles for this purpose.
Evolution of STP
RSTP Port States and Port Roles (Cont.)
The alternate port has an alternate path to the root bridge. The backup port is a backup to a shared medium,
such as a hub. A backup port is less common because hubs are now considered legacy devices.
Evolution of STP
PortFast and BPDU Guard
• When a device is connected to a switch port or when a switch powers up, the switch port goes through
both the listening and learning states, each time waiting for the Forward Delay timer to expire. This delay is
15 seconds for each state for a total of 30 seconds. This can present a problem for DHCP clients trying to
discover a DHCP server because the DHCP process may timeout. The result is that an IPv4 client will not
receive a valid IPv4 address.
• When a switch port is configured with PortFast, that port transitions from blocking to forwarding state
immediately, avoiding the 30 second delay. You can use PortFast on access ports to allow devices
connected to these ports to access the network immediately. PortFast should only be used on access ports.
If you enable PortFast on a port connecting to another switch, you risk creating a spanning tree loop.
• A PortFast-enabled switch port should never receive BPDUs because that would indicate that switch is
connected to the port, potentially causing a spanning tree loop. Cisco switches support a feature called
BPDU guard. When enabled, it immediately puts the switch port in an errdisabled (error-disabled) state
upon receipt of any BPDU. This protects against potential loops by effectively shutting down the port. The
administrator must manually put the interface back into service.
Evolution of STP
Alternatives to STP
• Over the years, organizations required greater resiliency and availability in the LAN. Ethernet LANs went
from a few interconnected switches connected to a single router, to a sophisticated hierarchical network
design including access, distribution and core layer switches.
• Depending on the implementation, Layer 2 may include not only the access layer, but also the distribution
or even the core layers. These designs may include hundreds of switches, with hundreds or even thousands
of VLANs. STP has adapted to the added redundancy and complexity with enhancements, as part of RSTP
and MSTP.
• An important aspect to network design is fast and predictable convergence when there is a failure or
change in the topology. Spanning tree does not offer the same efficiencies and predictabilities provided by
routing protocols at Layer 3.
• Layer 3 routing allows for redundant paths and loops in the topology, without blocking ports. For this
reason, some environments are transitioning to Layer 3 everywhere except where devices connect to the
access layer switch. In other words, the connections between access layer switches and distribution
switches would be Layer 3 instead of Layer 2.