Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Summary and comparison of traditional STP, Rapid STP and MSTP

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

I. BPDU type

1. Traditional spanning tree: includes two kinds of BPDU, one is configuration BPDU, the other is TCNBPDU, the configuration BPDU is sent by the root bridge every Hello time, and the TCNBPDU is sent out from the root port by the bridge aware of the topology change. The Flag in the configuration BPDU includes two fields, bit 7 is TCA and bit 0 is TC. The configuration BPDU of the TCA setting indicates that an upstream switch receives the TCN sent downstream and makes a reply, confirming that the topology has changed. The BPDU of the TC setting is sent from the root bridge to inform the whole network that the topology has changed, and inform all switches to change the aging time of the MAC table to 15 seconds.

two。 Fast spanning tree: there is only one BPDU, called RST BPDU, whose BPDU type has been changed to 0X02; all 8 bits in its Flag are used, Topology Change Ack, Agreement, Forwarding, Learning, Port Role (2 bits), Proposal, Topology Change.

3. In the BPDU of MSTP:MSTP, there is a field of MST Exension, which includes the relevant information of CIST and the relevant information of each MSTI. The content of each MSTI is equivalent to the content of RST BPDU.

Traditional spanning tree grab package:

Rapid spanning tree capture package:

MSTP grabs the package:

Second, convergence

1. Traditional STP:30-50 seconds

a. Direct link failure (link DOWN), if the switch failure port at one end of the failed link is the root port, and the switch has a reserve port, then the convergence time is 30s; if the switch failure port at the one end of the failed link is the root port, it has no reserve port, only the designated port, then the convergence time is 50s. Why is there a 20-second difference? If the switch loses the root port, it will send its own configuration BPDU. If, before the link goes down, the interface on the local side is AP, the opposite end is DP, and the suboptimal BPDU sent by the local side, the peer DP will respond to the optimal BPDU immediately after receiving it, so there is no need to wait for 20 seconds to time out. If the local interface is DP and the peer is AP before the link is disconnected, the original AP port of the peer will have to wait 20 seconds before it times out after sending its own-rooted sub-optimal AP, so it will take 50 seconds.

b. Indirect link failure (HUB link, or BPDU filtered, etc.): need to wait for 20s timeout, need 50s convergence.

two。 Fast spanning tree: defined as converging within seconds

a. Elect a new root port: elect a new root port, there is no loop risk, so the new root port can directly enter the forwarding state.

b. Edge port: the edge port is used to connect devices such as hosts, without causing loop risk, and is manually configured by the administrator. Therefore, if you do not participate in the calculation of STP, you can immediately enter the forwarding state.

C. DP A mechanism: on the point-to-point link, the DP initiates the synchronization mechanism of Pamp A, that is, the upstream switch sends the Proposal-set BPDU at the DP, and if the port received by the downstream switch is RP, the synchronization process will be carried out, and the other ports in the forwarding state of the switch will be set to the Discarding state and the RP will be set to the forwarding state; at the same time, the Agreement-set BPDU will be sent to the upstream; this completes a round of synchronization The downstream switch initiates the Pamp A synchronization process to the DP.

d. Receiving secondary BPDU does not need to wait for Max_age timeout. Unlike traditional STP, whether AP or DP, port role operation will be performed immediately as soon as secondary BPDU is received; if BPDU is not received in twice Hello time, the BPDU will be aged and STP operation will be performed if the secondary BPDU timeout is 3 times the BPDU timeout.

e. In the case of failed negotiation of pram An or shared link, it is necessary to wait for twice the forwarding delay according to the traditional STP method before convergence.

III. TCN

1. Traditional STP: the port from not forwarding to forwarding or from forwarding to non-forwarding is considered to have undergone a topology change.

a. The switch that senses the topology change continues to issue TCN BPDU from the root port

b. When the upstream switch receives the TCN BPDU, it will respond to a TCA-set configuration BPDU; (only the designated port will handle it)

c. After the switch aware of the topology change receives the TCA set BPDU of the upstream switch, it no longer sends the TCN BPDU.

d. The upstream switch propagates TCN BPDU from its root port.

e. This process is uploaded to the root bridge at one level.

