您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 其它文档 > 计算机网络实验报告——静态路由与缺省路由的使用
实验三静态路由与缺省路由的使用一、实验环境:Windows7操作系统的计算机;BosonNetsimforCCNAv6.0805交换机二、实验步骤;rt1接到pc1,rt2接到pc2,rt1到rt2选择点到点类型,rt2的serial0作为DCE端。配置如下:(1)Router1配置:RouterenableRouter#configtEnterconfigurationcommands,oneperline.EndwithCNTL/Z.Router(config)#hostnamerouter1router1(config)#enasec1router1(config)#vty04^%Invalidinputdetectedat'^'marker.router1(config)#linevty04router1(config-line)#loginrouter1(config-line)#passc2router1(config-line)#inteth0router1(config-if)#ipaddress192.168.1.1255.255.255.0router1(config-if)#noshut%LINK-3-UPDOWN:InterfaceEthernet0,changedstatetouprouter1(config-if)#intse0router1(config-if)#ipaddress10.0.0.1255.0.0.0router1(config-if)#clockrate64000router1(config-if)#noshut%LINK-3-UPDOWN:InterfaceSerial0,changedstatetoup%LINK-3-UPDOWN:InterfaceSerial0,changedstatetodown%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceSerial0,changedstatetodownrouter1(config-if)#endrouter1#copyrunstartDestinationfilename[startup-config]?Buildingconfiguration...[OK](2)Router2配置:RouterenableRouter#configtEnterconfigurationcommands,oneperline.EndwithCNTL/Z.Router(config)#hostrouter2router2(config)#enasec1router2(config)#linevty04router2(config-line)#loginrouter2(config-line)#passc2router2(config-line)#inteth0router2(config-if)#ipaddress192.168.2.1255.255.255.0router2(config-if)#noshut%LINK-3-UPDOWN:InterfaceEthernet0,changedstatetouprouter2(config-if)#intse0router2(config-if)#ipadd10.0.0.2255.0.0.0router2(config-if)#noshut%LINK-3-UPDOWN:InterfaceSerial0,changedstatetoup%LINK-3-UPDOWN:InterfaceSerial0,changedstatetodown%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceSerial0,changedstatetodownrouter2(config-if)#endrouter2#copyrunstartDestinationfilename[startup-config]?Buildingconfiguration...[OK](3)PC配置:PC1192.168.1.2255.255.255.0192.168.1.1PC2192.168.2.2255.255.255.0192.168.1.1(4)配置,测试静态路由在Rputer1中配置:router1#iproute192.168.2.0255.255.255.010.0.0.2^%Invalidinputdetectedat'^'marker.router1#iprouter192.168.2.0255.255.255.010.0.0.2^%Invalidinputdetectedat'^'marker.router1#configtEnterconfigurationcommands,oneperline.EndwithCNTL/Z.router1(config)#iproute192.168.2.0255.255.255.010.0.0.2router1(config)#endrouter1#copyrunstartDestinationfilename[startup-config]?Buildingconfiguration...[OK]router1#router1#showiprpute^%Invalidinputdetectedat'^'marker.router1#showiprouteCodes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaE1-OSPFexternaltype1,E2-OSPFexternaltype2,E-EGPi-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,*-candidatedefaultU-per-userstaticrouteGatewayoflastresortisnotsetC192.168.1.0isdirectlyconnected,Ethernet0S192.168.2.0[1/0]via10.0.0.2在Router2中配置:router2#router2#router2#configtEnterconfigurationcommands,oneperline.EndwithCNTL/Z.router2(config)#iproute192.168.1,0255.255.255.010.0.0.1%Invalidinputdetectedat'^'marker.router2(config)#iproute192.168.1.0255.255.255.010.0.0.1router2(config)#endrouter2#copyrunstartDestinationfilename[startup-config]?Buildingconfiguration...[OK]router2#showiprpute^%Invalidinputdetectedat'^'marker.router2#showiprouteCodes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaE1-OSPFexternaltype1,E2-OSPFexternaltype2,E-EGPi-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,*-candidatedefaultU-per-userstaticrouteGatewayoflastresortisnotsetC192.168.2.0isdirectlyconnected,Ethernet0S192.168.1.0[1/0]via10.0.0.1再分别选择R1,R2测试静态路由,命令如下:router1#showiprpute^%Invalidinputdetectedat'^'marker.router1#showiprouteCodes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaE1-OSPFexternaltype1,E2-OSPFexternaltype2,E-EGPi-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,*-candidatedefaultU-per-userstaticrouteGatewayoflastresortisnotsetC192.168.1.0isdirectlyconnected,Ethernet0S192.168.2.0[1/0]via10.0.0.2router2#showiprouteCodes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaE1-OSPFexternaltype1,E2-OSPFexternaltype2,E-EGPi-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,*-candidatedefaultU-per-userstaticrouteGatewayoflastresortisnotsetC192.168.2.0isdirectlyconnected,Ethernet0S192.168.1.0[1/0]via10.0.0.1(5)配置,测试缺省路由:router2#configtEnterconfigurationcommands,oneperline.EndwithCNTL/Z.router2(config)#noiproute192.168.1.0255.255.255.010.0.0.1router2(config)#iproute0.0.0.00.0.0.010.0.0.1router2(config)#endrouter2#copyrunstartDestinationfilename[startup-config]?Buildingconfiguration...[OK]三、最终配置列表:Router1Router2PC1PC2Ethernetip192.168.1.0192.168.2.0192.168.1.2192.168.2.2Serialip10.0.0.210.0.0.1子网掩码255.255.255.0255.255.255.0默认网关192.168.1.0192.168.2.0四、结果分析:配置完PC后,先测试一下:在PC1pingRouter1C:ping192.168.1.1Pinging192.168.1.1with32bytesofdata:Replyfrom192.168.1.1:bytes=32time=60msTTL=241Replyfrom192.168.1.1:bytes=32time=60msTTL=241Replyfrom192.168.1.1:bytes=32time=60msTTL=241Replyfrom192.168.1.1:bytes=32time=60msTTL=241Replyfrom192.168.1.1:bytes=32time=60msTTL=241Pingstatisticsfor192.168.1.1:Packets:Sent=5,Received=5,Lost=0(0%loss),Approximateroundtriptimesinmilli-seconds:Minimum=50ms,Maximum=60ms,A
本文标题:计算机网络实验报告——静态路由与缺省路由的使用
链接地址:https://www.777doc.com/doc-5350098 .html