Monday, February 8, 2016

CCIE 400-101: Layer 2 Technologies - STP Concepts

STP Versions

  • The first IEEE-standardized STP, also often called the “legacy” STP, was originally described in 802.1D. 
  • The Rapid STP (RSTP) was standardized in 802.1w, while Multiple STP (MSTP) was covered in 802.1s. 
  • The latest 802.1D-2004 standard no longer includes the legacy STP at all (which is considered obsolete), and instead, it covers the RSTP originally found in 802.1w. 
  • The 802.1s MSTP is integrated into 802.1Q-2005 and later revisions. 
  • Therefore, RSTP is covered in 802.1D while MSTP is covered in 802.1Q, and legacy STP has been dropped.

STP Concepts

  • STP uses special messaging between switches to establish a loop-free topology by logically blocking redundant links. 
  • STP protocol messages are called Bridge Protocol Data Units (BPDUs). 
  • STP operation is based on the ability to compare any two arbitrary Configuration BPDUs and determine which one of them is better, or superior.
  • For a detailed breakdown of a BPDU, see: BPDU Format and STP Timers
  • The determine the superior BPDU, they are compared in the following sequence of values, looking for the first occurrence of a lower value:
    • Root Bridge ID (RBID)
    • Root Path Cost (RPC)
    • Sender Bridge ID (SBID)
    • Sender Port ID (SPID)
    • Receiver Port ID (RPID; not included in the BPDU, evaluated locally; very uncommon) 
  • Only Configuration BPDUs are compared.
  • Each port in STP stores (that is, remembers) the superior BPDU it has either sent or received. 
  • Essentially, each port stores the Designated Port’s BPDU — whether it is the port itself that is Designated or it is a neighbor’s port. 
  • Should a port store a received BPDU, it must be received again within a time interval of MaxAge-MessageAge seconds; otherwise it will expire after this period. 
  • To determine which ports forward and block, STP follows a three-step process:
    1. Elect the root switch: the switch with the lowest bridge ID.
    2. Determine root port on each switch: the port on each non-root switch that receives the best BPDU.
    3. Determine the designated port for each segment: the switch that sends the superior BPDU on the segment.

Determining the Root Port

  • Each non-root switch chooses exactly one port as its Root Port, i.e. the port that receives the best resulting BPDU. 
  • This means that the switch adds the port's cost to the advertised Root Path Cost value, yielding a resulting BPDU.
  • BPDUs received on the Root Port of a non-root switch are forwarded out its designated ports after updating the Root Path Cost, Sender Bridge ID, Send Port ID, and MessageAge fields accordingly. 
  • BPDUs received on other ports of a non-root switch are processed but they are not forwarded.
  • Many people think of STP costs as being associated with a segment; however, the cost is actually associated with interfaces. Good design practices dictate using the same STP cost on each segment, but the values can be different.
  • On recent Catalyst switches, the default costs correspond to the 802.1D-1998 version of the standard if PVST or Rapid PVST is used, and to the 802.1D-2004 version if MSTP is used. 
  • With PVST and Rapid PVST, the 802.1D-2004 costs can be activated using the spanning-tree pathcost method long global configuration command. 
  • By default, spanning-tree pathcost method short is configured, causing the switch to use the older revision of the costs.


Determining the Designated Port

  • Designated switch = switch forwarding BPDUs on a LAN segment. 
  • Designated Port = the port that the designated switch uses to forward frames onto the segment. 
  • All other ports are neither Root or Designated will be moved to Blocking state (Non-Designated ports). 
  • The become the Designated Port, the switch must send superior BPDUs on the segment.
  • The tiebreakers during Designated Port selection are the same as before (how to find the superior BPDU).
  • Neither Root Ports nor Blocking ports send BPDUs. 

Summary

  • The root switch is the switch that has the lowest Bridge ID in the topology. 
  • On each non-root switch, a Root Port is the port receiving the best (that is, superior) resulting BPDUs from all received BPDUs on all ports. 
  • On each connected segment, a Designated Port is the port sending the best (that is, superior) BPDUs on the segment. 
  • All ports that are neither Root Ports nor Designated Ports are superfluous in an active topology and will be put into the Blocking state. 
  • Configuration BPDUs are sent out only from Designated Ports.
  • Each port stores the best (that is, superior) BPDU it has received or sent itself. 
  • Designated Ports store the BPDU they send; Root and Blocking ports store the best BPDU they receive. 
  • The stored BPDU determines the role of the port and is used for comparisons.
  • Received superior stored BPDUs will expire in MaxAge-MessageAge seconds if not received within this time period.

About STP Timers

  • The MessageAge field is an estimation of the BPDU’s age since it was originated by the root bridge. 
  • At the root bridge, the MessageAge is set to 0. Any other switch will increment this value, usually by 1, before forwarding the BPDU further. 
  • The remaining lifetime of a BPDU after being received by a switch is MaxAge-MessageAge. 
  • Finally, the remaining fields carry the values of STP timers: MaxAge, HelloTime, ForwardDelay. These timer values always reflect the timer settings on the root switch.  
  • Timers configured on a non-root switch are not used and would become effective only if the switch itself became the root switch. 

References 

CCIE Routing and Switching v5.0 Official Cert Guide, Volume 1

No comments:

Post a Comment