赞
踩
一: 连接
两个二层交换机,一个三层交换机,六个主机和三个配置主机
二: 设置主机IP地址
主机0:192.168.10.2 255.255.255.0 192.168.10.1
主机1:192.168.20.2 255.255.255.0 192.168.20.1
主机2:192.168.30.2 255.255.255.0 192.168.30.1
主机3:192.168.10.3 255.255.255.0 192.168.10.1
主机4:192.168.20.3 255.255.255.0 192.168.20.1
主机5:192.168.30.3 255.255.255.0 192.168.30.1
三:配置主机放入各自VLAN里面
1.先用主机6配置交换机2
创建VLAN
(1)en
(2)conf
(3) vlan 10
(4) exit
(5) vlan 20
(6) exit
(7) vlan 30
(8) exit
把主机0,1,2放入各自VLAN
(9) interface f0/2
(10)switchport access vlan 10
(11)exit
(12)interface f0/3
(13)switchport access vlan 20
(14)exit
(15)interface f0/4
(16)switchport access vlan 30
(17)exit
把二层交换机2和三层交换机连接的一号端口设置为trunk模式,让这个端口成为共享通道
(18) interface f0/1
(19) switchport mode trunk
(20)exit
是否配置好了,可以进行查询
(1)查询VLAN端口是否配置好
(2)查询trunk模式端口是否配置好
2.用主机7配置交换机3(和上步相同)
创建VLAN
(1) en
(2) conf
(3) vlan 10
(4) exit
(5) vlan 20
(6) exit
(7) vlan 30
(8) exit
把主机3,4,5端口划分到各自VLAN
(9) interface f0/2
(10) switchport access vlan 10
(11) exit
(12) interface f0/3
(13) switchport access vlan 20
(14) exit
(15) interface f0/4
(16)switchport access vlan 30
(17) exit
把二层交换机3和三层交换机连接的一号端口设置为trunk模式,让这个端口成为共享通道
(18) interface f0/1
(19) switchport mode trunk
(20) exit
最后也可以查询一下是否配置好
3.用主机8配置三层交换机
因为和两个二层交换机连接,则设置两个端口为trunk模式,分别和两个二层交换机建立共享通道
(【3-8】 步骤因为系统会自动创建三层交换机的trunk模式,所以可以不去配置)
(1) en
(2) conf
(3) interface f0/1
(4) swichport mode trunk
(5) exit
(6) interface f0/2
(7)switchport mode trunk
(8) exit
接着创建VLAN
(9) valn 10
(10) exit
(11) vlan 20
(12) exit
(13) valn 30
(14) exit
设置IP地址
(15) interface vlan 10
(16) ip address 192.168.10.1 255.255.255.0
(17) no shutdown
(18) exit
(19) interface valn 20
(20) ip address 192.168.20.1 255.255.255.0
(21) no shutdown
(22) exit
(23) interface vlan 30
(24) ip address 192.168.30.1 255.255.255.0
(25) no shutdown
(26) exit
4.ping命令是否为通
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。