各部分配置代码
sw3
system-view
sysname sw3
vlan 10
int e0/0/1
port link-type access
port default vlan 10
dis this
return
system-view
int gi0/0/1
port link-type trunk
port trunk allow-pass vlan 10
dis this
return
save
sw4
system-view
sysname sw4
vlan 20
int e0/0/1
port link-type access
port default vlan 20
dis this
return
system-view
int e0/0/2
port link-type trunk
port trunk allow-pass vlan 20
dis this
return
save
汇聚层sw2
system-view
sysname sw2
vlan batch 10 20
port-group group-member gi0/0/1 to gi0/0/2 e0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
return
save
核心层core
system-view
sysname core
vlan batch 10 20
int gi0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
dis this
dis port vlan
int vlanif 10
ip address 192.168.10.1 24
qu
int vlanif 20
ip address 192.168.20.1 24
dis ip int brief
return
save