ENSP实验-QINQ

一、实验目的:

1.PC配置相同24位网段地址,采用如图vlan划分隔离
2.PE1、PE2之间采用trunk qinq的外层vlan标签vlan 100 300 400
3.基本qinq:CE1/CE3上行trunk vlan10、vlan20,PE1/PE2对应接口默认均封装一层vlan100
4.灵活qinq:CE2/CE4上行trunk vlan30、vlan40,PE1/PE2对应接口根据vlan来封装,vlan30封装一层vlan300,vlan40封装一层vlan400

二、实验拓扑:

ENSP实验-QINQ_第1张图片

三、实验配置:

1、基本qinq配置:

a.PE1/PE2互联口放通vlan 100 300 400


#
interface GigabitEthernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 100 300 400

#
interface GigabitEthernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 100 300 400

b.CE1/CE3基本配置


#
interface Ethernet0/0/1
 port link-type access
 port default vlan 10
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 20
#
interface Ethernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 10 20
 
#
interface Ethernet0/0/1
 port link-type access
 port default vlan 10
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 20
#
interface Ethernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 10 20

c.PE1/PE2对应接口配置基本qinq封装vlan100


#
interface GigabitEthernet0/0/2
 port link-type dot1q-tunnel
 port default vlan 100

#
interface GigabitEthernet0/0/2
 port link-type dot1q-tunnel
 port default vlan 100

c.测试验证

PC1ping通PC5
ENSP实验-QINQ_第2张图片
PE1互联口抓包,可见双层vlan标签,外层vlan100,内层vlan10
ENSP实验-QINQ_第3张图片

2、灵活qinq配置:

a.CE2/CE4基本配置


#
interface Ethernet0/0/1
 port link-type access
 port default vlan 30
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 40
#
interface Ethernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 30 40

#
interface Ethernet0/0/1
 port link-type access
 port default vlan 30
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 40
#
interface Ethernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 30 40

b.PE1/PE2对应接口配置灵活qinq vlan30封装vlan300 vlan40封装vlan400


#
#
interface GigabitEthernet0/0/1
 qinq vlan-translation enable
 port hybrid untagged vlan 300 400
 port vlan-stacking vlan 30 stack-vlan 300
 port vlan-stacking vlan 40 stack-vlan 400

#
#
interface GigabitEthernet0/0/1
 qinq vlan-translation enable
 port hybrid untagged vlan 300 400
 port vlan-stacking vlan 30 stack-vlan 300
 port vlan-stacking vlan 40 stack-vlan 400

c.测试验证

PC3ping通PC7
ENSP实验-QINQ_第4张图片
PE1互联口抓包,可见双层vlan标签,外层vlan300,内层vlan30
ENSP实验-QINQ_第5张图片
PC4ping通PC8
ENSP实验-QINQ_第6张图片
PE1互联口抓包,可见双层vlan标签,外层vlan400,内层vlan40
ENSP实验-QINQ_第7张图片

你可能感兴趣的:(网络,华为)