RSTP network of primary articles (principle and configuration)

A, RSTP generation

  Previous article written when the network topology changes, STP convergence speed takes about 30 seconds -50 seconds will continue to forward data. Such time spent in actual production environments is very long, so RSTP (Rapid Spanning Tree Protocol) have come into being.

Two and distinguishing, RSTP and STP's

  1, the difference between the role of the port

  

  In RSTP, two new two port roles (Backup and Alternate). Wherein, Backup port as a backup device unbridged designated port. Alternate port as a non-root bridge device port. Normally, Alternate and Backup port as port Disabeld state. When the root port or designated non-root bridge on the port there is a problem, most will immediately enable the new root port or a designated port.

  2, special "designated" Port

  In RSTP, designated the special port to the port edge. The edge port is generally connected to the bridge port with the host device, it does not receive a BPDU packets, do not participate in operation of RSTP. If RSTP edge port receives a BPDU, the port edge port immediately lost property, and to become normal spanning tree port. May be directly converted by Disabeld (closed) state directly to the Forwarding (forwarding) state (does not undergo a change of state delay port).

Three, STP configuration BPDU Flags field in the packet has been applied in RSTP.

  

  Four, RSTP convergence process.

  1, root bridge election.

  Initially, all of the bridge device considers itself the root bridge, all ports are in the Discarding state, port role for the specified port. And sends out its RST BPDU. When a port bridge device received from RST BPDU sent by another bridge, the bridge device with its own RST BPDU will make a comparison. If the RST BPDU itself better than the received RST BPDU, it will be discarded, and it will respond to its own RST BPDU. If the received RST BPDU better than their RST BPDU, it will stop sending RST BPDU, the received RST BPDU replace the original itself RST BPDU, a bridge receives all designated set all downstream ports, the Discarding state, if Alternate or downstream port is an edge port, the port status remains unchanged.

  2, root port election

  When the bridge device downstream port all the Discarding state, the bridge will send a reply RST BPDU to the root bridge. Flags within the BPDU in this field has Agreenment flag and port role. This process, in accordance with the root of the root port of STP election elected immediately by the Discarding state to the Forwarding state.

  3. Election of the specified segment port

  STP is consistent with the way the elections specified port. When the upstream device receives BPDU Agreement axle set, the designated port state immediately by the Discarding state to the Forwarding state. Port role becomes the designated port.

   4, blocked ports

   When the selected root ports and designated ports, all of the remaining non-edge ports are all Discarding state, as a backup to the backup port designated root port. Under normal circumstances is blocked.

Note: ① a lower edge of the port is generally connected to the bridge port with the host device, does not receive a BPDU packets, do not participate in operation of RSTP. If RSTP edge port receives a BPDU, the port edge port immediately lost property, and to become normal spanning tree port.

  After ② When the topology is stable, regardless of whether the non-root bridge switch receives a BPDU from the root bridge, according to the non-root bridge will switch Hello Time interval (2 seconds by default) sends out the BPDU.

Fifth, failure

  In RSTP, when the bridge device within the 3 Hello Time time (6 seconds) has not received BPDU from the upstream switch, the upstream communication will be considered a failure and a bridge device, then the TC BPDU will be sent out to notify the upstream the bridge device clears its MAC address entries, when the upstream bridge device receives TC BPDU, clears the MAC address entry ports except the receiving port and continues to send the TC BPDU outwardly. During this time a failure or malfunction is detected RSTP bridge device will re-calculations to determine the root port and other ports.

Six, RSTP is compatible with STP

  Both are compatible, but not recommended. Because of this cause because of the STP RSTP convergence slower, thus losing the rapidity of RSTP.

Seven, RSTP three "protection"

  1, the loop protection.

  And STP, due to a blocked port, which makes the bridge between devices while maintaining the security and redundancy between network topology of the loop, bridge equipment, but also to avoid such a loop is similar to a broadcast storm brought The problem.

  2, protection edge port.

  Edge port receives a BPDU, it does not participate in RSTP calculation. When the edge port receives a malicious attack, it received a BPDU, spanning tree will be recalculated, causing network instability. Faced with this problem, the edge port protection, when the edge port receives a BPDU, the port will be shut down immediately, or can be set to automatically restore the need for manual recovery by the administrator.

  3, root protection

  In the spanning tree root bridge configuration BPDU is optimal, but do not dismiss the possibility of configuration errors or malicious attacks, thereby sending any better configuration BPDU, so that the recalculation of the spanning tree network oscillation caused by traffic congestion . So with root protection function to solve this problem.

  Root protection and protect the root bridge by maintaining the designated port role. Once this feature is enabled designated port receives a higher priority configuration BPDU, port state will immediately enter Discarding (STP in Listening) does not forward data. A period of time (usually twice the Forward Delay) useless port receives any better configuration BPDU again, the port will revert to Forwarding state.

  Root protection only in designated ports in the port, the port can not be configured or blocked on the edge of the port.

 

Guess you like

Origin www.cnblogs.com/641055499-mozai/p/11622532.html