菜单
本页目录

拓扑图

QQ_1732532688244.png

SW1

SW1作为接入层交换机做基础配置即可。

vlan batch 130 240
interface GigabitEthernet0/0/1
 port hybrid pvid vlan 130
 port hybrid untagged vlan 130
quit
interface GigabitEthernet0/0/2
 port hybrid pvid vlan 240
 port hybrid untagged vlan 240
quit
interface GigabitEthernet0/0/3
 port hybrid tagged vlan 130 240
quit

SW2

SW2作为边界交换机,连接城域网(VLAN234)的接口,需要做单独配置,即在连接用户的一侧端口设置QinQ端口。

vlan batch 234
  /在ISP交换机上创建公网vlan
interface GigabitEthernet0/0/2
 port hybrid tagged vlan 234
quit
interface GigabitEthernet0/0/1
 port link-type dot1q-tunnel
   /将连接用户交换机一侧的端口设置为QINQ端口
 port default vlan 234
   /允许公网vlan数据通过
quit

SW3

假装它(SW3)是城域网的所有设备。

vlan batch 234
interface GigabitEthernet0/0/1
 port hybrid tagged vlan 234
quit
interface GigabitEthernet0/0/2
 port hybrid tagged vlan 234
quit

SW4

SW4和SW2一样,做接入用户的QinQ即可。

vlan batch 234
interface GigabitEthernet0/0/1
 port hybrid tagged vlan 234
quit
interface GigabitEthernet0/0/2
 port link-type dot1q-tunnel
 port default vlan 234
quit

SW5

vlan batch 130 240
interface GigabitEthernet0/0/2
 port hybrid pvid vlan 130
 port hybrid untagged vlan 130
quit
interface GigabitEthernet0/0/3
 port hybrid pvid vlan 240
 port hybrid untagged vlan 240
quit
interface GigabitEthernet0/0/1
 port hybrid tagged vlan 130 240
quit

完毕