As shown in, the STP protocol can only solve the loop shown in Figure A. If a vswitch downlink has a loop, the upper-layer switch may be paralyzed, and the STP protocol cannot solve this problem, in this case, you must use other solutions.
I. Cisco switches
1. Enable portfast globally
Spanning-tree portfast default
2. Enable BPDU protection under the interface
Spanning-tree bpduguard enable
3. Enable BPDU protection for all ports globally
C3560G-1 (config) # spanning-tree portfast default
C3560G-1 (config) # spanning-tree portfast bpduguard default
When a loop occurs in the network, run the following command to check the port from which the loop comes from.
Ii. H3C Switch
1. Enable loop detection globally and set the detection Interval
? Loopback-detection enable
? Loopback-detection interval-time 5
2. Enable loop detection under the interface
[H3C-S5120-GigabitEthernet1/0/12] loopback-detection enable?
When a loop occurs in the network, run the following command to check the port from which the loop comes from.
[H3C-S5120-GigabitEthernet1/0/12] dis loopback-detection?
? Loopback-detection is running
? Detection interval time is 5 seconds
? Following port (s) has (have) loopback link:
? Gigabitethernet1/0/12? ? // Loop from this port
By default, the system only performs loop monitoring in the default VLAN to which the trunk port or hybrid port belongs. If you want to perform loop detection on all VLANs on the trunk or hybrid interface, use the following command to enable the multi-VLAN detection function. Note that the loopback-detection per-VLAN enable command is invalid for the access port ..
For example, to perform network loop monitoring on all VLANs under port G1/0/16 of the switch trunk, you must perform the following configuration operations:
Go to the interface view: int G1/0/16
Enter the command loopback-detection per-VLAN enable.
The switch can execute the network ring in all VLANs to which the hybrid and trunk ports belong.
Iii. ruijie
The access switch configuration is as follows:
Rujijie # configure Terminal
Rujijie (config) # rldp enable ------> enable rldp globally
Rujijie (config) # interface range G0/1-24 ------> This function must be enabled for ports of the downlink PC or hub. do not enable this function at the uplink port of the access switch.
Rujijie (config-if-range) # rldp port loop-detect shutdown-port ------> the interface enables the rldp function. If the port is showdow after the loop is detected
Rujijie (config-if-range) # exit
Rujijie (config) # errdisable recovery interval 300 ------> If the port is detected and shut down by rldp, it will be restored automatically in 300 seconds and re-detect whether a loop exists
Rujijie (config) # End
Rujijie # WR
STP cannot solve the faults caused by Cisco, ruijie, Huawei, and China three anti-DDoS pro