| 0 comments ]

Add a note hereHigh availability is a primary goal for enterprise networks that rely heavily on their multilayer switched network to conduct business. One method to ensure high availability is to provide Layer 2 redundancy of devices, modules, and links throughout the network. Network redundancy at Layer 2, however, introduces the potential for bridging loops, where packets loop endlessly between devices, crippling the network. The Spanning Tree Protocol identifies and prevents such Layer 2 loops.

Add a note hereThis chapter overviews the Spanning Tree Protocols, including PerVLAN Rapid Spanning Tree Plus (PVRST+) and Multiple Spanning Tree (MST). This chapter also covers how to configure the protocols and how to configure Spanning Tree Protocols stability mechanisms.

Add a note here Evolution of Spanning Tree Protocols

Add a note hereMultiple redundant paths between switches can cause loops in the network topology. If a loop exists, the potential for message duplication exists. When loops occur, some switches see stations appear on both sides of the switch. This condition confuses the forwarding algorithm and enables duplicate frames to be forwarded. To prevent loops while providing path redundancy, Spanning Tree Protocol (STP) defines a tree that spans all switches in an extended network. STP will allow only one active path and block any redundant paths, as shown in Figure 3-1. In case of failure of the active path, one of the redundant paths may become the active path.

Image from book
Add a note hereFigure 3-1: Spanning Tree Protocol

Add a note here There are several varieties of STP:

  • Add a note hereThe first STP, called the DEC STP, was invented in 1985 by Radia Perlman at the Digital Equipment Corporation.

  • Add a note hereIn 1990, the IEEE published the first standard for the protocol as 802.1D based on the algorithm designed by Perlman. Subsequent versions were published in 1998 and 2004 incorporating various extensions.

  • Add a note hereCommon Spanning Tree (CST) assumes one 802.1D spanning-tree instance for the entire bridged network, regardless of the number of VLANs. Because there is only one instance, the CPU and memory requirements for this version are lower than the others. However, because there is only one instance, there is only one root bridge and one tree. This means that traffic for all VLANs flows over the same path. This can lead to suboptimal traffic flows. Also the network is slow in converging after topology changes due to inherent 802.1D timing mechanisms.

  • Add a note herePer VLAN Spanning Tree Plus (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. Creating an instance for each VLAN increases the CPU and memory requirements but allows for per-VLAN root bridges. This allows the STP tree to be optimized for the traffic of each VLAN. Convergence of this version is similar to 802.1D; however, convergence is per-VLAN.

  • Add a note hereRapid STP (RSTP), or IEEE 802.1w, is an evolution of STP that provides faster convergence of STP. This version addresses many of the convergence issues, but because it still had a single instance of STP, it did not address the suboptimal traffic flow issues. To support that faster convergence, the CPU usage and memory requirements of this version are slightly more than CST but less than PVRST+.

  • Add a note hereMultiple Spanning Tree (MST) is an IEEE standard inspired from the earlier Cisco proprietary Multi-Instance Spanning Tree Protocol (MISTP) implementation. To reduce the number of required STP instances, 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) and 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. The CPU and memory requirements of this version are less than PVRST+ but more than RSTP.

  • Add a note here PVRST+ is a Cisco enhancement of RSTP that is similar to PVST+. It provides a separate instance of 802.1w per VLAN. The separate instance supports PortFast, BPDU guard, BPDU filter, root guard, and loop guard. 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.

Add a note hereThe RSTP algorithm is far superior to 802.1D STP and even PVST+ from a convergence perspective. It greatly improves the restoration times for any VLAN that requires a topology convergence due to link up, and it greatly improves the convergence time over BackboneFast for any indirect link failures.

Add a note here Table 3-1 compares various STP protocols in terms of resources needed and convergence times. Currently MST and PVRST+ have become the predominate protocols; therefore, we focus on these protocols in this book.

Add a note here Table 3-1: Comparison of Spanning Tree Protocols
Open table as spreadsheet

Add a note hereProtocol

Add a note hereStandard

Add a note hereResources Needed

Add a note hereConvergence


Add a note hereCST

Add a note here802.1D

Add a note hereLow

Add a note hereSlow

Add a note hereAll VLANs

Add a note herePVST+

Add a note hereCisco

Add a note hereHigh

Add a note hereSlow

Add a note herePer VLAN

Add a note hereRSTP

Add a note here802.1w

Add a note hereMedium

Add a note hereFast

Add a note hereAll VLANs

Add a note herePVRST+

Add a note hereCisco

Add a note hereVery high

Add a note hereFast

Add a note herePer VLAN

Add a note hereMSTP

Add a note here802.1s

Add a note hereMedium/high

Add a note hereFast

Add a note hereVLAN list


Note

Add a note hereIn Cisco switches, PVST+ is the default STP that is enabled when a VLAN is created.


Spanning Tree Protocol Basics

Add a note hereSTP uses the concepts of root bridges, root ports, designated, and nondesignated ports to establish a loop-free path through the network. The following sections discuss the terms root bridge, root ports, designated ports, nondesignated ports in more detail. This section discusses the operation of basic STP as defined in the STP-defining IEEE 802.1D standard.