f. When the root bridge knows that the topology has changed, it will send the TC-set configuration BPDU and flood it to the whole network; the root bridge will continue to send the TC-set configuration BPDU, which is the time of Max age + Forwarding delay

g. The downstream switch that receives the TC setting changes the aging time of the MAC address from 300s to 15s

On Huawei devices: configure traditional STP. TCN will be generated only when the port transitions from never forwarding to forwarding state. Port DOWN will not trigger TCN;. When the switch receives the TC-set BPDU, instead of changing the MAC aging time to 15 seconds, it will directly empty the MAC address table.

2. RSTP: only when a non-edge port enters the forwarding state will it be defined as a topology change (no TCN will be generated when the connection is lost, and no TCN will be generated when the port enters the blocking state).

a. Notification is generated by a switch that is aware of a change in the topology, which spreads the BPDU set by TC to non-edge DP and RP

b. Start the TC While timer for the forwarding port, which is twice the Hello time (if the TC While times out, stop sending the TC-set BPDU)

c. Clear the MAC address table for ports other than edge ports

d. After the neighbor switch receives the TC-set BPDU, it clears the learned MAC address on all ports (except the port that receives topology changes), starts the TC Whilie timer, and sends the TC-set BPDU on the non-edge designated port and the root port. Spread to the whole network in this way.

IV. Port status

1. Traditional STP includes five port states

A. Disabled: in this state when the port is not enabled.

B. Listening: participate in STP operations, elect port roles, receive and send BPDU, do not learn MAC, do not forward data frames

C. Learning: receive and send BPDU, learn MAC address, and do not forward data frames

D. Forwarding: receive and send BPDU, learn MAC address, forward data frame

E. Blocking: receive but not send BPDU, do not learn MAC addresses, and do not forward data frames

2. RSTP:

a. Abandon the three states of Disabled, Listening and Blocking

b. Added Discarding state: this port state does not learn MAC addresses, does not forward data frames, and participates in STP operations.

Port role

1. Traditional spanning tree

a. Root port: each root bridge elects a root port, which has the lowest Cost to the root bridge.

b. Designated port: each network segment (link) elects a designated port, which is optimal on this network segment. Forward the data of the network segment to the root bridge, and forward the data sent from the switch direction to the connected network segment.

c. Blocked port: blocked port. In STP, except for root port and designated port, all ports are blocked ports (Huawei also has DP and BP in traditional STP)

two。 Rapid spanning tree: new port roles defined

A. Alternate Port: when a port receives a configuration BPDU from another switch and is in a blocked state, it is the standby port. It is a port that fails to compete for the root port and is a backup of the root port.

B. Backup Port: if a port can receive the configuration BPDU sent by this switch and is not the optimal port on this network segment, it is selected as the backup port, and the backup port is the backup of the designated port.

3. MSTP: a new port role is defined

a. Domain edge port: the port at the boundary of the Region, and the link end of the edge port is another Region.

B. Master port: the root port of IST in the area where the CIST root bridge is not located, which is called the Master port in other instances. It is the smallest Cost port in a Region to the root bridge of CIST.

VI. Basic configuration

1. Global switch

Enable STP: stp enable

Close STP: stp disabled | undo stp enable

two。 Time factor: a value unique to Huawei for Hellotimeout. This time factor is not included in the standard protocol. Huawei defines it as 3 by default.

Stp timer-factor

3. Modify Hello time: stp time hello. Default is 200cm / s, that is, 2S. This value is not recommended. In the same way, you can modify forwarding delay and maximum aging time.

4. Traditional STP

Stp mode stp

3. Fast STP

Stp mode rstp

4. Multiple spanning tree: switches in the same region must have the same configuration ID, and the configuration ID includes three parameters: area name, revision number, and mapping relationship. When MSTP exchanges messages, it passes the MD5 value of the configuration ID. If it matches, it is considered to be in a Region, and if it does not match, it is considered not a Region. After the configuration is complete, you need to activate the configuration before MSTP can take effect.

Stp region-configration

Region-name CDE

Revision-level 10

Instance 2 vlan 10

Instance 3 vlan 20

Active redion-configration

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report