mac-learn-style

Function

The mac-learn-style command configures the MAC address learning mode of a VSI.

The undo mac-learn-style qualify command restores the default MAC address learning mode of a VSI.

By default, the MAC address learning mode is unqualify.

Format

mac-learn-style { qualify | unqualify }

mac-learn-style qualify { outer-vlan | inner-vlan }

undo mac-learn-style qualify

undo mac-learn-style qualify { outer-vlan | inner-vlan }

Parameters

Parameter Description Value
qualify

Specifies the MAC address learning mode as qualify.

-

unqualify

Specifies the MAC address learning mode as unqualify.

-

outer-vlan

The VSI uses the outer VLAN ID to learn MAC addresses.

-

inner-vlan

The VSI uses the inner VLAN ID to learn MAC addresses.

-

Views

VSI-AUTO view, VSI-DEFAULT view, VSI-STATIC view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
l2vpn write

Usage Guidelines

Usage Scenario

A characteristic of the Ethernet service is that broadcast, multicast, and unknown unicast frames are flooded to all interfaces. This characteristic is called flooding. To achieve flooding within the service provider network, Ethernet-based VPLS floods all unknown unicast, broadcast, and multicast frames over the corresponding PWs to all PEs participating in the VPLS, as well as to all ACs. However, multicast frames do not necessarily have to be sent to all VPN members. To prevent unnecessary multicast frame forwarding, a PE must be able to associate a destination MAC address with a PW. Since it is impossible to require that PEs statically associate every possible destination MAC address with a PW, VPLS-capable PEs must have the capability to dynamically learn MAC addresses from both ACs and PWs. To configure the MAC address learning mode of a VSI, run the mac-learn-style command. In this command, either of the following parameters can be configured:

  • qualify: In qualified learning, each customer VLAN has its own broadcast domain and MAC address space. A PE learns both the MAC addresses and VLAN tags of received frames.
  • unqualify: In unqualified learning, all the VLANs of a single customer are handled by a single VPLS service, which means they all share a single broadcast domain and a single MAC address space. The MAC addresses need to be unique and non-overlapping among customer VLANs. A PE learns only the MAC addresses of received frames.

Prerequisites

A VSI has been created or the VSI view is displayed using the vsi command.

Precautions

As the MAC leaning style mode of a VSI does not support E2E negotiation, the E2E configuration must be consistent. If a configuration inconsistency occurs, the VLAN-based MAC address learning may be incorrect or packets may be discarded.

In an HVPLS scenario, it is recommended that MAC address learning in qualified mode be disabled on SPEs. To enable this function, ensure that the types of interfaces connected to the PEs at both ends are the same. The types of interfaces connected to the PEs can be dot1q VLAN tag termination sub-interfaces, QinQ mapping sub-interfaces, or QinQ stacking sub-interfaces.

When the qualified mode is configured on an SPE, the type of VLAN tag used for MAC address learning must be specified:

  • outer-vlan: learns MAC addresses based on outer VLAN tags.
  • inner-vlan: learns MAC addresses based on inner VLAN tags.

    In an HVPLS scenario, after a dot1q VLAN tag termination sub-interface is bound to a remote PE, the mac-learn-style qualify outer-vlan command needs to be run to enable MAC address learning in qualified mode on an SPE. After a QinQ mapping or QinQ stacking sub-interface is bound to a remote PE, you can run the mac-learn-style qualify inner-vlan or mac-learn-style qualify command to enable MAC address learning in qualified mode on an SPE.

    After the mac-learn-style qualify command is run for a VSI, only a dot1q VLAN tag termination sub-interface, QinQ mapping sub-interface, or QinQ stacking sub-interface can be bound to the VSI. If outer-vlan is specified, only a dot1q VLAN tag termination sub-interface can be bound to the VSI. If inner-vlan is specified, only a QinQ mapping or QinQ stacking sub-interface can be bound to the VSI.

    After a dot1q VLAN tag termination sub-interface is bound to a VSI, MAC address learning in qualify mode cannot be configured. Therefore, you need to run the mac-learn-style qualify command before binding the sub-interface to a VSI. After a dot1q VLAN tag termination sub-interface is bound to a VSI, MAC address learning in qualify mode cannot be disabled. To restore the default MAC address learning mode of the VSI, unbind the dot1q VLAN tag termination sub-interface from the VSI first.

Example

# Configure the MAC address learning mode of the VSI instance as qualify.
<HUAWEI> system-view
[~HUAWEI] mpls
[*HUAWEI-mpls] quit
[*HUAWEI] mpls l2vpn
[*HUAWEI-l2vpn] quit
[*HUAWEI] vsi vsi1
[*HUAWEI-vsi-vsi1] mac-learn-style qualify
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >