《CCNA攻略补充之VTP与VLAN配置.docx》由会员分享,可在线阅读,更多相关《CCNA攻略补充之VTP与VLAN配置.docx(15页珍藏版)》请在第一文库网上搜索。
1、CCNA攻略补充之VTP与VLAN配置2009-04-08 12:57本篇文章是对CCNA实验攻略(3)Cisco VTP的详细补充。F Packet Tracer 5.0 by Cisco Systems, Inc.Time: 00:06:33Power Cycle DevicesFile Edit Options View Tools Extensions HelpScenario 0ConnectionsNewDeleteFire.rbainrCopper Straight-ThroughToggle PDU List Window图一实验拓扑图配置步骤:1、配置VTP协议Cisco 3
2、560交换机配置命令,Cisco 3560交换机作为VTP Server,是局域网中的核心交换机。3560 (config)#vtp domain senyaChanging VTP domain name from NULL to senya3560 (config)#vtp server3560 (config)#vtp mode serverDevice mode already VTP SERVER.查看VTP的配置3560#sh vtp statusVTP Version: 2Configuration Revision: 4Maximum VLANs supported local
3、ly : 1005Number of existing VLANsVTP Operating ModeVTP Domain NameVTP Pruning ModeVTP V2 ModeVTP Traps GenerationMD5 digest0xD3 0xC8 0x55 OxCl 0x58:7:Server:senya:Disabled:Disabled:Disabled:0x51 0x27 OxlE00:19:44(lowest numbered VLANConfiguration last modified by 0.0. 0. 0 at 3-1-93Local updater ID
4、is 192. 168. 1.254 on interface V12interface found)两个作为接入汇聚层的2950的配置VTP的命令2950A(config)#vtp domain senyaChanging VTP domain name from NULL to senya2950A(config)#vtp mode clientSetting device to VTP CLIENT mode.2950A(config)#查看VTP的配置2950A#sh vtp status:2:4:7:Client:senya:Disabled:Disabled:Disabled:0x
5、51 0x27 OxlEat 3-1-93 00:19:44VTP VersionConfiguration RevisionMaximum VLANs supported locally : 255Number of existing VLANsVTP Operating ModeVTP Domain NameVTP Pruning ModeVTP V2 ModeVTP Traps GenerationMD5 digest0xD3 0xC8 0x55 OxCl 0x58Configuration last modified by 0.0.0.02、配置trunk链路两个Cisco 2950交
6、换机使用fastthernetO/24端口分别与核心交换机的24、23端口相连,这两条链路应为trunk,相连的每个端口为trunk类型,配置命令相同,如下:2950B(config)tiinterface faO/242950B(config-if)#switchport mode trunk2950B(config-if)#switchport trunk allowed vlan all3、在核心交换机Cisco 3560上创建两个Vian: vlan 2名称为math; vlan3名称为chineseo3560 (config)#vlan 23560 (config-vlan)#nam
7、e math3560 (config-vlan)#vlan 33560(config-vlan)ttname Chinese在三个交换机上使用sh vlan命令均可以查看到如下的vlan信息:2950A#sh vlanVLANNamePortsStatus1 defaultive Fa0/l, FaO/2, FaO/3, FaO/4FaO/5, FaO/6, FaO/7, FaO/8FaO/12FaO/15, FaO/16FaO/18, FaO/19, Fa0/202 mathactive3 ChineseactactactiveactiveactiveactiveVLAN Type SAID
8、MTUParent RingNo BridgeNo Stp BrdgModeive1002fddi-default1003 token-ring-default1004 fddinet-default1005 trnet-defaultTransl Trans21 enet 100001150002enet 100002150003enet 100003150001002 enet 101002150001003 enet 101003150001004 enet 101004150001005 enet 1010051500000000004、把端口划分到相应的Vian2950A#conf
9、tEnter configuration commands, one per line. End with CNTL/Z.2950A(config)tiinterface fa0/l2950A(config-if)#switchport mode access2950A (config-if)#switchport access vlan 22950A(config-if)Winterface faO/22950A (config-if)#switchport mode access2950A(config-if)#switchport access vlan 32950A (config-i
10、f)#quit2950B#conf tEnter configuration commands, one per line. End with CNTL/Z.2950B(config)ttinterface fa0/l2950B(config-if)#switchport mode access2950B(config-if)#switchport access vlan 22950B(config-if)#interface faO/22950B (config-if)#swi tchport mode access2950B (config-if)#switchport access vl
11、an 32950B(config-if)#exit5、配置IP地址信息vlan 2接口的IP地址:3560 (config)ttinterface vlan 2%LINK-5-CHANGED: Interface Vlan2, changed state to up%LTNEPR0T0-5-UPD0WN: Line protocol on Interface Vlan2, changed state toup3560(config-if)#ip address 192. 168. 1. 254 255. 255. 255. 0vlan 3接口的IP地址:3560(config-if)Winte
12、rface vlan 3%LINK-5-CHANGED: Interface Vlan3, changed state to up%LTNEPR0T0-5-UPD0WN: Line protocol on Interface Vlan3, changed state toup3560(config-if)#ip address 192. 168. 2. 254 255. 255. 255. 03560(config-if)#quit在图一中pcO与pc2划入了 vlan 2,因此它们的网关应该为192. 168. 1. 254,ip 地址我分别配置为 192. 168. 1. 1 192. 1
13、68. 1. 2; pci 与 pc3 属于 vlan 3,它们的网关应该为192. 168. 2. 254, ip地址我分别配置为192. 168. 2. 1与192. 168. 2. 2o6、连通性测试图二7、每个交换机的配置文件Cisco 3560:3560#sh runBuilding configuration.Current configuration : 1144 bytesversion 12. 2no service password-encryptionihostname 3560ip ssh version 1iport-channel load-balance src-
14、maciinterface FastEthernetO/1iinterface FastEthernetO/2!interface FastEthernetO/3iinterface FastEthernetO/4iinterface FastEthernetO/5iinterface FastEthernetO/6iinterface FastEthernetO/7iinterface FastEthernetO/8iinterface FastEthernetO/9Iinterface FastEthernet0/10iinterface FastEthernetO/11iinterface FastEthernetO/12iinterface FastEthernetO/13iinterface FastEthernetO/14interface FastEthernetO/15interface FastEthernetO/16Iinterface FastEthernetO/17i