802.1W Spanning Tree
It takes 50 seconds for the 802.1D spanning tree to open a blocked port to work, which greatly affects user communication, to this end, the developed fast Spanning Tree Protocol RSTP-Rapid STP) improves this situation.
The standard for fast tree generation is, which is a development of. Therefore, the main terms and parameters of 802.1D remain unchanged in 802.1W, this allows users familiar with 802.1d to quickly learn how to use the quick spanning tree. The switch port running the fast Spanning Tree Protocol can also be used on the same network segment as the switch port running the 802.1D protocol, but the disadvantage is that it will lose the "fast" feature. The final topology calculated by 802.1w is exactly the same as that calculated by 802.1d, mainly because it saves the time required for switching the port status and there is no forwarding delay timer ). In addition, 802.1W is not supported on all vswitch platforms and has requirements for the operating system version. Please refer to the relevant product documentation when using it.
1. Port Status
802.1d defines four port statuses: listening, learning, forwarding, and blocking. From the running point of view, the ports in the blocking status are no different from those in the listening status. They do not forward data or learn addresses, the difference is that 802.1d assigns different roles to them. Similarly, once a port is in the forwarding status, it cannot be distinguished whether it is a root port or a specified port. RSTP separates the port status from the port role to solve these problems.
802.1w defines the port status in 3, which corresponds to the possible running status in 3. 802.1w combines the disable, blocking, and listening States defined by 802.1d into discarding states. The other two States are learning and forwarding. Table 11-1 lists the statuses of ports 802.1d and 802.1w.
802.1d port status |
802.1w port status |
In the active topology? |
Learn about MAC addresses? |
Disable |
Discarding |
No |
No |
Blocking |
Discarding |
No |
No |
Listening |
Discarding |
No |
No |
Learning |
Learning |
No |
Yes |
Forwarding |
Forwarding |
Yes |
Yes |
Table 11-1 port status comparison between 802.1d and 802.1w
802.1d port status 802.1w port status in active topology? Learn about MAC addresses?
Disable Discarding No
Blocking Discarding No
Listening Discarding No
Learning No Yes
Forwarding Yes
2. Port role
802.1w defines four port roles. The root port role and the specified port role remain the same as the meaning defined in 802.1d. In order to quickly converge, The RSTP port is elected as a New Root port in the topology change. The port enters the forwarding status immediately and is no longer in the listening and learning phases. The blocking role defined in 802.1d is divided into two types in 802.1w, namely replacing the port role alternate port role) and backup port role ).
The alternative port role is a discarding port that can receive the BPDU of another vswitch. Once the root port of the vswitch fails, this port immediately enters the forwarding status and replaces the failed root port to establish a connection with the root bridge, without waiting for 30 seconds of forwarding delay. As shown in 11-13, the port below vswitch A can receive the BPDU forwarded by vswitch B, and the current status is discarding, so it becomes an alternative port role. Once the root port of A fails, it will immediately change to the forwarding status.
650) this. width = 650; "src =" 51cto.com/uploads/allianz 111018/12243911y-0.jpg "border =" 0 "/> Figure 11-13 replacing the port
The backup port is different from the replacement port. The backup port is not responsible for the failure of the root port and is on the same vswitch as the backup port. Backup is performed for the specified port in the same network segment. The backup port is the discarding port that can receive the bpdu of the same vswitch. As shown in 11-14, the right port of vswitch B serves as the backup port of the current specified port.
650) this. width = 650; "src =" 51cto.com/uploads/alli%111018/1224%110-1.jpg "border =" 0 "/> Figure 11-14 backup Port
The election principle of the final topology used by the RSTP computing spanning tree is the same as that used by 802.1d to compare the equivalent value of switch ID and path cost ), by defining different port statuses and port roles to separate the statuses of ports and their functional roles in RSTP, more information can be provided to accelerate topology convergence.
3. Edge port and link type
Fast Convergence is an important feature of RSTP. To achieve fast port convergence, 802.1w defines two new parameters: edge port) and link type ).
1) edge port: the port directly connected to the end station of the terminal host is called the edge port. Because such ports do not generate loops in the network, they can directly enter the forwarding status and skip the listening and learning stages. This type of port does not generate topology changes when the topology changes. However, once a BPDU is received, it will lose the edge port attribute and become a common Spanning Tree Port. You can set the edge port using the portfast parameter.
2) link type: PORTS running in full duplex mode are considered as point-to-point ports. The links formed by these ports are called point-to-point links ). RSTP can quickly switch to the forwarding status through negotiation on point-to-point ports. Compared with a point-to-point link, a link in half duplex mode is considered as a shared link ).
4. 802.1W features
When the topology changes, the 802.1d Spanning Tree Protocol computes a new topology that is very fast. The problem is that when a port is selected as a specified port, it takes 30 seconds to forward the delay, this means 30 seconds of Data interruption. The reason is that 802.1d does not have a feedback mechanism to notify the network that has actually reached convergence in a few seconds. 802.1w adopts the feedback mechanism and other features to quickly switch the port to the forwarding status. These features include:
The processing of BPDU varies with 802.1w. The non-root bridge keeps sending BPDU. By default, one is sent every 2 seconds, even if it does not receive any BPDU of the root bridge, this is not the case for 802.1d. Here, BPDU actually act as the survival signal keepalive between switches. Once three BPDU data in a row are not received by the switch, it will think that the connection to the direct root bridge or the specified bridge is lost.
Faster information aging mechanism. If a given port fails to receive three BPDU in a row from its neighbor, the protocol information will be aging immediately. This rapid information aging method allows the link failure to be quickly detected.
802.1w uses a negotiation mechanism called proposal/agreement ). In the 802.1d environment, after a port is selected as the specified port, it takes a forwarding delay time to reach the forwarding status. 802.1w does not use any timer, and uses the negotiation method to quickly reach the forwarding status.
Topology change TC) information is transmitted by each switch to the network, rather than relying on the root bridge as 802.1d.
5. 802.1W running process
Note that the final topology calculated by 802.1w and 802.1d in the same environment is consistent, except that their steps differ from the time required for convergence.
The topology shown in Figure 11-15 below explains the running process of the fast generation tree. In this example, assume that there is A non-direct connection path between Switch A and root) through C and D. When A direct connection link is added between them, the following process will occur.
1) after a new link is established, the ports at both ends of the link are immediately in discarding status, which is no different from 802.1d. The difference is that at this time A and root will initiate A negotiation, as shown in the exchange BPDU11-15 between the two parties), the BPDU root sends to switch A is called proposal. Once A receives a bpdu from the root, it blocks its non-edge port. This operation is called sync, which means synchronizing information with the new root bridge BPDU ). Once sync ends, switch A will explicitly authorize the switch root to put its port in the forwarding status. The BPDU sent to the root is called agreement ).
2)
Tip: The Edge port and the port in discarding state are considered to have been synchronized.
650) this. width = 650; "src =" 51cto.com/uploads/allianz 111018/12243953b-2.jpg "border =" 0 "/> Figure 11-15 process 1
2) When switch A blocks its non-edge port, the link between it and the root is changed to forwarding. In this phase, the newly blocked port on vswitch A will also send proposal BPDU to its neighbor ports on B and C respectively ), try to quickly switch to the forwarding status 11-16), then sync is performed on both links. Assume that vswitch B only has edge ports, so it can immediately authorize A to send agreement BPDU in the forwarding status ). Assume that vswitch C also has two edge ports, so vswitch C only needs to place the port connected to D in discarding to authorize A to put the port in forwarding state, and then the process enters step 3.
650) this. width = 650; "src =" 51cto.com/uploads/allianz 111018/1224396094-3.jpg "border =" 0 "/> Figure 11-16 example of process 2
3) the port of switch C negotiates with the port of the adjacent switch D and enters the sync operation. If the port of D is not selected during the election process and becomes an unspecified port, it is in the discarding state and has been synchronized ), switch C's port is changed to the forwarding status. As shown in the final topology 11-17, Port D is blocked on the link between D and C.
650) this. width = 650; "src =" 51cto.com/uploads/allianz 111018/12243a547-4.jpg "border =" 0 "/> Figure 11-17 process 3
The above process shows that RSTP does not adopt any timer, but uses a negotiation mechanism to quickly change the port to the forwarding status, bypassing the forwarding delay of 30 seconds. To effectively use the fast convergence feature of RSTP, the administrator should pay attention to the following two points:
The negotiation may only happen between switches connected by a point-to-point link.
The role of the edge port is even more important and must be correctly configured. Otherwise, convergence will be affected.
Generation tree Running Mode
The CISCO standard and IEEE Standard adopt different methods to run the production tree. Therefore, the generation tree running on the switch has the following methods:
VLAN-based spanning tree (PVST): It is a dedicated implementation method for CISCO to run one spanning tree for each VLAN. ISL encapsulation is required.
Public Spanning Tree CST): CST is a solution for VLAN and Spanning Tree in the 802.1Q. All VLANs run a spanning tree, And the BPDU information runs on vlan1.
Enhanced PVSTPVST +): To support the 802.1Q standard, CISCO expands PVST to become PVST +. The running mode is based on 802.1D.
VLAN-based Rapid generation tree Rapid PVST +): A 802.1W-based generation tree.
Multi-Tree Spanning Tree (MST-Multiple Spanning Tree): This method is different from PVST and CST. It is neither a VLAN Tree nor a Tree with all VLANs, but a Tree with Multiple VLANs. MST is based on 802.1s and 802.1 w and is compatible with CST and PVST.