组网需求 如图1所示,PC上网用户和IPTV用户通过S9300A和S9300B接入运营商网络,通过运营商的网络互相通信。 要求PC上网用户和IPTV用户分别以VLAN2和VLAN3通过运营商网络。 图1 配置灵活QinQ组网图
配置思路 采用如下的思路配置灵活QinQ: 1. 在S9300A和S9300B上创建相关VLAN。 2. 在S9300A和S9300B上配置接口类型并加入VLAN。 3. 在S9300A和S9300B的接口上配置灵活QinQ功能。 数据准备 为完成此配置例,需准备如下的数据: · PC上网用户被划分在VLAN10~VLAN50中。 · IPTV用户被划分在VLAN51~VLAN60中。 · 在公网中PC上网用户被划分到VLAN2中传输。 · 在公网中IPTV用户被划分到VLAN3中传输。 操作步骤 1. 创建VLAN # 在S9300A上创建VLAN2、VLAN3,即叠加后的外层VLAN。 <Quidway> system-view [Quidway] sysname S9300A [S9300A] vlan batch 2 3 # 在S9300B上创建VLAN2、VLAN3,即叠加后的外层VLAN。 <Quidway> system-view [Quidway] sysname S9300B [S9300B] vlan batch 2 3 2. 在接口上配置灵活QinQ # 配置S9300A的接口GE1/0/1。 [S9300A] interface gigabitethernet 1/0/1 [S9300A-GigabitEthernet1/0/1] port link-type hybrid [S9300A-GigabitEthernet1/0/1] port hybrid untagged vlan 2 [S9300A-GigabitEthernet1/0/1] port vlan-stacking vlan 10 to 50 stack-vlan 2 [S9300A-GigabitEthernet1/0/1] quit # 配置S9300A的接口GE1/0/2。 [S9300A] interface gigabitethernet 1/0/2 [S9300A-GigabitEthernet1/0/2] port link-type hybrid [S9300A-GigabitEthernet1/0/2] port hybrid untagged vlan 3 [S9300A-GigabitEthernet1/0/2] port vlan-stacking vlan 51 to 60 stack-vlan 3 [S9300A-GigabitEthernet1/0/2] quit # 配置S9300B的接口GE2/0/1。 [S9300B] interface gigabitethernet 2/0/1 [S9300B-GigabitEthernet2/0/1] port link-type hybrid [S9300B-GigabitEthernet2/0/1] port hybrid untagged vlan 3 [S9300B-GigabitEthernet2/0/1] port vlan-stacking vlan 51 to 60 stack-vlan 3 [S9300B-GigabitEthernet2/0/1] quit # 配置S9300B接口GE2/0/2。 [S9300B] interface gigabitethernet 2/0/2 [S9300B-GigabitEthernet2/0/2] port link-type hybrid [S9300B-GigabitEthernet2/0/2] port hybrid untagged vlan 2 [S9300B-GigabitEthernet2/0/2] port vlan-stacking vlan 10 to 50 stack-vlan 2 [S9300B-GigabitEthernet2/0/2] quit 3. 配置其它接口 # 在S9300A上配置接口GE1/0/3加入VLAN2、VLAN3。 [S9300A] interface gigabitethernet 1/0/3 [S9300A-GigabitEthernet1/0/3] port link-type trunk [S9300A-GigabitEthernet1/0/3] port trunk allow-pass vlan 2 3 [S9300A-GigabitEthernet1/0/3] quit # 在S9300B上配置接口GE2/0/3加入VLAN2、VLAN3。 [S9300B] interface gigabitethernet 2/0/3 [S9300B-GigabitEthernet2/0/3] port link-type trunk [S9300B-GigabitEthernet2/0/3] port trunk allow-pass vlan 2 3 [S9300B-GigabitEthernet2/0/3] quit 4. 验证配置结果 # 查看S9300A上各接口的配置信息。 <S9300A> display current-configuration interface gigabitethernet 1/0/1 # interface GigabitEthernet1/0/1 port hybrid untagged vlan 2 port vlan-stacking vlan 10 to 50 stack-vlan 2 # return <S9300A> display current-configuration interface gigabitethernet 1/0/2 # interface GigabitEthernet1/0/2 port hybrid untagged vlan 3 port vlan-stacking vlan 51 to 60 stack-vlan 3 # return <S9300A> display current-configuration interface gigabitethernet 1/0/3 # interface GigabitEthernet1/0/3 port link-type trunk port trunk allow-pass vlan 2 to 3 # return # 查看S9300B上各接口的配置信息。 <S9300B> display current-configuration interface gigabitethernet 2/0/1 # interface GigabitEthernet2/0/1 port hybrid untagged vlan 3 port vlan-stacking vlan 51 to 60 stack-vlan 3 # return <S9300B> display current-configuration interface gigabitethernet 2/0/2 # interface GigabitEthernet2/0/2 port hybrid untagged vlan 2 port vlan-stacking vlan 10 to 50 stack-vlan 2 # return <S9300B> display current-configuration interface gigabitethernet 2/0/3 # interface GigabitEthernet2/0/3 port link-type trunk port trunk allow-pass vlan 2 to 3 # return 如果S9300A、S9300B上配置正确,则: · PC上网用户可以通过运营商网络互相通信。 · IPTV用户可以通过运营商网络互相通信。 配置文件 以下仅给出S9300的配置文件。 · S9300A的配置文件 # sysname S9300A # vlan batch 2 to 3 # interface GigabitEthernet1/0/1 port hybrid untagged vlan 2 port vlan-stacking vlan 10 to 50 stack-vlan 2 # interface GigabitEthernet1/0/2 port hybrid untagged vlan 3 port vlan-stacking vlan 51 to 60 stack-vlan 3 # interface GigabitEthernet1/0/3 port link-type trunk port trunk allow-pass vlan 2 to 3 # return · S9300B的配置文件 # sysname S9300B # vlan batch 2 to 3 # interface GigabitEthernet2/0/1 port hybrid untagged vlan 3 port vlan-stacking vlan 51 to 60 stack-vlan 3 # interface GigabitEthernet2/0/2 port hybrid untagged vlan 2 port vlan-stacking vlan 10 to 50 stack-vlan 2 # interface GigabitEthernet2/0/3 port link-type trunk port trunk allow-pass vlan 2 to 3 # return
|