《企业网络架构学习手册(共7页).doc》由会员分享,可在线阅读,更多相关《企业网络架构学习手册(共7页).doc(7页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、精选优质文档-倾情为你奉上第十一章 VLAN11.1 配置VLANs and VTP 1.这节实验主要用到的命令vlan database vlan ID name *vtp password *vtp domain *vtp pruning vtp mode *switchport trunk encapsulation *switchport mode *switchport access vlan IDencapsulation dot1Q VLAN ID 2.命令的定义vlan database :进入VLAN的配置模式下配置vlan ID name * :创建新的VLAN,并可以对创
2、建的VLAN进行命名vtp password * :VTP的验证密码配置vtp domain * :VTP的域名设置vtp pruning :VTP的裁剪vtp mode *:VTP的模式switchport trunk encapsulation *:对交换机接口进行干道的封装switchport mode *:交换机的接口模式switchport access vlan ID :把交换机的接口加入到VLAN中encapsulation dot1Q VLAN ID :对路由期子接口封装,加入VLAN3.所需设备下面是做这个实验练习所需的设备:1) 一台Cisco 路由器都具有一个以太网接口;
3、2) 两台Cisco交换机24接口;3) Cisco 10.0版或更高;4) 三台运行了终端仿真程序的PC可以连接到交换机端口;4.实验步骤:掌握VTP配置方法,掌握VLAN间路由配置方法以及子接口的配置。通过这个综合的实验了解完整的交换常用的各种模式的配置。 实验的拓扑如下图,IP地址在图中都有注明:1. 交换机SW1SW1(config)#interface fastEthernet 1/1SW1(config-if)#switchport trunk encapsulation dot1q SW1(config-if)#switchport mode trunk SW1(config-i
4、f)#exitSW1#vlan database SW1(vlan)#vtp domain ccnpChanging VTP domain name from NULL to ccnpSW1(vlan)#vtp server Device mode already VTP SERVER.SW1(vlan)#vtp password ciscoSetting device VLAN database password to cisco.SW1(vlan)#vtp pruningSW1#vlan database SW1(vlan)#vlan 10 name ciscoVLAN 10 added:
5、Name: ciscoSW1(vlan)#vlan 20 name microsoftVLAN 20 added: Name: microsoftSW1(vlan)#exitAPPLY completed.Exiting.SW1#configure terminalEnter configuration commands, one per line. End with CNTL/Z.SW1(config)#SW1(config)#interface fastEthernet 1/11SW1(config-if)#switchport access vlan 10SW1(config-if)#e
6、xitSW1(config)#SW1(config)#interface fastEthernet 1/12SW1(config-if)#switchport access vlan 20SW1(config-if)#exitSW1(config)#interface fastEthernet 1/5SW1(config-if)#switchport trunk encapsulation dot1q SW1(config-if)#SW1(config-if)#switchport mode trunk SW1(config-if)#exit2. 交换机SW2SW2(config)#inter
7、face fastEthernet 1/2SW2(config-if)#switchport trunk encapsulation dot1q SW2(config-if)#switchport mode trunk SW2(config-if)#exitSW2(config)#vtp password ciscoSetting device VLAN database password to ciscoSW2(config)#vtp domain ccnpChanging VTP domain name from fuckcisco to ccnpSW2(config)#vtp pruni
8、ngPruning switched onSW2(config)#vtp mode clientSetting device to VTP CLIENT mode.SW2(config)#SW2(config)#interface fastEthernet 1/11SW2(config-if)#switchport access vlan 20SW2(config-if)#exit3. 路由器R1R1(config)#R1(config)#interface fastEthernet 0/0R1(config-if)#no ip address R1(config-if)#no shutdow
9、n R1(config-if)#exitR1(config)#R1(config)#interface fastEthernet 0/0.10R1(config-subif)#encapsulation dot1Q 10R1(config-subif)#ip address 192.168.1.1 255.255.255.0R1(config-subif)#exitR1(config)#R1(config)#interface fastEthernet 0/0.20R1(config-subif)#encapsulation dot1Q 20R1(config-subif)#ip addres
10、s 192.168.2.1 255.255.255.0R1(config-subif)#exitR1(config)#5.监测配置查看SW1的VLAN配置:SW1#show vlan VLAN Name Status Ports- - - -1 default active Fa1/0, Fa1/2, Fa1/3, Fa1/4 Fa1/5, Fa1/6, Fa1/7, Fa1/8 Fa1/9, Fa1/10, Fa1/11, Fa1/12 Fa1/13, Fa1/14, Fa1/1510 cisco active 20 microsoft active 1002 fddi-default ac
11、tive 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2- - - - - - - - - - -1 enet 1500 - - - - - 1002 100310 enet 1500 - - - - - 0 0 20 enet 1500 - - - - - 0 0 1002 fddi 1500 - - - - - 1 10031003
12、tr 1500 1005 0 - - srb 1 10021004 fdnet 1500 - - 1 ibm - 0 0 1005 trnet 1500 - - 1 ibm - 0 0 SW1#查看SW2的VLAN信息:SW2#show vlanVLAN Name Status Ports- - - -1 default active Fa0/3, Fa0/4, Fa0/5, Fa0/6 Fa0/7, Fa0/8, Fa0/9, Fa0/10 Fa0/11, Fa0/12, Fa0/13, Fa0/14 Fa0/15, Fa0/16, Fa0/17, Fa0/18 Fa0/19, Fa0/20
13、, Fa0/21, Fa0/22 Fa0/23, Fa0/24, Gi0/1, Gi0/210 cisco active20 microsoft active1002 fddi-default act/unsup1003 token-ring-default act/unsup1004 fddinet-default act/unsup1005 trnet-default act/unsup查看SW1的VTP的状态信息:SW1#show vtp status VTP Version : 2Configuration Revision : 2Maximum VLANs supported loc
14、ally : 256Number of existing VLANs : 7VTP Operating Mode : ServerVTP Domain Name : ccnpVTP Pruning Mode : DisabledVTP V2 Mode : DisabledVTP Traps Generation : DisabledMD5 digest : 0xF3 0x1C 0x33 0x46 0xEA 0x14 0xBB 0x9F Configuration last modified by 0.0.0.0 at 3-1-02 00:52:53Local updater ID is 0.0
15、.0.0 (no valid interface found)SW1#查看SW2的VTP的状态信息:SW2#show vtp status VTP Version : 2Configuration Revision : 2Maximum VLANs supported locally : 256Number of existing VLANs : 7VTP Operating Mode : ClientVTP Domain Name : ccnpVTP Pruning Mode : DisabledVTP V2 Mode : DisabledVTP Traps Generation : Dis
16、abledMD5 digest : 0xF3 0x1C 0x33 0x46 0xEA 0x14 0xBB 0x9F Configuration last modified by 0.0.0.0 at 3-1-02 00:52:53SW2#查看R1的路由表:R1#show ip route Gateway of last resort is not setC 192.168.1.0/24 is directly connected, FastEthernet0/0.10C 192.168.2.0/24 is directly connected, FastEthernet0/0.20R1#在PC
17、1、PC2和PC3使用ping命令测试VLAN间路由:PC1#ping 192.168.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 16/232/1040 msPC1#PC1#ping 192.168.2.1Type escape sequence to abort.Sending 5, 100-byte ICMP E
18、chos to 192.168.2.1, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 4/223/1012 msPC1#PC1#ping 192.168.2.10Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.2.10, timeout is 2 seconds:.!Success rate is 60 percent (3/5), round-trip min/avg/max =
19、 12/48/92 msPC1#PC1#ping 192.168.2.20Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.2.20, timeout is 2 seconds:.!Success rate is 60 percent (3/5), round-trip min/avg/max = 20/52/96 msPC1#PC2#ping 192.168.1.10Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192
20、.168.1.10, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 20/48/88 msPC2#PC3#ping 192.168.1.10Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.10, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 12/50/88 msPC3#专心-专注-专业