CCNP SWITCH/Implementing Spanning Tree

From Teknologisk videncenter
Revision as of 10:10, 24 August 2011 by Rael (talk | contribs) (Rapid SPanning Tree Protocol)
Jump to: navigation, search

Spanning Tree Protocols

DEC STP
Invented in 1985 by Radia Perlman at the Digital Equipment Corporation.
802.1D
Published in 1990 by the IEEE and based on the algorithm design by Perlman. Subsequent versions were published in 1998 and 2004 incorporating various extensions.
Common Spanning Tree(CST)
Common Spanning Tree(CST) assumes one 802.1D spanning-tree instance for the entire bridged network, regardless of the number of VLANs. Maintains only one instance of STP and therefor uses less CPU and memory than other STP varieties.
Per VLAN SPanning Tree Plus(PVST+)
PVST+ is a Cisco enhancement of STP that provides a separate 802.1D spanning-tree instance for each VLAN configured in the network. The separate instance supports enhancement such as PortFast, BPDU guard, BPDU filter, root guard, and loop guard. One instance per VLAN requires more CPU and memory than CST.
Rapid STP(RSTP)
IEEE 802.1w is an evolution of STP that provides faster convergence of STP. This version addresses many of the convergence issues in STP. It only maintains one RSTP instance per STP domain.
Multiple Spanning Tree(MST)
MST is an IEEE standard inspired from the earlier Cisco proprietary Multi-Instance Spanning Tree Protocol (MISTP) implementation. MST maps multiple VLANs that have the same traffic flow requirements into the same spanning-tree instance. The Cisco implementation provides up to 16 instances of RSTP (802.1w). The CPU and memory requirements of this version are less than PVRST+ but more than RSTP.
Per VLAN Rapid Spanning Tree Plus(PVRST+)
PVRST+is a Cisco enhancement of RSTP that is similar to PVST+. It provides a separate instance of 802.1w per VLAN. This version addressed both the convergence issues and the suboptimal traffic flow issues. To do this, this version has the largest CPU and memory requirements.

Comparison

Cmparision of STP
Protocol Standard Resource 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 Medium/High Fast - VLAN List

STP

STP Operation

  1. Elect the root bridge: STP Elects the Root Bridge with the lowest BID. The BID consists of the bridge priority and the MAC address. The Root Bridge only have Designated Ports.
  2. Select the root ports on all nonroot bridges: The protocol establishes one root port on each nonroot bridge. The root port is the lowest-cost path from the nonroot bridge to the root bridge. Root ports send and receive traffic. When the Switch has two or more equal-cost ports it elects the port with the lowest port ID as the root port. The port ID consists of a priority and the port number.
  3. Select the designated port on each segment: On each segment, STP establishes one designated port on the bridge that has the lowest path cost to the root bridge. In the event of a tie, the bridge ID acts as thetiebreaker.

Port Roles

Root port
This port exists on nonroot bridges and is the switch port with the best path to the root bridge. Root ports forward data traffic toward the root bridge, and the source MAC address of frames received on the root port can populate the MAC table. Only one root port is enabled per bridge.
Designated Port
This port exists on root and nonroot bridges. For root bridges, all switch ports are designated ports. For nonroot bridges, a designated port is the switch port that receives and forwards data frames toward the root bridge as needed. Only one designated port is enabled per segment. If multiple switches exist on the same segment, an election process determines the designated switch, and the corresponding switch port begins forwarding frames for the segment. Designated ports can populate the MAC table.
Nondesignated port
The nondesignated port is a switch port that is not forwarding (blocking) data frames and not populating the MAC address table with the source addresses of frames seen on that segment.
Disabled port
The disabled port is a switch port that is shut down.

Port States

STP Port States

Port Cost

Port Cost

STP Example

STP Example

Rapid Spanning Tree Protocol

RSTP is an evolution of STP with better performance than STP event with proprietary enhancments like PortFast, UplinkFast, and BackboneFast. STP was developed in a time where recovering from a network faliure was allowed to take several minutes. But in todays High Availability network with routed solutions sub-second convergence is preferred. In most cases RSTP performs better than STP with Cisco proprietary extensions. IEEE802.1w is backwards compatible with IEEE802.1D.
The main difference between STP and RSTP is that RSTP uses a handshake protocol between neighbor switches to transition from discarding to forwarding immediately.

RSTP Port States

RSTP Port States
STP & RSTP port state comparison

RSTP Port Roles