#
sysname sw1
#
vlan batch 2 to 3 100
#
interface Vlanif2
 ip address 192.168.2.254 255.255.255.0
#
interface Vlanif3
 ip address 192.168.3.254 255.255.255.0
#
interface Vlanif100
 ip address 12.0.0.1 255.255.255.0
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet0/0/2
 port link-type access
 port default vlan 100

#

ip route-static 192.168.20.1 255.255.255.0 12.0.0.2

ip route-static 192.168.30.1 255.255.255.0 12.0.0.2

#
sysname sw2
#
vlan batch 2 to 3 100
#
interface Vlanif2
 ip address 192.168.20.254 255.255.255.0
#
interface Vlanif3
 ip address 192.168.30.254 255.255.255.0
#
interface Vlanif100
 ip address 12.0.0.2 255.255.255.0
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet0/0/2
 port link-type access
 port default vlan 100

#

ip route-static 192.168.2.1 255.255.255.0 12.0.0.1

ip route-static 192.168.3.1 255.255.255.0 12.0.0.1

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

#

ip route-static 192.168.20.1 255.255.255.0 12.0.0.2

ip route-static 192.168.30.1 255.255.255.0 12.0.0.2

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

#

ip route-static 192.168.2.1 255.255.255.0 12.0.0.1

ip route-static 192.168.3.1 255.255.255.0 12.0.0.1

Logo

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。

更多推荐