No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

S12700 V200R012C00 Configuration Guide - Ethernet Switching

This document describes the configuration of Ethernet services, including configuring MAC address table, link aggregation, VLANs, VLAN aggregation, MUX VLAN, VLAN termination, Voice VLAN, VLAN mapping, QinQ, GVRP, VCMP, STP/RSTP/MSTP, VBST, SEP, RRPP, ERPS, LBDT, and Layer 2 protocol transparent transmission.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuring MAC Address-based VLAN Assignment

Configuring MAC Address-based VLAN Assignment

Context

In MAC address-based VLAN assignment mode, you do not need to reconfigure VLANs for users when their physical locations change. This improves security and access flexibility on a network.

When MAC address-based VLAN assignment is enabled, only untagged frames are processed, and tagged frames are treated in the same manner as interface-based VLAN assignment.

When receiving an untagged frame, the interface matches the source MAC address of the frame against the MAC-VLAN table:
  • If an entry is matched, the interface forwards the frame based on the VLAN ID and priority in the entry.

  • If no entry is matched, the interface matches the frame according to other matching rules.

The switch supports a maximum of 1024 MAC-VLAN entries and a maximum of 100 MAC-VLAN entries with the mask. The total number of MAC-VLAN entries is the number of configured MAC-VLAN entries multiplied by the number of interfaces where MAC-VLAN entries are delivered.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run vlan vlan-id

    A VLAN is created and the VLAN view is displayed. If the specified VLAN has been created, the VLAN view is directly displayed.

    The VLAN ID ranges from 1 to 4094. If VLANs need to be created in a batch, run the vlan batch { vlan-id1 [ to vlan-id2 ] } &<1-10> command. Then run the vlan vlan-id command to enter the view of a specified VLAN.

    NOTE:

    If a device is configured with multiple VLANs, it is recommended to configure a name for each VLAN.

    To do so, run the name vlan-name command in the VLAN view. After a VLAN name is configured, run the vlan vlan-name vlan-name command in the system view to enter the corresponding VLAN view.

    The vlan configuration command completes the VLAN configurations before the VLAN is created.

  3. Run mac-vlan mac-address mac-address [ mac-address-mask | mac-address-mask-length ] [ priority priority ]

    A MAC address is associated with a VLAN.

    NOTE:

    When the mac-vlan mac-address command with the same MAC address specified is executed multiple times, MAC-VLAN entries take effect according to the longest match principle on X series cards, and the MAC-VLAN entry with the 48-bit mask has the highest priority. On other cards, MAC-VLAN entries take effect according to the longest match principle only when the mask has 47 bits or less than 47 bits, and the MAC-VLAN entry with the 48-bit mask has the lowest priority.

    • The MAC address is input in an H-H-H format, where each H is a hexadecimal number composed of 1 to 4 alphanumeric characters, such as 00e0 and fc01. If you enter less than four alphanumeric characters, 0s are added before the input digits. For example, if e0 is entered, 00e0 is displayed. The MAC address cannot be all Fs, all 0s, or a multicast MAC address.

    • If a MAC-VLAN entry with a mask is specified (excluding a 48-bit mask or mask with all Fs), then the priority cannot be changed normally. To change the priority, run the undo mac-vlan mac-address command to delete the MAC-VLAN entry and then run the mac-vlan mac-address command to change the priority.
    • priority specifies the 802.1p priority of a MAC address-based VLAN. The value ranges from 0 to 7. A larger value indicates a higher priority. The default value is 0. After the 802.1p priority of a MAC address-based VLAN is specified, the switch forwards high-priority frames first during network congestion.

  4. Run quit

    Return to the system view.

  5. Configure attributes for the Ethernet interface.

    1. Run interface interface-type interface-number

      The view of the interface that allows the MAC address-based VLAN is displayed.

    2. Run port link-type hybrid

      The interface is configured as a hybrid interface.

      It is recommended that MAC address-based VLAN assignment should be configured on the hybrid interface.

    3. Run port hybrid untagged vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }

      On access and trunk interfaces, MAC address-based VLAN assignment can be used only when the MAC address-based VLAN is the same as the PVID. It is recommended that MAC address-based VLAN assignment be configured on hybrid interfaces.

  6. (Optional) Run vlan precedence mac-vlan

    The device is configured to preferentially use MAC address-based VLAN assignment.

    By default, the device preferentially uses MAC address-based VLAN assignment.
    NOTE:

    The vlan precedence command is not supported on the X series cards.

  7. Run mac-vlan enable

    MAC address-based VLAN assignment is enabled.

    By default, MAC address-based VLAN assignment is disabled.

    NOTE:

    MAC address-based VLAN assignment cannot be used with the MUX VLAN and MAC address authentication on the same interface.

    MAC address-based VLAN assignment is invalid for packets with the VLAN ID of 0 only when the mask of the MAC VLAN is specified. On the X series cards, MAC address-based VLAN assignment is invalid for packets with the VLAN ID of 0 regardless of whether the mask of the MAC VLAN is specified.

Verifying the Configuration

  • Run the display mac-vlan { mac-address { all | mac-address [ mac-address-mask | mac-address-mask-length ] } | vlan vlan-id } command in any view to check the configuration of MAC address-based VLAN assignment.
  • Run the display vlan command in any view to check information about VLANs.
Translation
Download
Updated: 2019-01-18

Document ID: EDOC1100038103

Views: 116758

Downloads: 52

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next