资源描述:
《实验二、虚拟局域网VLAN》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、实验二、虚拟局域网VLAN一、实验目的:学会VLAN的建立与PC的划分二、实验拓扑图:F0/15SwitchPC1PC2VLAN20VLAN10F0/5三、实验步骤:1.开始/程序/附件/通讯/超级终端/连接时使用:TCP/IP/主机地址:172.16.5.1/d6/password:star2.开始/运行/telnet172.16.5.1/enable/password:starPassword:starD63.命令:SwitchA>enablePassword:SwitchA#configterminalEnterconfigurationcomman
2、ds,oneperline.EndwithCNTL/Z.SwitchA(config)#一、在未划分VLAN前两台PC相互ping可以通。下面创建VLAN。Switch>enableSwitch#configureterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.Switch(config)#vlan102005-03-1019:38:01@5-CONFIG:ConfiguredfromoutbandSwitch(config-vlan)#nametest102005-03-1019:3
3、8:12@5-CONFIG:ConfiguredfromoutbandSwitch(config-vlan)#exit2005-03-1019:38:29@5-CONFIG:ConfiguredfromoutbandSwitch(config)#vlan202005-03-1019:38:37@5-CONFIG:ConfiguredfromoutbandSwitch(config)#vlan202005-03-1019:38:37@5-CONFIG:ConfiguredfromoutbandSwitch(config-vlan)#nametest20200
4、5-03-1019:38:45@5-CONFIG:ConfiguredfromoutbandSwitch(config-vlan)#exit2005-03-1019:41:36@5-CONFIG:ConfiguredfromoutbandSwitch(config)#exit2005-03-1019:41:40@5-CONFIG:Configuredfromoutband验证测试:Switch#showvlanVLANNameStatusPorts-------------------------------------------------------
5、---------------------1defaultactiveFa0/1,Fa0/2,Fa0/3Fa0/4,Fa0/5,Fa0/6Fa0/7,Fa0/8,Fa0/9Fa0/10,Fa0/11,Fa0/12Fa0/13,Fa0/14,Fa0/15Fa0/16,Fa0/17,Fa0/18Fa0/19,Fa0/20,Fa0/21Fa0/22,Fa0/23,Fa0/2410test10active!创建的VLAN10,没有端口属于VLAN10中20test20active!创建的VLAN20,没有端口属于VLAN20中!默认情况下所有接口都属于VLAN1S
6、witch#一、将接口分配到VLANSwitch#Switch#configureterminalEnterconfigurationcommands,oneperline.EndwithCNTL/Z.Switch(config)#interfacefastethernet0/52005-03-1019:49:59@5-CONFIG:ConfiguredfromoutbandSwitch(config-if)#switchportaccessvlan102005-03-1019:50:25@5-CONFIG:ConfiguredfromoutbandSwi
7、tch(config-if)#exit2005-03-1019:50:43@5-CONFIG:ConfiguredfromoutbandSwitch(config)#interfacefastethernet0/152005-03-1019:51:47@5-CONFIG:ConfiguredfromoutbandSwitch(config-if)#switchportaccessvlan202005-03-1019:52:15@5-CONFIG:ConfiguredfromoutbandSwitch(config-if)#exit2005-03-1019:
8、52:28@5-CONFIG:Configuredfromoutb