资源描述:
《实验六 虚拟局域网VLAN.doc》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、实验六虚拟局域网VLAN(一)实验1交换机端口隔离1.实验名称交换机端口隔离。2.实验目的理解PortVlan的配置。3.背景描述假设此交换机是宽带小区城域网中的一台楼道交换机,住户PCI连接在交换机的0/5口;住户PC2连接在交换机的0/5口,现要实现各家各户的端口隔离。4.实现功能通过划分PORTVLAN实现本交换端口隔离。5.实验步骤步骤1.在未划VLAN前两台PC互相PING可以通。创建VLAN。SwitchA>enable14Password:SwitchA#configureterminal!进入交换机全局配置模式SwitchA(confi
2、g)#vlan10!创建vlan10SwitchA(config-vlan)#nametest10!将vlan10命名为test10SwitchA(config)#vlan20!创建vlan20SwitchA(config-vlan)#nametest20!将vlan20命名为test20验证测试:SwitchA#showvlanVLANNameStatusPorts----------------------------------------------------------------------------1defaultactiveFa0/
3、1,Fa0/2,Fa0/3,Fa0/4Fa0/6,Fa0/7,Fa0/8,Fa0/9Fa0/10,Fa0/11,Fa0/12,Fa0/13Fa0/14,Fa0/16,Fa0/17,Fa0/18Fa0/19,Fa0/20,Fa0/21,Fa0/22Fa0/23,Fa0/2410test10activeFa0/520test20activeFa0/15步骤2.将接口分配到vlan。SwitchA#configureterminalSwitchA(config)#interfacefastethernet0/5!进入fastethernet0/5的接口配置模
4、式SwitchA(config-if)#switchaccessvlan10!进入fastethernet0/5端口加入vlan10中SwitchA(config-if)#interfacefastethernet0/15!进入fastethernet0/15的接口配置模式SwitchA(config-if)#switchaccessvlan20!将fastethernet0/15端口加入vlan20中步骤3.两台PC互相PING不通。验证测试:SwitchA#showvlanVLANNameStatusPorts-------------------
5、---------------------------------------------------------1defaultactiveFa0/1,Fa0/2,Fa0/3,Fa0/4Fa0/6,Fa0/7,Fa0/8,Fa0/9Fa0/10,Fa0/11,Fa0/12,Fa0/13Fa0/14,Fa0/16,Fa0/17,Fa0/18Fa0/19,Fa0/20,Fa0/21,Fa0/22Fa0/23,Fa0/2410test10activeFa0/520test20activeFa0/156.注意事项清空交换机原有VLAN配置。Deletefla
6、sh:config.Text.Deleteflash:vlan.dat7.参考配置SwitchA#showrunning-configSystemsoftwareversion:2.41(1)BuildAug312005ReleaseBuildingconfiguration...Currentconfiguration:468bytes!version1.0!hostnameSwitchAvlan1!vlan10nametest10!vlan20nametest20!enablesecretlevel15'T,1u_;C3U-8U07、G54/7R:>Henablesecretlevel145'T,1u_;C3U-8U0Henablesecretlevel155([^.Y*T7[^,tZ[V/[^+S(W&[^1X)sv'!interfaceFastEthernet0/5switchportaccessvlan10!interfaceFastEthernet0/15switchportaccessvlan20!interfaceVlan1ipaddress192.168.6.254255.255.255.0!End实验2跨交换机实现VLAN1.实验
8、名称跨交换机实现VLAN。2.实验目的理解vlan如何跨交换机实现。3.背景描述假设某企业2个