基于VLAN ID的灵活QINQ

示例图

一、实验目的

1.配置基于VLAN ID的灵活QINQ

二、注意事项

1.在进行三层通信的时候,不同用途的内部VLAN ID范围,不能有重合
  ①.因为如果内部VLAN ID范围有重合的,就可以打上,别的用途的外层VLAN ID标签
  ②.三层通信的时候,是需要一个VLANIF ID地址的,如果外层VLAN ID标签不对,那么
    VLANIF ID地址就不对了,那么路由也不对了,数据也会传输出错。
2.在进行三层通信的时候,不同用途的外部VLAN ID,不能有重合
3.VLAN标签的剥离和封装是关键

三、基于VLAN ID的灵活QINQ

1.不同用途的内部VLAN ID,可以打上不同的外部VLAN ID
2.比较灵活,约束比较小

四、基本配置

LSW1

sysname LSW1
#
vlan batch 20 30
#
interface GigabitEthernet0/0/1
 qinq vlan-translation enable
 port hybrid untagged vlan 20 30
 port vlan-stacking vlan 2 stack-vlan 20
 port vlan-stacking vlan 3 stack-vlan 30
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 20 30
#
return 

LSW2

sysname LSW2
#
vlan batch 20 30
#
interface GigabitEthernet0/0/1
 qinq vlan-translation enable
 port hybrid untagged vlan 20 30
 port vlan-stacking vlan 2 stack-vlan 20
 port vlan-stacking vlan 3 stack-vlan 30
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 20 30
#
return 

LSW3

sysname LSW3
#
vlan batch 2 to 3
#
interface Ethernet0/0/1
 port link-type access
 port default vlan 2
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 3
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 3
#
return 

LSW4

sysname LSW4
#
vlan batch 2 to 3
#
interface Ethernet0/0/1
 port link-type access
 port default vlan 2
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 3
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 3
#
return 

你可能感兴趣的:(QINQ,VLAN,网络,交换机)