H3C Technologies H3C WX3000 Series Unified Switches User Manual

Page 578

Advertising
background image

57-5

[SwitchA-GigabitEthernet1/0/3] vlan-vpn enable

# Enable the selective QinQ feature on GigabitEthernet 1/0/3 to tag packets of VLAN 100 through VLAN
108 with the tag of VLAN 1000 as the outer VLAN tag, and tag packets of VLAN 200 through VLAN 230
with the tag of VLAN 1200 as the outer VLAN tag.

[SwitchA-GigabitEthernet1/0/3] vlan-vpn vid 1000

[SwitchA-GigabitEthernet1/0/3-vid-1000] raw-vlan-id inbound 100 to 108

[SwitchA-GigabitEthernet1/0/3-vid-1000] quit

[SwitchA-GigabitEthernet1/0/3] vlan-vpn vid 1200

[SwitchA-GigabitEthernet1/0/3-vid-1200] raw-vlan-id inbound 200 to 230

After the above configuration, packets of VLAN 100 through VLAN 108 (that is, packets of PC users) are
tagged with the tag of VLAN 1000 as the outer VLAN tag when they are forwarded to the public network
by Switch A; and packets of VLAN 200 through VLAN 230 (that is, packets of IP phone users) are
tagged with the tag of VLAN 1200 as the outer VLAN tag when they are forwarded to the public network.

z

Configure Switch B.

# Create VLAN 1000, VLAN 1200, VLAN 12 (the default VLAN of GigabitEthernet 1/0/12) and VLAN 13
(the default VLAN of GigabitEthernet 1/0/13) on Switch B.

<SwitchB> system-view

[SwitchB] vlan 1000

[SwitchB-vlan1000] quit

[SwitchB] vlan 1200

[SwitchB-vlan1200] quit

[SwitchB] vlan 12 to 13

# Configure GigabitEthernet 1/0/11 as a hybrid port, and configure GigabitEthernet 1/0/11 not to remove
VLAN tags when forwarding packets of VLAN 12, VLAN 13, VLAN 1000, and VLAN 1200.

<SwitchB> system-view

[SwitchB] interface GigabitEthernet 1/0/11

[SwitchB-GigabitEthernet1/0/11] port link-type hybrid

[SwitchB-GigabitEthernet1/0/11] port hybrid vlan 12 13 1000 1200 tagged

# Configure GigabitEthernet 1/0/12 as a hybrid port and configure VLAN 12 as its default VLAN.
Configure GigabitEthernet 1/0/12 to remove VLAN tags when forwarding packets of VLAN 12 and
VLAN 1000.

[SwitchB] interface GigabitEthernet 1/0/12

[SwitchB-GigabitEthernet1/0/12] port link-type hybrid

[SwitchB-GigabitEthernet1/0/12] port hybrid pvid vlan 12

[SwitchB-GigabitEthernet1/0/12] port hybrid vlan 12 1000 untagged

[SwitchB-GigabitEthernet1/0/12] quit

# Configure GigabitEthernet 1/0/13 as a hybrid port and configure VLAN 13 as its default VLAN .
Configure GigabitEthernet 1/0/13 to remove VLAN tags when forwarding packets of VLAN 13 and
VLAN 1200.

[SwitchB] interface GigabitEthernet 1/0/13

[SwitchB-GigabitEthernet1/0/13] port link-type hybrid

[SwitchB-GigabitEthernet1/0/13] port hybrid pvid vlan 13

[SwitchB-GigabitEthernet1/0/13] port hybrid vlan 13 1200 untagged

After the above configuration, Switch B can forward packets of VLAN 1000 and VLAN 1200 to the
corresponding servers through GigabitEthernet 1/0/12 and GigabitEthernet 1/0/13 respectively.

Advertising