Introduction to the rapid convergence mechanism of RSTP

Source: Internet
Author: User

First, compare the structure and differences between 802.1D and 802.1W on PDU.

The Spanning Tree Protocol has two types of BPDU:

I. Configuration BPDU:

L in 802.1D, BPDU are automatically generated by each Bridge during the initialization of the production tree. After receiving BPDU with better superior, a better BPDU is used. When the STP domain converges, the configuration BPDU of the entire network is the configuration BPDU of the Root Bridge. Of course, each Bridge may modify the content of the BPDU, such as the SDH mark;

L in 802.1W, The BPDU is all generated by the Bridge, but the Bridge ID of the known Root Bridge is filled in the Root ID. It is important to configure the BPDU generated by the local machine. This directly enables RSTP to refresh the MAC table without waiting for the configuration of the BPDU of the Root Bridge during topology changes.

Ii. TCN BPDU

L in 802.1D, the tcn bpdu is generated by the Bridge that learns that the network topology has changed, and is sent to the Root Bridge from the Root Port (R-Port. The Bridge that receives the tcn bpdu has two actions: 1. Continue forwarding from the R-Port, and expect the R-Port to receive the configuration BPDU of the agent, when the next BPDU configuration is sent, send the configuration BPDU for the specified Port (D-Port) to confirm. Bridge will generate and send the tcn bpdu until it receives the configuration BPDU of the chloroform position. This behavior continues until the Root Bridge receives the tcn bpdu. Then, the Root Bridge sends a new configuration BPDU so that the Bridge of the entire STP domain ages its MAC table and prepares to learn the new topology. Because the convergence behavior of all bridges in the STP domain is driven by the BPDU configured by the Root Bridge, it can be called synchronous convergence;

L tcn bpdu does not exist in 802.1W, because the synchronization in the RSTP domain does not need to be initiated by the Root Bridge. The announcement of Topology ChangeTC) occurs between adjacent bridges. When and only when the D-Port status is from Discarding to Forwarding, you need to use the configuration BPDU of TC placement. This BPDU is only forwarded from the D-Port, and a new Bit of Proposal Bit will be set. This will lead to A series of synchronization operations, that is, A new negotiation mechanism of RSTP: P/A mechanism. Through the P/A mechanism, the convergence behavior in the STP domain occurs between adjacent bridges and completes their own synchronization processes, which can be called asynchronous convergence.

Description of the port status of STP and RSTP:

STP Blocking Listening Learning Forwarding
RSTP Discarding Discarding Learning Forwarding

 

Rstp bpdu:

Protocol ID

Protocol Version ID

BPDU
Type

Flags

Root ID

Root Path Cost

Bridge ID

Port ID

Message Age

Max Age

Hello Time

Forward Delay

Among them, one Flags item is greatly changed compared with STP:

Topology ChangeTC): 1 Bit, which is generated by the Bridge where the STP domain Topology is changed. In STP, the Bridge will generate a tcn bpdu with a TC position and flood the traffic to the Root Bridge. After receiving the message, the Root Bridge continues to flood downstream until all the bridges in the STP domain know the information. In RSTP, BPDU only forwards data between adjacent bridges. Therefore, both tcn bpdu and tcn bpdu take effect only between devices.

Proposal: 1 Bit. It is used to negotiate with the peer end to become the forwarding status. All ports in the Discarding/Learning status, and the generated BPDU place Proposal bits. If the peer Agreement BPDU is received, it enters the Learning status immediately and then enters the Forwarding status.

Port Role: 2 Bit. Used to identify the role used to send the BPDU port.

Learning: 1 Bit. Generate the BPDU of the Learning bit placement on the Learning port.

Forwarding: 1 Bit. Generate the Forwarding bit BPDU for the Forwarding port.

Agreement: 1 Bit. After receiving the BPDU of the Proposal bit placement, if all ports of the Bridge are in the Synced status, the bpdu of the Agreement placement is returned.

Topology Change acknowledgmentchloroform): 1Bit, generated by the Bridge that receives the tcn bpdu, as a response to the Bridge at the peer end.

