336、实验vlan mapping:
vlan mapping工作原理:当数据包经过vlan标签转换口的时候,转换口直接将vlan的标签转换成为了上层vlan的标签,下联的所有接口都属于上联vlan;
使VLAN 30、31、32的数据包经过上联口之后,转换成为VLAN 100 ,打上VLAN 100 的tag;
interface GigabitEthernet0/0/3
qinq vlan-translation enable
port trunk allow-pass vlan 2 to 4094
port vlan-mapping vlan 30 to 39 map-vlan 100
interface GigabitEthernet0/0/1
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/2
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/3
port trunk allow-pass vlan 2 to 4094
②分别将两个交换机分别打trunk、其他的接口分别划分至vlan 30 ,vlan 31 ,vlan 32中;
interface GigabitEthernet0/0/1
interface GigabitEthernet0/0/2
interface GigabitEthernet0/0/3
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/1
port trunk allow-pass vlan 2 to 4094
interface GigabitEthernet0/0/2
interface GigabitEthernet0/0/3
qinq vlan-translation enable 开启vlan标签转换
port vlan-mapping vlan 30 to 39 map-vlan 100 将vlan 30-39 的标签转换为vlan 100的标签;