Monday, June 1, 2020

How to Configure Huawei Switch Common VLAN Mapping?

Configuring 1 to 1 VLAN Mapping

1 to 1 VLAN mapping allows the switch to map the VLAN ID of packets to an S-VLAN ID.

For example, configure the switch to map VLAN 2 in packets entering GE0/0/1 to VLAN 200.

<HUAWEI> system-view

[HUAWEI] interface gigabitethernet0/0/1

[HUAWEI-GigabitEthernet0/0/1] port link-type trunk  //Configure the interface as a trunk interface. VLAN mapping can only be configured on a trunk or hybrid interface.

[HUAWEI-GigabitEthernet0/0/1] qinq vlan-translation enable  //On a fixed device, VLAN translation must be enabled first. This configuration is not required on a modular device.

[HUAWEI-GigabitEthernet0/0/1] port vlan-mapping vlan 2 map-vlan 200

Configuring N to 1 VLAN Mapping

N to 1 VLAN mapping allows the switch to map a range of VLAN IDs to an S-VLAN ID.

For example, configure the switch to map VLANs 3, 4, 5, and 6 in packets entering GE0/0/1 to VLAN 200.

<HUAWEI> system-view

[HUAWEI] interface gigabitethernet0/0/1

[HUAWEI-GigabitEthernet0/0/1] port link-type trunk  //Configure the interface as a trunk interface. VLAN mapping can only be configured on a trunk or hybrid interface.

[HUAWEI-GigabitEthernet0/0/1] qinq vlan-translation enable  //On a fixed device, VLAN translation must be enabled first. This configuration is not required on a modular device.

[HUAWEI-GigabitEthernet0/0/1] port vlan-mapping vlan 3 to 6 map-vlan 200

 NOTE:

This configuration is not supported by Huawei S5720HI, S5730HI, and S6720HI.

Configuring 2 to 1 VLAN Mapping

When an interface configured with 2 to 1 VLAN mapping receives a double-tagged packet, it maps the outer tag of the packet to the S-VLAN tag and transparently transmits the inner tag as the data.

For example, configure the switch to map the outer VLAN ID of 8 and inner VLAN ID of 7 in packets entering GE0/0/1 to the outer VLAN ID of 200 and to retain the inner VLAN ID.

<HUAWEI> system-view

[HUAWEI] interface gigabitethernet0/0/1

[HUAWEI-GigabitEthernet0/0/1] port link-type trunk  //Configure the interface as a trunk interface. VLAN mapping can only be configured on a trunk or hybrid interface.

[HUAWEI-GigabitEthernet0/0/1] qinq vlan-translation enable  //On a fixed device, VLAN translation must be enabled first. This configuration is not required on a modular device.

[HUAWEI-GigabitEthernet0/0/1] port vlan-mapping vlan 8 inner-vlan 7 map-vlan 200

 NOTE:

Only the S1720X, S1720X-E, S3700HI, S5700EI, S5700HI, S5710EI, S5710HI, S5720EI, S5720HI, S5730HI, S5730S-EI, S5730SI, S6700EI, S6720EI, S6720HI, S6720LI, S6720S-EI, S6720S-LI, S6720S-SI, and S6720SI of fixed devices support this configuration. The modular device supports this configuration.

Configuring 2 to 2 VLAN Mapping

When an interface configured with 2 to 2 VLAN mapping receives a double-tagged packet, it maps double tags of the packet to S-VLAN tags.

For example, configure the switch to map the outer VLAN ID of 11 and inner VLAN ID of 10 in packets entering GE0/0/1 to the outer VLAN ID of 200 and inner VLAN ID of 201.

<HUAWEI> system-view

[HUAWEI] interface gigabitethernet0/0/1

[HUAWEI-GigabitEthernet0/0/1] port link-type trunk  //Configure the interface as a trunk interface. VLAN mapping can only be configured on a trunk or hybrid interface.

[HUAWEI-GigabitEthernet0/0/1] qinq vlan-translation enable  //On a fixed device, VLAN translation must be enabled first. This configuration is not required on a modular device.

[HUAWEI-GigabitEthernet0/0/1] port vlan-mapping vlan 11 inner-vlan 10 map-vlan 200 map-inner-vlan 201

 NOTE:

Only the S1720X, S1720X-E, S5720EI, S5720HI, S5730HI, S5730S-EI, S5730SI, S6720EI, S6720HI, S6720LI, S6720S-EI, S6720S-LI, S6720S-SI, and S6720SI of fixed devices support this configuration. The modular device supports this configuration.

No comments:

Post a Comment