Port Role: R-Port10), optimal Port from non-root switch to root switch; D-Port11): optimal Port from network segment to root switch; A-Port01): Replacement Port of R-Port; Backup Port01): D-Port replacement Port; Unknown Port00): Unknown role Port; Edge Port: Port of the connection terminal. This definition is not defined in the BPDU package because Edge Port does not send BPDU.

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px "title =" wps_clip_image-19414 "border =" 0 "alt =" wps_clip_image-19414 "src =" http://www.bkjia.com/uploads/allimg/131227/0143052530-0.png "height =" 432 "/>

After introducing the port role, we will introduce how RSTP achieves fast convergence.

First, RSTP defines the changes in the network topology as changes in the port role, which should be easier to understand, the changes in the network topology can be described as the conversion of some network ports between forwarding/blocking states, RSTP clearly defines the port role and port status, which is superior to STP ).

Second, changes in the role of the RSTP port directly affect changes in the port status. R-Port, D-Port, and Edge Port are in the Forwarding state; Alternated Port (A-Port) and Backup Port are in the Discarding state.

I. Forwarding-> Discarding

If a link fails, the port at both ends of the link changes from forwarding to blocking. From the purpose of generating the Tree Protocol, the network will not form a loop. RSTP only needs to find the port in the appropriate blocking mode and convert it to the forwarding mode so that the topology can be re-connected. Since the R-Port backup Port A-Port has been allocated during calculation, if the R-Port is changed from the forwarding state to the blocking state, then, the corresponding A-Port is changed to the forwarding state. Similarly, the D-Port Color can also be set to the corresponding Backup Port for forwarding. Edge Port does not affect the calculation of the spanning tree, so it is ignored. In this way, when the port status changes from forwarding to blocking, RSTP is not familiar with re-computing. It seems that the standby path algorithm is not directly used for computing. You must have thought of DUAL ).

Ii. Discarding-> Forwarding

The connectivity of a link may lead to the generation of tree domain loops. In RSTP, this behavior is defined as converting the D-Port from the blocking state to the forwarding state. The relative check mechanism should be the P/A mechanism, that is, from the D-Port that needs to enter the forwarding state, we recommend that you synchronize the Peer to enter the forwarding state after receiving confirmation.

After receiving the "suggestion" message, the peer Bridge blocks all its D-ports and returns the "agree" message to the "suggestion" message sender, synchronize its own ports. Synchronization can be divided into two types: If the Port is E-Port, or if it is originally a non-forwarding state, it is "synchronized"; if the Port is originally a forwarding state, it is re-entered the forwarding state, the peer side will be "recommended" and waiting for confirmation.

The following uses the example to demonstrate the P/A mechanism process:

1) create a new link between B and E, and select the port role first;

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px "title =" wps_clip_image-31993 "border =" 0 "alt =" wps_clip_image-31993 "src =" http://www.bkjia.com/uploads/allimg/131227/0143056353-1.png "height =" 400 "/>

(2) B and e exchange BPDU through this link. Because the BPDU sent by Port B is superior to the superior ior, Port B is assumed D-Port. At the same time, E receives better BPDU from B than from C. Therefore, E converts the Port connecting B to the Root Port and the Port connecting C to the-Port. It should be noted that RSTP has improved the root Port forwarding compared with STP. Once the old R-Port is determined not to be forwarded, and the new R-Port is determined, then the new R-Port enters the forwarding state immediately;

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px "title =" wps_clip_image-18890 "border =" 0 "alt =" wps_clip_image-18890 "src =" http://www.bkjia.com/uploads/allimg/131227/0143056349-2.png "height =" 401 "/>

(3) Port B is still in Discarding state and is expected to enter the Forwarding state. Therefore, it will send the "Proposal" BPDU configuration from the D-Port to E; e. After receiving the BPDU, it enters the synchronization status: changes all forwarding ports to discard, and checks the port synchronization status;

650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px "title =" wps_clip_image-8277 "border =" 0 "alt =" wps_clip_image-8277 "src =" http://www.bkjia.com/uploads/allimg/131227/0143055944-3.png "height =" 400 "/>

4) according to the synchronization principle, only the port connecting D in E is in forwarding state. Therefore, E continues to block the port and returns the BPDU with "agree" to B. Since then, the B-E link enters the completed synchronization and traffic is forwarded immediately; and because D connects E to the Port A-Port, do not forward BPDU, therefore, the "Proposal" BPDU sent by ewill not be returned by the "Agreement" BPDU. The port remains congested.

This article from the "Bitter Gourd" blog, please be sure to keep this source http://golehuang.blog.51cto.com/7499/986975

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.