




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
实验时间:实验人:冯刚实验名称:三层交换与DHCP中继实验任务和目标:任务1.配置三层交换,是内部VLAN间互通【截图验证】任务2.配置DHCP中继,使VLAN2中的DHCPSERVER对VLAN3中的CLIENT生效【截图验证】相关命令补充:实验拓扑及网络规划:实验操作过程及配置说明:在这里我先做一下变化说明如下所示:Switch1F0/0<---->Router1E0/0Switch1F0/15<---->Switch2F0/15Switch2F0/2<---->XPCP0/1(net1vlan2,VS4,做DHCPSERVER)Switch2F0/3<---->XPCP0/0(net8vlan3,VS3CLIENT)在二层交换机上我只桥接了2台虚拟PC,VS4,VS3VS4:IP:192.168.2.1/24GW:192.168.2.54VLAN2VS3:IP:192.168.3.1/24GW:192.168.3.254VLAN3VLAN1不用。实验2:以下所示是实验拓朴图:和上面同的地方就是,我用一台路由器代替上面的PC机做DHCPSERVER,(VLAN3)。目的:能够让VLAN2中的PC机通过三层交换机上的DHCP中继功能从VLAN3中的路由器上的DHCPSERVER中得到IP地址。Switch1F0/15<---->Switch2F0/15Switch2F0/3<---->Router1E0/1(vlan3)Switch2F0/2<---->XPCP0/0(vlan2,net1)实验结果【可以是截屏图片】:以下是两个实验的详细过程,有什么不对的地方,请老师指导,TKS总结和分析、结论:实验1:详细方法如下所示:任务1:配置三层交换,是内部VLAN间互通1.sw1-3(config)#in(trunkstart)sw1-3(config)#interfacef0/15sw1-3(config-if)#swsw1-3(config-if)#switchportmosw1-3(config-if)#switchportmodetrsw1-3(config-if)#noshsw1-3(config)#interfacef0/0sw1-3(config-if)#swsw1-3(config-if)#switchportmosw1-3(config-if)#switchportmodetrsw1-3(config-if)#switchportmodetrunksw1-3(config-if)#nosh2.sw1-3#vlda(configvtpserver)sw1-3(vlan)#vtpdomaintestChangingVTPdomainnamefromNULLtotestsw1-3(vlan)#vtpserverDevicemodealreadyVTPSERVER.sw1-3(vlan)#vtppassword111111SettingdeviceVLANdatabasepasswordto111111.sw1-3(vlan)#vtpv2-modeV2modeenabled.sw1-3(vlan)#vtppruningPruningswitchedONsw1-3(vlan)#exit3.sw2-2starttrunk(和SW1-3相同配置,略)configvtpclient(和SW1-3配置差不多,略)4.sw1-3#vldasw1-3(vlan)#vlan2namev2VLAN2added:Name:v2sw1-3(vlan)#applyAPPLYcompleted.sw1-3(vlan)#vlan3namev3VLAN3added:Name:v3sw1-3(vlan)#applyAPPLYcompleted.sw1-3(vlan)#exitAPPLYcompleted.Exiting....sw1-3#exit5.CLIENTTESTsw2-2#showvlan-switchVLANNameStatusPorts----------------------------------------------------------------------------1defaultactiveFa0/0,Fa0/1,Fa0/2,Fa0/3Fa0/4,Fa0/5,Fa0/6,Fa0/7Fa0/8,Fa0/9,Fa0/10,Fa0/11Fa0/12,Fa0/13,Fa0/142v2active3v3active1002fddi-defaultactive1003trcrf-defaultactive1004fddinet-defaultactive1005trbrf-defaultactive6.sw2-2#conft(划分接口到VLAN中)Enterconfigurationcommands,oneperline.EndwithCNTL/Z.sw2-2(config)#interfacef0/2sw2-2(config-if)#switchportaccessvlan2sw2-2(config-if)#switchportmodeaccess(定义为二层接口)sw2-2(config-if)#noshsw2-2(config-if)#exitsw2-2(config)#interfacef0/3sw2-2(config-if)#switchportaccessvlan3sw2-2(config-if)#switchportmodeaccesssw2-2(config-if)#noshsw2-2(config-if)#exitsw2-2(config)#exitsw2-2#7.sw2-2#showvlan-switch(test)VLANNameStatusPorts----------------------------------------------------------------------------1defaultactiveFa0/0,Fa0/1,Fa0/4,Fa0/5Fa0/6,Fa0/7,Fa0/8,Fa0/9Fa0/10,Fa0/11,Fa0/12,Fa0/13Fa0/142v2activeFa0/23v3activeFa0/31002fddi-defaultactive1003trcrf-defaultactive1004fddinet-defaultactive1005trbrf-defaultactive8.sw1-3(config)#iprouting(start路由功能)9.sw1-3(config)#interfacevlan2(三层交换机上VLAN配IP。为二层VLANGW)sw1-3(config-if)#ipadd192.168.2.254255.255.255.0sw1-3(config-if)#noshsw1-3(config-if)#exitsw1-3(config)#interfacevlan3sw1-3(config-if)#ipadd192.168.3.254255.255.255.0sw1-3(config-if)#noshsw1-3(config-if)#exitsw1-3#showiprouteCodes:C-connected,S-static,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticrouteo-ODR,P-periodicdownloadedstaticrouteGatewayoflastresortisnotsetC192.168.2.0/24isdirectlyconnected,Vlan2C192.168.3.0/24isdirectlyconnected,Vlan310.sw1-3#showipinbr(TEST)InterfaceIP-AddressOK?MethodStatusProtocolFastEthernet0/0unassignedYESunsetupupFastEthernet0/1unassignedYESunsetupdownFastEthernet0/2unassignedYESunsetupdownFastEthernet0/3unassignedYESunsetupdownFastEthernet0/4unassignedYESunsetupdownFastEthernet0/5unassignedYESunsetupdownFastEthernet0/6unassignedYESunsetupdownFastEthernet0/7unassignedYESunsetupdownFastEthernet0/8unassignedYESunsetupdownFastEthernet0/9unassignedYESunsetupdownFastEthernet0/10unassignedYESunsetupdownFastEthernet0/11unassignedYESunsetupdownFastEthernet0/12unassignedYESunsetupdownFastEthernet0/13unassignedYESunsetupdownFastEthernet0/14unassignedYESunsetupdownFastEthernet0/15unassignedYESunsetupupVlan1unassignedYESunsetupupVlan2192.168.2.254YESmanualupupVlan3192.168.3.254YESmanualupup11.测试不同VLAN间是否可PING通VLAN2VS4:VLAN3VS3:12.在三层交换机上配置路由接口和IP,并运行RIP。在路由器上配置相应接口的IP,并运行RIP,结果,使VALN2和VLAN3中的主机可以通过三层交换和外部相通。sw1-3(config-if)#interfacef0/0sw1-3(config-if)#noswitchport(关掉接口交换功能)sw1-3(config-if)#ipadd192.168.5.1255.255.255.0sw1-3(config-if)#noshsw1-3(config-if)#exitsw1-3(config)#exitsw1-3#showipinbrInterfaceIP-AddressOK?MethodStatusProtocolFastEthernet0/0192.168.5.1YESmanualupupFastEthernet0/1unassignedYESunsetupdownsw1-3(config)#routerrip(运行RIP)sw1-3(config-router)#network192.168.5.0sw1-3(config-router)#network192.168.2.0sw1-3(config-router)#network192.168.3.0sw1-3(config-router)#exitsw1-3(config)#exitsw1-3#sw1-3#showiprouteCodes:C-connected,S-static,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticrouteo-ODR,P-periodicdownloadedstaticrouteGatewayoflastresortisnotsetC192.168.5.0/24isdirectlyconnected,FastEthernet0/0R192.168.6.0/24[120/1]via192.168.5.2,00:00:03,FastEthernet0/0C192.168.2.0/24isdirectlyconnected,Vlan2C192.168.3.0/24isdirectlyconnected,Vlan3sw1-3#R1(config)#interfacee0/0R1(config-if)#ipadd192.168.5.2255.255.255.0R1(config-if)#noshR1(config-if)#exiR1(config)#interfacelo0(环回)R1(config-if)#ipadd192.168.6.1255.255.255.0R1(config-if)#noshR1(config-if)#exitR1(config)#exitR1#showipinbrInterfaceIP-AddressOK?MethodStatusProtocolEthernet0/0192.168.5.2YESmanualupupEthernet0/1unassignedYESunsetadministrativelydowndownEthernet0/2unassignedYESunsetadministrativelydowndownEthernet0/3unassignedYESunsetadministrativelydowndownLoopback0192.168.6.1YESmanualupupR1(config)#routerrip(运行RIP)R1(config-router)#network192.168.5.0R1(config-router)#network192.168.6.0R1(config-router)#exitR1(config)#exitR1#showiprouteCodes:C-connected,S-static,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticrouteo-ODR,P-periodicdownloadedstaticrouteGatewayoflastresortisnotsetC192.168.5.0/24isdirectlyconnected,Ethernet0/0C192.168.6.0/24isdirectlyconnected,Loopback0R192.168.2.0/24[120/1]via192.168.5.1,00:00:03,Ethernet0/0R192.168.3.0/24[120/1]via192.168.5.1,00:00:03,Ethernet0/013.测试。VLAN2:VLAN3:14.。任务1OK!任务2:.配置DHCP中继,使VLAN2中的DHCPSERVER对VLAN3中的CLIENT生效在VLAN2的主机中配置DHCPSERVER本VALN2中的CLIENT申请IPVLAN3中的CLIENT申请IP:以上原因很明显,之所以VLAN3中的CLIENT没有得到IP,是因为不同VLAN之间相通是要通过路由的,而在,申请IP时,用的是广播地址,路由是隔离广播的,所以,没有得以IP,解决的方法就是在,SW1-3上面做中继代理:sw1-3(config)#interfacevlan2sw1-3(config-if)#iphelper-address192.168.2.1sw1-3(config-if)#exitsw1-3(config)#interfacevlan3sw1-3(config-if)#iphelper-address192.168.2.1sw1-3(config-if)#exitsw1-3(confi测试VLNA3中的CLIENT是否能够得到IP测试成功!实验2:详细过程:在SW1-3和SW2-2中打开F0/15为中继端口(TRUNK,同上,略)在SW1-3和SW2-2上做VTP,并且,新建VLAN2,3。(同上,略)SW1-3为VTPSERVER,并新建VLAN2,3。2SW2-2为VTPCLIENT。在SW1-3和SW2-2中分别测试VLAN是否OK!(同上,略) SW2-2中划接口F0/2到VLAN2,划接口F0/3到VLAN3。sw2-2#conft(划分接口到VLAN中)Enterconfigurationcommands,oneperline.EndwithCNTL/Z.sw2-2(config)#interfacef0/2sw2-2(config-if)#switchportaccessvlan2sw2-2(config-if)#switchportmodeaccess(定义为二层接口)sw2-2(config-if)#noshsw2-2(config-if)#exitsw2-2(config)#interfacef0/3sw2-2(config-if)#switchportaccessvlan3sw2-2(config-if)#switchportmodeaccesssw2-2(config-if)#noshsw2-2(config-if)#exitsw2-2(config)#exitsw2-2#5.sw2-2#showvlan-switch(test)VLANNameStatusPorts----------------------------------------------------------------------------1defaultactiveFa0/0,Fa0/1,Fa0/4,Fa0/5Fa0/6,Fa0/7,Fa0/8,Fa0/9Fa0/10,Fa0/11,Fa0/12,Fa0/13Fa0/142v2activeFa0/23v3activeFa0/31002fddi-defaultactive1003trcrf-defaultactive1004fddinet-defaultactive1005trbrf-defaultactive6.sw1-3(config)#iprouting7.sw1-3(config)#interfacevlan3sw1-3(config-if)#ipadd192.168.3.254255.255.255.0sw1-3(config-if)#noshsw1-3(config-if)#exitsw1-3(config)#insw1-3(config)#intersw1-3(config)#interfacevlan2sw1-3(config-if)#ipadd192.168.2.254255.255.255.0sw1-3(config-if)#noshsw1-3(config-if)#exitsw1-3(config)#exitsw1-3#h8.sw1-3#showipinbrInterfaceIP-AddressOK?MethodStatusProtocolFastEthernet0/0unassignedYESunsetupdownFastEthernet0/1unassignedYESunsetupdownFastEthernet0/2unassignedYESunsetupdownFastEthernet0/3unassignedYESunsetupdownFastEthernet0/4unassignedYESunsetupdownFastEthernet0/5unassignedYESunsetupdownFastEthernet0/6unassignedYESunsetupdownFastEthernet0/7unassignedYESunsetupdownFastEthernet0/8unassignedYESunsetupdownFastEthernet0/9unassignedYESunsetupdownFastEthernet0/10unassignedYESunsetupdownFastEthernet0/11unassignedYESunsetupdownFastEthernet0/12unassignedYESunsetupdownFastEthernet0/13unassignedYESunsetupdownFastEthernet0/14unassignedYESunsetupdownFastEthernet0/15unassignedYESunsetupupVlan1unassignedYESunsetupupVlan2192.168.2.254YESmanualupupVlan3192.168.3.254YESmanualupup9.sw1-3#showiprouteCodes:C-connected,S-static,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticrouteo-ODR,P-periodicdownloadedstaticrouteGatewayoflastresortisnotsetC192.168.2.0/24isdirectlyconnected,Vlan2C192.168.3.0/24isdirectlyconnected,Vlan310.R1(config)#interfacee0/1R1(config-if)#ipadd192.168.3.1255.255.255.0R1(config-if)#nosh11.sw1-3#conftEnterconfigurationcommands,oneperline.EndwithCNTL/Z.sw1-3(config)#routerripsw1-3(config-router)#network192.168.2.0sw1-3(config-router)#network192.168.3.0sw1-3(config-router)#exitsw1-3(config)#exi12.Router#showiprouteCodes:C-connected,S-static,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticrouteo-ODR,P-periodicdownloadedstaticrouteGatewayoflastresortisnotsetC
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 农业银行风险管理课件
- 荒野行动面试题及答案
- 环境执法试题及答案
- 制造企业生产执行管理解决方案
- 全国青少年禁毒知识竞赛题库(含带答案)
- 学生防疫知识课件
- 青海省西宁市二十一中2025届物理高一第二学期期末达标测试试题含解析
- 天津市四校联考2024-2025学年高一下学期7月期末考试政治试题(含答案)
- 学校家长会课件
- 2025年上海市闵行区物理高一下期末达标测试试题含解析
- OQC当前管控流程
- 村务公开申请书
- 2025年山东省职教高考(机械制造专业)综合知识备考试题库(含历年真题)
- DB1303-T352-2023食品快速检测产品验收技术规范
- 2025年中考物理热点题型专项训练:实验之探究平面镜成像的特点 (解析版)
- 《蚯蚓》课件-生物学-自然科学-专业资料
- 2025年秋部编版二年级语文上册教学计划
- 《沥青及沥青混合料》课件
- 《FT装维资料》课件
- 医疗物联网标准与规范-洞察分析
- 高二-粤教版-物理-选择性必修三-第二章《新材料》课件
评论
0/150
提交评论