Add a note here802.1D and its successor protocols provide loop resolution by managing the physical paths to given network segments. STP enables physical path redundancy while preventing the undesirable effects of active loops in the network. STP is an IEEE committee standard defined as 802.1D. Rapid Spanning Tree is defined as 802.1w.

Add a note here STP and RSTP behave as follows:

  • Add a note hereSTP forces certain ports into a standby state so that they do not listen to, forward, or flood data frames. The overall effect is that there is only one path to each network segment that is active at any time.

  • Add a note hereIf there is a problem with connectivity to any of the segments within the network, STP or RSTP reestablishes connectivity by automatically activating a previously inactive path, if one exists.

Add a note here STP Operation

Add a note hereSTP initially converges on a logically loop-free network topology by performing these steps:

  1. Add a note here Elects one root bridge: The protocol uses a process to elect a root bridge. Only one bridge acts as the root bridge in a given network per VLAN. On the root bridge, all ports act as designated ports. Designated ports send and receive traffic and configuration messages, or BPDUs. In the sample scenario in Figure 3-2, switch X wins the election as the root bridge because it has the lower priority parameter.

    Add a note here Click to collapse
    Add a note hereFigure 3-2: STP Operation

  2. Add a note here Selects the root port 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. If a nonroot bridge has two or more equal-cost paths to the root; the nonroot bridge selects the port that has lowest port ID. Port ID consists of a configurable priority + Port number that defaults to the lowest port number when all eligible root ports have equal priority. In the scenario in Figure 3-2, from Switch Y, the lowest-cost path to the root bridge is through the 100BASE-TX Fast Ethernet link.

  3. Add a note here Selects 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 scenario in Figure 3-2, the designated port for both segments is on the root bridge because the root bridge directly connects to both segments. The 10BASE-T Ethernet port on Switch Y is a nondesignated port because there is only one designated port per segment. The switch primarily chooses a designated port as the least-cost path to the root bridge. In the event of a tie, the bridge ID acts as the tiebreaker. Table 3-2 summarizes the port roles in a nondesignated switch.

Add a note here Table 3-2: Port Roles on a Nondesignated Switch
Open table as spreadsheet

Add a note here Port Role

Add a note hereDescription

Add a note hereRoot port

Add a note hereThis 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.

Add a note hereDesignated port

Add a note hereThis 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.

Add a note hereNondesignated port

Add a note hereThe 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.

Add a note hereDisabled port

Add a note hereThe disabled port is a switch port that is shut down.

Add a note hereBy examining the switch port roles on a switch, STP can determine the most desirable forwarding path for data frames.

Add a note hereEach Layer 2 port on a switch running STP exists in one of these five port states:

  • Add a note here Blocking: The Layer 2 port is a nondesignated port and does not participate in frame forwarding. The port receives BPDUs to determine the location and root ID of the root switch and which port roles (root, designated, or nondesignated) each switch port should assume in the final active STP topology. By default, the port spends 20 seconds in this state (max age).

  • Add a note here Listening: Spanning tree has determined that the port can participate in frame forwarding according to the BPDUs that the switch has received so far. At this point, the switch port is not only receiving BPDUs, but it is also transmitting its own BPDUs and informing adjacent switches that the switch port is preparing to participate in the active topology. By default, the port spends 15 seconds in this state (forward delay).

  • Add a note here Learning: The Layer 2 port prepares to participate in frame forwarding and begins to populate the CAM table. By default, the port spends 15 seconds in this state (forward delay).

  • Add a note here Forwarding: The Layer 2 port is considered part of the active topology; it forwards frames and also sends and receives BPDUs.

  • Add a note here Disabled: The Layer 2 port does not participate in spanning tree and does not forward frames.

Add a note hereTo determine its root port (best port toward the root bridge), each switch uses a cost value. Each port link speed is associated to a cost. The cost to the root bridge is calculated using the cumulative costs of all links between the local switch and the root bridge that becomes the path cost.

Add a note hereDefault individual port cost values are

  • Add a note here 10 Gbps link: Cost 1

  • Add a note here 1 Gbps link: Cost 4

  • Add a note here 100 Mbps link: Cost 19

  • Add a note here 10 Mbps link: Cost 100

Add a note hereIn Figure 3-3, switch 0000.1111.3333 has three links that can link to the root bridge. Suppose that all links are 100 Mbps links.

Click to collapse
Add a note hereFigure 3-3: Spanning Tree Port Cost

Add a note herePort 1 and Port 2 would both have a cost of 19. Port 3 would have a cost of 38, which represents the overall path cost (19+19) to reach the root. Port 1 or Port 2 would be elected as root port due to both having lower path cost to the root.

Add a note here When two ports have the same cost, arbitration can be done using the priority value. Priority is a combination of a default value and port number. Default value is 128. The first port will have a priority of 128.1, the second port of 128.2, and so on. With this logic, the lower port is always chosen as the root port when priority is the determining factor.

0 comments

Post a Comment