{ unknown-multicast | unknown-unicast } discard

Function

The unknown-multicast discard command disables interfaces in a VLAN from forwarding unknown multicast packets.

The undo unknown-multicast discard command restores the default configuration.

The unknown-unicast discard command disables interfaces in a VLAN from forwarding unknown unicast packets.

The undo unknown-unicast discard command restores the default configuration.

By default, interfaces in a VLAN forward unknown multicast, and unknown unicast packets.

Format

unknown-multicast discard

unknown-unicast discard [ mac-learning ]

undo unknown-multicast discard

undo unknown-unicast discard [ mac-learning ]

Parameters

Parameter Description Value
mac-learning

Indicates that interfaces in a VLAN learn the source MAC addresses of the received unknown unicast packets when discarding the packets.

-

Views

VLAN view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
mac write

Usage Guidelines

Usage Scenario

When interfaces in a VLAN receive unknown unicast packets, or unknown unicast packets, the interfaces broadcast these packets in the VLAN. If the interfaces broadcast a large number of attack packets, the forwarding and security of other packets are threatened.

To disable interfaces in a VLAN from forwarding unknown unicast packets, or unknown unicast packets, run this command.

Precautions

To enable interfaces in a VLAN to learn the source MAC addresses of the unknown unicast packets to be discarded, configure the mac-learning parameter in the command. After the interfaces learn the source MAC addresses of the packets, you can configure a policy to discard the unicast packets carrying these source addresses.

When a VLANIF interface functions as a Layer 3 multicast outbound interface and the function of discarding unknown multicast packets is configured in the VLAN view:

  • If IGMP snooping is not configured in a VLAN, IPv4 Layer 3 multicast protocol packets are discarded, affecting IPv4 Layer 3 multicast services.
  • If MLD snooping is not configured in a VLAN, IPv6 Layer 3 multicast protocol packets are discarded, affecting IPv6 Layer 3 multicast services.

Example

# Configure interfaces in a VLAN to discard unknown multicast packets.
<HUAWEI> system-view
[~HUAWEI] vlan 10
[*HUAWEI-vlan10] unknown-multicast discard
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >