网络项目拓扑图:

 

 两个三层交换上的主要配置:

Switch>en
Switch#conf t
Switch(config)#int range f0/23-24
Switch(config-if-range)#channel-group 1 mode on
Switch(config-if-range)#switchport mode trunk
Switch(vlan)#vtp server
Device mode already VTP SERVER.
Switch(vlan)#vtp domain xueyuan
Changing VTP domain name from NULL to xueyuan
Switch(vlan)#vtp pass 123
Setting device VLAN database password to 123
Switch(vlan)#vlan 21
VLAN 21 added:
    Name: VLAN0021
Switch(vlan)#vlan 22
VLAN 22 added:
    Name: VLAN0022
Switch(vlan)#vlan 23
VLAN 23 added:
    Name: VLAN0023
Switch(vlan)#vlan 20
VLAN 20 added:
    Name: VLAN0020
Switch(vlan)#vlan 40
VLAN 40 added:
    Name: VLAN0040
Switch(vlan)#vlan 50
VLAN 50 added:
    Name: VLAN0050
Switch(vlan)#vlan 10
VLAN 10 added:
    Name: VLAN0010
Switch(vlan)#vlan 14
VLAN 14 added:
    Name: VLAN0014
Switch(vlan)#vlan 11
VLAN 11 added:
    Name: VLAN0011
Switch(vlan)#vlan 60
VLAN 60 added:
    Name: VLAN0060
Switch(vlan)#vlan 30
VLAN 30 added:
    Name: VLAN0030
Switch(vlan)#vlan 18
VLAN 18 added:
Name: VLAN0018
     Switch(config-if)#int vlan 10
Switch(config-if)#ip add 192.168.10.1 255.255.255.0
Switch(config-if)#int vlan 11
Switch(config-if)#
Switch(config-if)#ip add 192.168.11.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 14
Switch(config-if)#ip add 192.168.14.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 18
Switch(config-if)#ip add 192.168.18.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 20
Switch(config-if)#ip add 192.168.20.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 21
Switch(config-if)#ip add 192.168.21.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 22
Switch(config-if)#ip add 192.168.22.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 23
Switch(config-if)#ip add 192.168.23.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 30
Switch(config-if)#ip add 192.168.30.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 40
Switch(config-if)#ip add 192.168.40.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 50
Switch(config-if)#ip add 192.168.50.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 60
Switch(config-if)#ip add 192.168.60.1 255.255.255.0
Switch(config-if)#no shut
Switch(config)#ip routing
 
另一个三层交换机配置如下
Switch>en
Switch#conf t
Switch(config)#int range f0/23-24
Switch(config-if-range)#channel-group 1 mode on
Switch(config-if-range)#switchport mode trunk
Switch(vlan)#vtp server
Device mode already VTP SERVER.
Switch(vlan)#vtp domain xueyuan
Changing VTP domain name from NULL to xueyuan
Switch(vlan)#vtp pass 123
Setting device VLAN database password to 123
Switch(vlan)#vlan 21
VLAN 21 added:
    Name: VLAN0021
Switch(vlan)#vlan 22
VLAN 22 added:
    Name: VLAN0022
Switch(vlan)#vlan 23
VLAN 23 added:
    Name: VLAN0023
Switch(vlan)#vlan 20
VLAN 20 added:
    Name: VLAN0020
Switch(vlan)#vlan 40
VLAN 40 added:
    Name: VLAN0040
Switch(vlan)#vlan 50
VLAN 50 added:
    Name: VLAN0050
Switch(vlan)#vlan 10
VLAN 10 added:
    Name: VLAN0010
Switch(vlan)#vlan 14
VLAN 14 added:
    Name: VLAN0014
Switch(vlan)#vlan 11
VLAN 11 added:
    Name: VLAN0011
Switch(vlan)#vlan 60
VLAN 60 added:
    Name: VLAN0060
Switch(vlan)#vlan 30
VLAN 30 added:
    Name: VLAN0030
Switch(vlan)#vlan 18
VLAN 18 added:
Name: VLAN0018
Switch(config-if)#int vlan 10
Switch(config-if)#ip add 192.168.10.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 11
Switch(config-if)#ip add 192.168.11.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 14
Switch(config-if)#ip add 192.168.14.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 18
Switch(config-if)#ip add 192.168.18.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 20
Switch(config-if)#ip add 192.168.20.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 21
Switch(config-if)#ip add 192.168.21.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 22
Switch(config-if)#ip add 192.168.22.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 23
Switch(config-if)#ip add 192.168.23.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 30
Switch(config-if)#ip add 192.168.30.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 40
Switch(config-if)#ip add 192.168.40.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 50
Switch(config-if)#ip add 192.168.50.1 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#int vlan 60
Switch(config-if)#ip add 192.168.60.1 255.255.255.0
Switch(config-if)#no shut
Switch(config)#ip routing
其他交换机设置为vlan client模式
将各交换机上连接PC机的端口加入相应VLAN
最后实现全网互通