H3C S5500-EI 系列以太网交换机

      switch-----G0/1/1-----vlan 10    -----QINQ

                       G0/1/2-----vlan 50   ------QINQ

                       G0/1/0-----trunk

[H3C]sysname pA
配置端口GigabitEthernet0/1/1
# 配置端口的缺省VLAN 为VLAN10,这里以端口为Access 端口为例


[pA]vlan 10
[pA-vlan10]q
[pA]int g0/1/1

[pA-GigabitEthernet0/1/1]port link-mode bridge
[pA-GigabitEthernet0/1/1]port ?
  access             Specify current Access port's characteristics
  hybrid             Specify current Hybrid port's characteristics
  inline-interfaces  Add ports to or delete ports from inline-interfaces
  link-aggregation   Link aggregation group
  link-mode          Switch the specified interface to layer2 or layer3
                     ethernet
  link-type          Specify port link-type
  smart-link         Specify smart link
  trunk              Specify current Trunk port's characteristics

[pA-GigabitEthernet0/1/1]port access vlan 10
[pA-GigabitEthernet0/1/1]qinq e          使能端口的基本QinQ 功
[pA-GigabitEthernet0/1/1]q

配置端口GigabitEthernet0/1/2
# 配置端口的缺省VLAN 为VLAN50,这里以端口为Hybrid 端口为例
dis ip int  brief
*down: administratively down
(s): spoofing
Interface                                Physical   Protocol   IP Address     
GigabitEthernet0/1/0                       down       down     unassigned     
GigabitEthernet0/1/2                       down       down     unassigned     
Serial0/2/0                                down       down     unassigned     
Serial0/2/1                                down       down     unassigned     
[pA]vlan 50
[pA-vlan50]q
[pA]int g0/1/2
[pA-GigabitEthernet0/1/2]port link-mode bridge
[pA-GigabitEthernet0/1/2]port link-type h
[pA-GigabitEthernet0/1/2]port link-type hybrid
[pA-GigabitEthernet0/1/2]port h
[pA-GigabitEthernet0/1/2]port hybrid pvid vlan 50
[pA-GigabitEthernet0/1/2]port h
[pA-GigabitEthernet0/1/2]port hybrid vlan 50 u
[pA-GigabitEthernet0/1/2]port hybrid vlan 50 untagged
 Please wait... Done.
[pA-GigabitEthernet0/1/2]qinq e
[pA-GigabitEthernet0/1/2]qinq enable
[pA-GigabitEthernet0/1/2]q

 

配置端口GigabitEthernet0/1/0
# 配置端口为Trunk 端口,且允许VLAN 10 和VLAN50 的报文通

pA]int g0/1/0

                           

[pA-GigabitEthernet0/1/0]port link-mode bridge
[pA-GigabitEthernet0/1/0]port link-type trunk
[pA-GigabitEthernet0/1/0]port trunk permit vlan 10 50
 Please wait... Done.


配置端口添加的外层Tag 中携带的TPID 值为0x8200
[pA]qinq ethernet-type service-tag 8200
 QINQ global service-tag ethernet type changes to 0x8200.