接入层交换机配置vlan
[SW2]port-group group-member Ethernet 0/0/1 to Ethernet 0/0/2
[SW2-port-group]port link-type access
[SW2-Ethernet0/0/1]port link-type access
[SW2-Ethernet0/0/2]port link-type access
[SW2-port-group]port default vlan 200
[SW2-Ethernet0/0/1]port default vlan 200
[SW2-Ethernet0/0/2]port default vlan 200
捆绑接口配置
[SW2]int Eth-Trunk 2
[SW2-Eth-Trunk2]port link-type trunk
[SW2-Eth-Trunk2]port trunk allow-pass vlan all
[SW2-Eth-Trunk2]display this
#
interface Eth-Trunk2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
stp instance 0 cost 10000
#
return
[SW2-Eth-Trunk2]
边缘接口配置
[SW5]vlan batch 10 40
[SW5]int Eth-Trunk 5
[SW5-Eth-Trunk5]display this
#
interface Eth-Trunk5
stp instance 0 cost 10000
#
return
[SW5-Eth-Trunk5]port link-type trunk
[SW5-Eth-Trunk5]port trunk allow-pass vlan all
[SW5-Eth-Trunk5]quit
[SW5]port-group group-member Ethernet 0/0/3 to Ethernet 0/0/4
[SW5-port-group]port link-type access
[SW5-Ethernet0/0/3]port link-type access
[SW5-Ethernet0/0/4]port link-type access
[SW5]int e0/0/3
[SW5-Ethernet0/0/3]port default vlan 10
[SW5-Ethernet0/0/3]quit
[SW5-Ethernet0/0/3]int e0/0/4
[SW5-Ethernet0/0/4]port default vlan 40
[SW5-Ethernet0/0/4]quit
核心交换机配置SVI及网关
[SW1]int vlanif 10
[SW1-Vlanif10]ip add 192.168.10.1 255.255.255.0
[SW1-Vlanif10]quit
[SW1]int vlanif 20
[SW1-Vlanif20]ip add 192.168.20.1 255.255.255.0
[SW1-Vlanif20]quit
[SW1]int vlanif 30
[SW1-Vlanif30]ip add 192.168.30.1 255.255.255.0
[SW1-Vlanif30]quit
[SW1]int vlanif 40
[SW1-Vlanif40]ip add 192.168.40.1 255.255.255.0
[SW1-Vlanif40]quit
[SW1]int vlanif 50
[SW1-Vlanif50]ip add 192.168.50.1 255.255.255.0
[SW1-Vlanif50]quit
[SW1]int vlanif 60
[SW1-Vlanif60]ip add 192.168.60.1 255.255.255.0
[SW1-Vlanif60]quit
[SW1]int vlanif 200
[SW1-Vlanif200]ip add 192.168.200.1 255.255.255.0
[SW1-Vlanif200]quit
三层核心交换机与路由直连
[SW1]vlan 800
[SW1-vlan800]quit
[SW1]int vlanif 800
[SW1-Vlanif800]ip add 192.168.254.2 255.255.255.0
[SW1-Vlanif800]quit
[SW1]int gi0/0/3
[SW1-GigabitEthernet0/0/3]port link-type access
[SW1-GigabitEthernet0/0/3]port default vlan 800
-------------
[R1]int gi0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.254.1 255.255.255.0