《CCNA攻略补充之VTP与VLAN配置.docx》由会员分享,可在线阅读,更多相关《CCNA攻略补充之VTP与VLAN配置.docx(15页珍藏版)》请在第一文库网上搜索。
1、CCNA攻略补充之VTP与VLAN配置2009-04-0812:57本篇文章是对CCNA实验攻略(3)CiscoVTP的详细补充。FPacket Tracer 5.0 by Cisco Systems, Inc.Time:00:06:33PowerCycle DevicesFileEdit Options View Tools Extensions HelpScenario0ConnectionsNewDeleteFire.rbainrCopperStraight-ThroughTogglePDU List Window图一实验拓扑图配置步骤:1、配置VTP协议Cisco3560交换机配置命令
2、,Cisco3560交换机作为VTPServer,是局域网中的核心交换机。3560(config)#vtpdomainsenyaChangingVTPdomainnamefromNULLtosenya3560(config)#vtpserver3560(config)#vtpmodeserverDevicemodealreadyVTPSERVER.查看VTP的配置3560#shvtpstatusVTPVersion:2ConfigurationRevision:4MaximumVLANssupportedlocally:1005Numberof existing VLANsVTP Operat
3、ing ModeVTP Domain NameVTP Pruning ModeVTP V2 ModeVTP Traps GenerationMD5 digest0xD3 0xC8 0x55 OxCl 0x58:7:Server:senya:Disabled:Disabled:Disabled:0x510x27OxlE00:19:44(lowestnumbered VLANConfigurationlastmodifiedby0.0.0.0at3-1-93LocalupdaterIDis192.168.1.254oninterfaceV12interfacefound)两个作为接入汇聚层的295
4、0的配置VTP的命令2950A(config)#vtpdomainsenyaChangingVTPdomainnamefromNULLtosenya2950A(config)#vtpmodeclientSettingdevicetoVTPCLIENTmode.2950A(config)#查看VTP的配置2950A#shvtpstatus:2:4:7:Client:senya:Disabled:Disabled:Disabled:0x510x27 OxlEat 3-1-93 00:19:44VTPVersionConfigurationRevisionMaximumVLANssupportedl
5、ocally:255NumberofexistingVLANsVTPOperatingModeVTPDomainNameVTPPruningModeVTPV2ModeVTPTrapsGenerationMD5digest0xD30xC80x55OxCl0x58Configurationlastmodifiedby0.0.0.02、配置trunk链路两个Cisco2950交换机使用fastthernetO/24端口分别与核心交换机的24、23端口相连,这两条链路应为trunk,相连的每个端口为trunk类型,配置命令相同,如下:2950B(config)tiinterfacefaO/242950
6、B(config-if)#switchportmodetrunk2950B(config-if)#switchporttrunkallowedvlanall3、在核心交换机Cisco3560上创建两个Vian:vlan2名称为math;vlan3名称为chineseo3560(config)#vlan23560(config-vlan)#namemath3560(config-vlan)#vlan33560(config-vlan)ttnameChinese在三个交换机上使用shvlan命令均可以查看到如下的vlan信息:2950A#shvlanVLANNamePortsStatus1 def
7、aultiveFa0/l,FaO/2,FaO/3,FaO/4FaO/5,FaO/6,FaO/7,FaO/8FaO/12FaO/15,FaO/16FaO/18,FaO/19,Fa0/202 mathactive3 ChineseactactactiveactiveactiveactiveVLANType SAIDMTUParentRingNo BridgeNo Stp BrdgModeive1002fddi-default1003token-ring-default1004fddinet-default1005trnet-defaultTranslTrans21enet100001150002e
8、net100002150003enet100003150001002enet101002150001003enet101003150001004enet101004150001005enet1010051500000000004、把端口划分到相应的Vian2950A#conftEnterconfigurationcommands,oneperline.EndwithCNTL/Z.2950A(config)tiinterfacefa0/l2950A(config-if)#switchportmodeaccess2950A(config-if)#switchportaccessvlan22950A
9、(config-if)WinterfacefaO/22950A(config-if)#switchportmodeaccess2950A(config-if)#switchportaccessvlan32950A(config-if)#quit2950B#conftEnterconfigurationcommands,oneperline.EndwithCNTL/Z.2950B(config)ttinterfacefa0/l2950B(config-if)#switchportmodeaccess2950B(config-if)#switchportaccessvlan22950B(confi
10、g-if)#interfacefaO/22950B(config-if)#switchportmodeaccess2950B(config-if)#switchportaccessvlan32950B(config-if)#exit5、配置IP地址信息vlan2接口的IP地址:3560(config)ttinterfacevlan2%LINK-5-CHANGED:InterfaceVlan2,changedstatetoup%LTNEPR0T0-5-UPD0WN:LineprotocolonInterfaceVlan2,changedstatetoup3560(config-if)#ipadd
11、ress192.168.1.254255.255.255.0vlan3接口的IP地址:3560(config-if)Winterfacevlan3%LINK-5-CHANGED:InterfaceVlan3,changedstatetoup%LTNEPR0T0-5-UPD0WN:LineprotocolonInterfaceVlan3,changedstatetoup3560(config-if)#ipaddress192.168.2.254255.255.255.03560(config-if)#quit在图一中pcO与pc2划入了vlan2,因此它们的网关应该为192.168.1.254,
12、ip地址我分别配置为192.168.1.1192.168.1.2;pci与pc3属于vlan3,它们的网关应该为192.168.2.254,ip地址我分别配置为192.168.2.1与192.168.2.2o6、连通性测试图二7、每个交换机的配置文件Cisco3560:3560#shrunBuildingconfiguration.Currentconfiguration:1144bytesversion12.2noservicepassword-encryptionihostname3560ipsshversion1iport-channelload-balancesrc-maciinter
13、faceFastEthernetO/1iinterfaceFastEthernetO/2!interfaceFastEthernetO/3iinterfaceFastEthernetO/4iinterfaceFastEthernetO/5iinterfaceFastEthernetO/6iinterfaceFastEthernetO/7iinterfaceFastEthernetO/8iinterfaceFastEthernetO/9IinterfaceFastEthernet0/10iinterfaceFastEthernetO/11iinterfaceFastEthernetO/12iin
14、terfaceFastEthernetO/13iinterfaceFastEthernetO/14interfaceFastEthernetO/15interfaceFastEthernetO/16IinterfaceFastEthernetO/17iinterfaceFastEthernetO/18iinterfaceFastEthernetO/19IinterfaceFastEthernet0/20iinterfaceFastEthernetO/21iinterfaceFastEthernetO/22!interfaceFastEthernetO/23switchportmodetrunkinterfaceFastEthernetO/24switchportmodetrunkiinterfaceGigabitEthernetO/1iinterfaceGigabitEthernetO/2iinterfaceVlan