Section 4.11: Advanced Spanning-Tree Protocol
4.11.1: Rapid Spanning Tree Protocol (RSTP)
RSTP determines the manner in which switches should relate with one another in order to ensure that the network topology is effectively loop-free. RSTP's basic capabilities can be used on a per switch basis or as multiple occurrences. RSTP functions constantly in each approach. Duplicating RSTP as multiple occurrences needs another approach.
4.11.1.1: RSTP Port Performance
RSTP accomplishes its speedy character by allowing each switch to interrelate with its switch partners via each port. Interrelation is based on a port's role and not the BPDUs that are transmitted from the Root Bridge. A role and a state that decides on what it does to incoming frames are determined for each port. RSTP therefore defines port states in accordance to how it handles incoming frames. A Root Bridge is chosen in the same manner as with 801.D. Next, the following port roles are decided on:
• Root Port: This is the same as the 802.1D method, whereby the one switch port on each switch with the better root path cost to the Root is assigned the role.
• Designated Port role is assigned to the switch port on a network segment that has the better root path cost to the Root.
• Alternate Port role is assigned to the port that has a different path to the Root.
• Backup Port role is assigned to a port that supplies a redundant link to a network segment on which another switch port already connects.
Any of the above ports can have the following states: Discarding (Frames are dropped), Learning (MAC addresses are learned, frames are dropped), and Forwarding.
4.11.1.2: BPDUs and RSTP
RSTP makes use of 802.1D BPDU set-up for backward compatibility. A transmitting switch port is identified by its assigned RSTP role and state. The RSTP interactive process enables two neighbouring switches to negotiate port state changes and a number of BPDU bits are utilized to mark messages during this process.
BPDUs are sent from each switch port at Hello Time intervals and in turn, each switch can anticipate getting frequent BPDUs from their switch neighbours. Every switch can therefore partake in preserving the topology. A switch neighbour is assumed to be down when three successive BPDUs are missed. This enables a switch to determine that a neighbour is down in three Hello intervals.
In order to differentiate RSTP BPDUs from 802.1D BPDUs, the BPDU version is fixed to 2. Because RSTP differentiates its BPDUs from 802.1D BPDUs, it can exist with switches using 802.1D. Each port tries to function according to the STP BPDU that it receives.
4.11.1.3: RSTP Convergence
STP convergence occurs when switches are brought from an independent state to a uniform state, and each switch has a location in a loop free topology. Each switch is able to identify the Root Bridge. To avoid loops, each switch port is taken from the Blocking state to the proper state. This process can be time consuming.
RSTP uses another method: RSTP necessitates a switch to determine or base its forwarding decisions on the Port Type when it becomes a member of, or identifies a failure in the topology.
Each switch port can be one of the port types listed below:
• Edge Port: This is a port at the edge of the network that cannot form a loop where a single host connects.
• Root Port: This is a port which has the best cost to the root of the STP instance. One Root Port is chosen and is active at any point in time. An Alternate Root Port and can be instantly put in the Forwarding state when an existing Root Port fails.
• A Point-to-Point Port is a port that links to another switch and turns into a Designated Port. A quick handshake takes place with a neighbouring switch to determine the port state. BPDUs are exchanged in the shape of a proposal and an agreement message. One switch proposes that its port becomes a Designated Port, and the other switch agrees by responding with an agreement message. Point-to-point ports are automatically decided on through the duplex mode being utilized.
Full-duplex ports are regarded as point-to-point ports because STP convergence can speedily occur over a point-to-point link by means of RSTP handshake messages. Only two switches can be present on the link.
Half-duplex ports are not point-to-point ports because more than two switches can be present. 802.1D convergence is utilized and results in a slower response time.
By an exchange of BPDUs, two switches can speedily converge to determine which one is the Root, and which one will possess the Designated Port. In a bigger network where 802.1D BPDUs are usually relayed from switch to switch, RSTP manages the entire STP convergence as a spread of handshakes across point-to-point links. At the time a switch needs to make an STP decision, it does a handshake with the nearest switch neighbour. The handshake series moves to the next switch and the next, and so forth, towards the edge of the network.
A synchronization process takes place to ensure that a switch does not initiate a bridging loop before moving the handshake out. A switch must decide on the state of each of its ports in order to partake in RSTP convergence. The switch exchanges a proposal agreement handshake to determine the state of each end of the connection.
Each switch presumes that its port should be the Designated Port for the segment, and sends a proposal message signifying this to its neighbour. The receiver of the proposal efficiently separates itself from the rest of the topology. Nonedge ports are blocked until a proposal message can be sent. This causes the closest neighbours to synchronize themselves and this generates a moving process of synchronizing switches. The switches speedily determine to commence forwarding on their links when their neighbours consent.
The following procedure takes place when a switch receives a proposal message:
• A local switch comprehends that its port must be the Root Port when it receives a proposal with a superior BPDU. The sender should be the Designated Switch
• Before assenting to this, the switch synchronizes itself with the topology.
• Nonedge ports are at once placed into the Discarding state to prevent the formation of bridging loops.
• An agreement message that signifies that the switch is in accordance is returned to the sender. The message also indicates to the sender that the switch is busy synchronizing itself.
• The Root Port is straight away placed to the Forwarding state and the sender's port can too begin forwarding.
• A proposal message is sent to the relevant neighbour for every nonedge port presently in the Discarding state.
• An agreement message is received from a neighbour on a nonedge port. The nonedge port is then instantly shifted to the Forwarding state.
4.11.1.4: RSTP and Topology Changes
RSTP senses a change in topology only at the time that a nonedge port moves to the Forwarding state because it utilizes quick convergence to stop bridging loops from developing. Topology changes are thus perceived only to enable bridging tables to be updated and fixed when hosts first emerge on a failed port, and then on another operating port. The process is like the convergence and synchronization processes.
A switch broadcasts a topology change (TC) message that then spreads through the network to other switches. This allows switches to correct their bridging tables. BPDUs that have their topology change specified are transmitted out on all of the nonedge designated ports until the TC While timer expires. The TC While timer expires after two times the Hello time and this informs neighbouring switches of the TC and the new link. MAC addresses related with the nonedge Designated Ports are discarded from the content-addressable memory (CAM) table. In addition, neighbouring switches that receives the TC messages must discard of MAC addresses learned on all ports, excluding the one on which the TC message was received. That switches have to next send TC messages out of their nonedge Designated Ports. Addresses have to be learned of again.
4.11.1.5: Configuring RSTP
RSTP is a means that a Spanning Tree mode can use in order to detect topology changes and converge a network into a loop free topology. To use RSTP, MST or RPVST+ must be enabled. RSTP configuration affects the Port Type. Remember that the Port Type is used to decide on how a switch negotiates topology information with its switch neighbours.
The following command is used to configure a port as a RSTP edge port:
Switch(config-if)# spanning-tree portfast
Recall that this command is used during 802.1D STP configuration. RSTP automatically determines that a port is a point-to-point link when it is functioning in fullduplex mode. This default can be overridden.
A port connecting to another switch could be functioning at half-duplex. The following command is used to compel a port to operate as a point-to-point link:
Switch(config-if)# spanning-tree link-type point-to-point
4.11.2: Multiple Spanning Tree Protocol (MSTP)
Multiple Spanning Tree Protocol (MSTP) was brought about to attend to the shortage of, and excess of STP instances. MST defined in the IEEE 802.1s standard, and was developed on the notion of mapping one or more VLANs to a single STP instance. Multiple instances of STP can be used by way of each instance supporting a different set or group of VLANs. This enables the network administrator to accurately configure the number of STP instances that is required for a network. To execute MST in a network the administrator needs to determine the number of STP instances required to support the wanted topologies and whether to map a group of VLANs to each instance.
4.11.2.1: MST Regions
MST differs from 802.1Q and PVST+. When a switch is configured to use MST it has to determine which of its neighbouring switches are using which STP type. This is accomplished by configuring switches into common MST regions.
Each switch within a region carries out MST that is defined by the following parameters:
• MST configuration name,32 characters
• MST configuration revision number, 0 to 65535
• MST instance-to-VLAN mapping table, 4096 records/entries
Two switches are part of the same MST region when they have the same qualities. Switches belong to two independent regions when these attributes do not match. Switches that receive MST BPDUs can compare the configuration qualities of these BPDUs with their own local MST configurations. To facilitate quicker comparison, a code calculated from the MST instance-to-VLAN mapping table contents is sent, instead of the whole table. The STP instances in MST are shared as being part of the same region when a match occurs. A switch is perceived to be located at the MST region boundary when a mismatch occurs. Here one region meets traditional 802.1D STP or another region.
4.11.2.2: Spanning Tree Instances in MST
CST enables a loop free topology with the links that connect regions to one another, as well as to standalone switches running 802.1Q CST. It integrates all methods of STP being used. Because CST is clueless on what each region contains, Internal Spanning Tree (IST) instance figures out a loop free topology within each MST region.
Therefore, an IST instance operates to figure out a loop free topology between the links where CST meets the region boundary, and it also calculates a loop free topology for every switch within the region. A single CST is seen to be in operation because BPDUs are exchanged at the boundary of the region only across the native VLAN of trunks. IST portrays the region as a single virtual bridge to the CST exterior. All VLANs are automatically mapped to an IST instance and should be overridden if need be. An IST instance must be active on each port on a switch irrespective of whether that port holds VLANs that are mapped to IST.
The MST instances (MSTIs) live next to the IST within a region. Cisco supports a majority of 16 MSTIs in every region with IST always being MSTI 0. MSTI numbers 1 through 15 can be used. As an example, four independent STP instances can exist together within MST: MSTI 1, MSTI 2, MSTI 3, with IST existing as MSTI 0.
One BPDU is necessary to communicate STP information on all other active instances because information on every MSTI is attached to the MST BPDU as an M-record. Just MSTI 0 can transmit and acquire MST BPDUs. The MSTIs joins with the IST only at the boundary of the region and forms a subtree of CST. Only IST BPDUs are conveyed in and out of a region.
MST can determine whether a MST region connects with a switch running PVST+. It does this by listening to BPDUs and concludes that PVST+ is being used when BPDUs are heard from more than one VLAN. At the time that the MST region transmits a BPDU in the direction of the PVST+ switch, IST BPDUs are simulated into every single one of the VLANs on the PVST+ switch trunk 4.11.2.3: Configuring MST
The MST configuration on each switch in a region is done manually. The set of commands used to define the STP region is listed in below.
The following command is used to enable MST on a switch:
Switch(config)# spanning-tree mode mst
Use the next command to specify the MST configuration mode:
Switch(config)# spanning-tree mst configuration
Enter a region configuration name:
Switch(config-mst)# name name
Enter a region configuration revision number:
Switch(config-mst)# revision version
Next, map VLANs to an MST instance:
Switch(config-mst)# instance instance-id vlan vlan-list
The instance-id of 0-15 contains topology information for the VLANs that are listed in vlan-list.
Use the following command to verify the MST configuration changes:
Switch(config-mst)# show pending
The following command commits changes to the active MST region configuration:
Switch(config-mst)# exit
Table 4.1 lisst MST Configuration Commands
Table 4.1: MST Configuration Commands
Command Syntax
Function
Sets the Root Bridge
Sets the Bridge Priority
Sets Port Cost Sets the Port Priority
Sets the STP Timers
spanning-tree ms t bridge-priority
spanning-tree mst instance-id root {primary | secondary} [diameter diameter]
instance-id priority spanning-tree mst instance-id cost cost
spanning-tree mst instance-id port-priority port-priority
spanning-tree mst hello-time seconds spanning-tree mst forward-time seconds spanning-tree mst max-age seconds