企业网络架构学习手册11.doc_第1页
企业网络架构学习手册11.doc_第2页
企业网络架构学习手册11.doc_第3页
企业网络架构学习手册11.doc_第4页
企业网络架构学习手册11.doc_第5页
免费预览已结束,剩余2页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

第十一章 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,并可以对创建的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 路由器都具有一个以太网接口;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-if)#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: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)#exitSW1(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)#interface 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 pruningPruning 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 shutdown 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 address 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 active 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 100001 1500 - - - - - 1002 100310 enet 100010 1500 - - - - - 0 0 20 enet 100020 1500 - - - - - 0 0 1002 fddi 101002 1500 - - - - - 1 10031003 tr 101003 1500 1005 0 - - srb 1 10021004 fdnet 101004 1500 - - 1 ibm - 0 0 1005 trnet 101005 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, 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 locally : 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.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 : DisabledMD5 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#在PC1、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 Echos 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 =

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论