bpdu discard

Function

The bpdu discard command enables an interface to discard BPDUs.

The undo bpdu discard command disables an interface from discarding BPDUs.

By default, an interface is disabled from discarding BPDUs.

Format

bpdu discard

undo bpdu discard

Parameters

None

Views

Layer 2 40GE interface view, Layer 2 Eth-Trunk interface view, Eth-Trunk interface view, GE optical interface view, GE interface view, GE electrical interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
l2vpn write

Usage Guidelines

Usage Scenario

To protect a device against BPDU attacks, run the bpdu discard command to enable an interface to discard received BPDUs, preventing them from being sent them to the CPU.

Example

# Enable Layer 2 GE 0/1/1 to discard BPDUs.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet 0/1/1
[~HUAWEI-GigabitEthernet0/1/1] portswitch
[*HUAWEI-GigabitEthernet0/1/1] bpdu discard
# Enable Layer 3 GE 0/1/1 to discard BPDUs.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet 0/1/1
[~HUAWEI-GigabitEthernet0/1/1] bpdu discard
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >