拓扑图
配置
sysname AR1
#
interface GigabitEthernet0/0/0.10dot1q termination vid 10ip address 12.1.1.1 255.255.255.0 arp broadcast enable
#
interface GigabitEthernet0/0/0.20dot1q termination vid 20ip address 21.1.1.1 255.255.255.0 arp broadcast enable
#
sysname AR2
#
interface GigabitEthernet0/0/0.10dot1q termination vid 10ip address 12.1.1.2 255.255.255.0 arp broadcast enable
#
interface GigabitEthernet0/0/0.20dot1q termination vid 20ip address 21.1.1.2 255.255.255.0 arp broadcast enable
#
sysname SW1
#
vlan batch 100 200
#
interface GigabitEthernet0/0/1qinq vlan-translation enableport hybrid untagged vlan 100 200port vlan-stacking vlan 10 stack-vlan 100port vlan-stacking vlan 20 stack-vlan 200
#
interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 2 to 4094
#
sysname SW2
#
vlan batch 100 200
#
interface GigabitEthernet0/0/1qinq vlan-translation enableport hybrid untagged vlan 100 200port vlan-stacking vlan 10 stack-vlan 100port vlan-stacking vlan 20 stack-vlan 200
#
interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 2 to 4094
#
结果查看
AR1 ping AR2,可以ping通
在SW2的G0/0/2口抓包,可以看到VLAN10的外层VLAN为100,VLAN20的外层VLAN为200