< Home

Configuring 1 to 1 VLAN Mapping

Context

When receiving a tagged packet, an interface maps the VLAN ID in the packet to an S-VLAN ID.

After the port vlan-mapping vlan vlan-id1 [ to vlan-id2 ] map-vlan vlan-id3 [ remark-8021p 8021p-value ] command is used on an interface, vlan-id1 [ to vlan-id2 ] is mapped to vlan-id3 in the inbound direction, and vlan-id3 is mapped to vlan-id1 [ to vlan-id2 ] in the outbound direction.

On the S2720-EI, S5720I-SI, S5720-LI, S5735-L, S5735S-L, S5735S-L-M, S5720S-LI, S5720S-SI, S5720-SI, S5735-S, S5735S-S, S5735-S-I, S5730S-EI, S5730-SI, S6720-LI, S6720S-LI, S6720S-SI, and S6720-SI, outbound VLAN mapping cannot be used with a traffic policy. You can run the port vlan-mapping ingress command to configure VLAN mapping in the inbound direction. The interface configured with VLAN mapping maps vlan-id1 [ to vlan-id2 ] to vlan-id3 in the inbound direction, and does not map vlan-id3 to vlan-id1 [ to vlan-id2 ] in the outbound direction.

The port vlan-mapping ingress command is only supported by S2720-EI, S5720I-SI, S5720-LI, S5735-L, S5735S-L, S5735S-L-M, S5720S-LI, S5720S-SI, S5720-SI, S5735-S, S5735S-S, S5735-S-I, S5730S-EI, S5730-SI, S6720-LI, S6720S-LI, S6720S-SI, and S6720-SI.

Pre-configuration Tasks

Before configuring 1:1 VLAN mapping, complete the following tasks:

  • Create the specified VLAN.
  • Add the primary interface to the translated VLAN.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface interface-type interface-number

    The interface view is displayed.

  3. Run port link-type { hybrid | trunk }

    The port link-type is set.

  4. Run qinq vlan-translation enable

    VLAN translation is enabled on the interface.

  5. (Optional) Run port vlan-mapping ingress

    VLAN mapping is configured in the inbound direction.

    By default, VLAN mapping is valid for both inbound and outbound directions.

  6. Run port vlan-mapping vlan vlan-id1 [ to vlan-id2 ] map-vlan vlan-id3 [ remark-8021p 8021p-value ]

    Single-tagged VLAN mapping is configured on the interface.

    • VLAN mapping can be configured only on a trunk or hybrid interface, and the hybrid interface must be added to the translated VLAN in tagged mode.
    • When N:1 VLAN mapping is configured (VLAN IDs can be non-contiguous before mapping), the interface needs to be added to these VLANs in tagged mode, and the VLAN specified by map-vlan cannot be a VLAN corresponding to a VLANIF interface.

    • If VLAN mapping and DHCP are configured on the same interface, it is recommended to add the interface to the original VLANs (VLANs before mapping) in tagged mode.
    • Configuring mac-limit and N:1 VLAN mapping simultaneously causes a high CPU usage on some low-end switches. Therefore, such configuration is not recommended.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >