Configuring BPDU Protection on a Switch
Context
Edge ports are directly connected to user terminal and will not receive BPDUs. Attackers may send pseudo BPDUs to attack the switch. If the edge ports receive the BPDUs, the switch configures the edge ports as non-edge ports and triggers a new spanning tree calculation. Network flapping then occurs. BPDU protection can be used to protect switches against malicious attacks.
Perform the following procedure on all switches that have edge ports.
Procedure
- Run:
system-view
The system view is displayed.
- (Optional) Run:
stp process process-id
The MSTP process view is displayed.
Skip this step if you perform configurations in the MSTP process 0.
- Run:
stp bpdu-protection
BPDU protection is enabled on the switch.
By default, BPDU protection is not enabled on the switch.
Follow-up Procedure
- The auto recovery function is disabled by default and does not have a default value for the recovery delay. When you enable the auto recovery function, you must set a recovery delay.
- A smaller interval-value indicates a shorter time before an edge port goes Up, and a higher frequency of Up/Down state transitions on the port.
- A larger interval-value indicates a longer time before an edge port goes Up, and a longer service interruption time.
- The auto recovery function takes effect only for the interfaces that transition to the error-down state after the error-down auto-recovery command is executed.