文档介绍:County continuation records has examined and approved the draft, spirit, believe, comprehensive Yearbook of zhuanglang aif)#switchport mode access
Switch(config-if)#switchport access vlan 3
Switch(config-if)#no shutdown
Switch(config-if)#end
实验结果截图
未划分vlan时,pc1、pc2、pc3相互进行ping操作
〔2〕划分vlan后,pc1、pc2、pc3相互进行ping操作
County continuation records has examined and approved the draft, spirit, believe, comprehensive Yearbook of zhuanglang already prepared draft, entered the phase of evaluation. Civil air defense work
2
五、结论
在没有划分vlan前在同一交换机上的所有pc机都能够相互ping通,但是划分vlan后,在不同的网段内需要经过路由,所以pc1和pc2不能ping通pc3。
实训3 跨交换机同vlan间互通
一、任务与目的
1. 实验任务:
(1) 掌握和完成设置跨交换机同vlan间互通的方法;
(2) 完成同vlan间计算机的测试。
2. 实验目的:
(1) 进一步熟悉交换机vlan的配置方法;
(2) 熟悉和掌握划分跨交换机同vlan间互通的意义。
二、原理〔条件〕
相关知识:
(1) Vlan的工作原理;
(2) 配置VLAN及trunk的相关命令。
:
(1) cisco pt软件。
三、内容与步骤
1.实验内容:
在两台CISCO 2950交换机上分别划分VLAN,如图4所示,并连接两台
2950。
通过配置,使得跨交换机同VLAN间计算机互通。
County continuation records has examined and approved the draft, spirit, believe, comprehensive Yearbook of zhuanglang already prepared draft, entered the phase of evaluation. Civil air defense work
26
图4 简单VLAN配置结构图
2. 测试方法
未配置trunk前,pc1 ping pc2、pc3、pc4查看结果; pc2 ping pc4查看结果。
〔2〕 配置trunk后pc1 ping pc2、pc3、pc4查看结果; pc2 ping pc4查看
结果。
四、数据处理〔现象分析〕
〔1〕设置不同vlan的网络地址
〔2〕设置pc机的ip地址
〔3〕在交换机上划分不同vlan
〔4〕指定端口到不同vlan
〔5〕将两台交换机的fa0/10设置成串口
〔1〕
Switch# vlan database
Switch(vlan)# vlan 2
Switch(vlan)#vlan 3
Switch(vlan)#exit
Switch#show vlan
指定端口到不同vlan
Switch#conf t
Switch(config)#int fa0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#no shutdown
County continuation records has examined and approved the draft, spirit, believe, comprehensive Yearbook of zhuanglang already prepared draft, entered the phase of evaluation. Civil air defense work
4
Switch(config-if)