The stp bpdu-filter enable command specifies a port as a BPDU-filter port.
The stp bpdu-filter disable command specifies a port as a non-BPDU-filter port.
The undo stp bpdu-filter command restores the default attribute of a BPDU-filter port.
By default, a port is a non-BPDU-filter port.
Ethernet interface view, GE interface view, XGE interface view, MultiGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view, 25GE interface view
Usage Scenario
On a network running a spanning tree protocol, if the stp edged-port enable command is used to configure a port as an edge port, the port will not participate in the spanning tree calculation. This speeds up network convergence and improves network stability. This port, however, will still send BPDUs. This may cause BPDUs to be sent to other networks. As a result, these networks flap.
The stp bpdu-filter enable command can be used on the port to address this problem. After the stp bpdu-filter enable command is used on the port, the port will become a BPDU-filter port, and will not process BPDUs.
If the stp bpdu-filter enable command is run on a port, the port will not transmit or process BPDUs. The port cannot negotiate the STP status with the directly connected port on the remote device. Therefore, exercise cautions when using the stp bpdu-filter enable command. Running the stp bpdu-filter enable command only on edge ports is recommended.
Running the stp bpdu-filter enable command in the interface view configures only the current port as a BPDU-filter port. If multiple BPDU-filter ports are required on a device, the stp bpdu-filter default command can be used in the system view to configure all the ports as BPDU-filter ports. If some ports need to participate in spanning tree calculation but do not need to be configured as BPDU-filter ports, the stp bpdu-filter disable command can be used in the view of these ports to configure them as non-BPDU-filter ports. Similarly, if the stp bpdu-filter disable command has been run on a port, the non-BPDU filter port attributes of the port will not change after the stp bpdu-filter default command is run.
Precautions
After the stp bpdu-filter disable command is run on a port, the port becomes a non-BPDU-filter port. The port is still a non-BPDU-filter port even if the stp bpdu-filter default command is run in the system view. After the undo stp bpdu-filter command is run on the port, the BPDU-filter attributes of the port restore to the default ones.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] stp bpdu-filter disable
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] stp bpdu-filter enable