Blackhole MAC address entries can be used to prevent attacks from unauthorized users. The switch discards packets from or destined to blackhole MAC addresses.
As shown in Figure 1, the switch receives a packet from an unauthorized PC whose MAC address is 0005-0005-0005 and belongs to VLAN 3. This MAC address can be configured as a blackhole MAC address to filter packets from the unauthorized user.
The configuration roadmap is as follows:
Create a VLAN to implement Layer 2 forwarding.
Configure a blackhole MAC address to block packets from this MAC address.
<HUAWEI> system-view [HUAWEI] sysname Switch [Switch] vlan 3 //Create VLAN 3. [Switch-vlan3] quit [Switch] mac-address blackhole 0005-0005-0005 vlan 3 //Configure MAC address 0005-0005-0005 as the blackhole MAC address in VLAN 3.
# Run the display mac-address blackhole command in any view to check whether the blackhole MAC address entry was successfully added to the MAC address table.
[Switch] display mac-address blackhole ------------------------------------------------------------------------------- MAC Address VLAN/VSI Learned-From Type ------------------------------------------------------------------------------- 0005-0005-0005 3/- - blackhole ------------------------------------------------------------------------------- Total items displayed = 1