《计算机网络实验报告——静态路由与缺省路由的使用(共8页).docx》由会员分享,可在线阅读,更多相关《计算机网络实验报告——静态路由与缺省路由的使用(共8页).docx(8页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、精选优质文档-倾情为你奉上实验三 静态路由与缺省路由的使用一、实验环境:Windows7操作系统的计算机; Boson Netsim for CCNA v6.0 805交换机二、 实验步骤;rt1接到pc1,rt2接到pc2,rt1到rt2选择点到点类型,rt2的serial0作为DCE端。配置如下:(1)Router1配置:Routerenable Router#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname router1router1(config)#e
2、na se c1router1(config)#vty 0 4 % Invalid input detected at marker.router1(config)#line vty 0 4router1(config-line)#login router1(config-line)#pass c2router1(config-line)#int eth 0router1(config-if)#ip address 192.168.1.1 255.255.255.0router1(config-if)#no shut%LINK-3-UPDOWN: Interface Ethernet0, ch
3、anged state to uprouter1(config-if)#int se 0router1(config-if)#ip address 10.0.0.1 255.0.0.0router1(config-if)#clock rate 64000router1(config-if)#no shut%LINK-3-UPDOWN: Interface Serial0, changed state to up%LINK-3-UPDOWN: Interface Serial0, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on
4、 Interface Serial0, changed state to downrouter1(config-if)#endrouter1#copy run startDestination filename startup-config?Building configuration.OK(2)Router2配置:RouterenableRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host router2router2(config)#ena se c1ro
5、uter2(config)#line vty 0 4router2(config-line)#loginrouter2(config-line)#pass c2router2(config-line)#int eth 0router2(config-if)#ip address 192.168.2.1 255.255.255.0router2(config-if)#no shut%LINK-3-UPDOWN: Interface Ethernet0, changed state to uprouter2(config-if)#int se 0router2(config-if)#ip add
6、10.0.0.2 255.0.0.0router2(config-if)#no shut%LINK-3-UPDOWN: Interface Serial0, changed state to up%LINK-3-UPDOWN: Interface Serial0, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to downrouter2(config-if)#endrouter2#copy run startDestination filename sta
7、rtup-config?Building configuration.OK(3) PC配置:PC1 192.168.1.2 255.255.255.0 192.168.1.1PC2 192.168.2.2 255.255.255.0 192.168.1.1(4) 配置,测试静态路由在Rputer1中配置:router1#ip route 192.168.2.0 255.255.255.0 10.0.0.2 % Invalid input detected at marker.router1# ip router 192.168.2.0 255.255.255.0 10.0.0.2 % Inva
8、lid input detected at marker.router1#config tEnter configuration commands, one per line. End with CNTL/Z.router1(config)# ip route 192.168.2.0 255.255.255.0 10.0.0.2router1(config)#endrouter1#copy run startDestination filename startup-config?Building configuration.OKrouter1#router1#show ip rpute % I
9、nvalid input detected at marker.router1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2
10、, * - candidate default U - per-user static routeGateway of last resort is not setC 192.168.1.0 is directly connected, Ethernet0S 192.168.2.0 1/0 via 10.0.0.2在Router2中配置:router2#router2#router2#config tEnter configuration commands, one per line. End with CNTL/Z.router2(config)#ip route 192.168.1,0 2
11、55.255.255.0 10.0.0.1% Invalid input detected at marker.router2(config)#ip route 192.168.1.0 255.255.255.0 10.0.0.1router2(config)#endrouter2#copy run startDestination filename startup-config?Building configuration.OKrouter2#show ip rpute % Invalid input detected at marker.router2#show ip routeCodes
12、: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static routeGateway o
13、f last resort is not setC 192.168.2.0 is directly connected, Ethernet0S 192.168.1.0 1/0 via 10.0.0.1再分别选择R1,R2测试静态路由,命令如下:router1#show ip rpute % Invalid input detected at marker.router1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP exter
14、nal, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static routeGateway of last resort is not setC 192.168.1.0 is directly connected, Ethernet0S 192.168.2.0 1/0 via 10.
15、0.0.2router2#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U -
16、 per-user static routeGateway of last resort is not setC 192.168.2.0 is directly connected, Ethernet0S 192.168.1.0 1/0 via 10.0.0.1(5) 配置,测试缺省路由:router2#config tEnter configuration commands, one per line. End with CNTL/Z.router2(config)#no ip route 192.168.1.0 255.255.255.0 10.0.0.1router2(config)#i
17、p route 0.0.0.0 0.0.0.0 10.0.0.1router2(config)#endrouter2#copy run startDestination filename startup-config?Building configuration.OK三、 最终配置列表:Router1Router2PC1PC2Ethernet ip192.168.1.0192.168.2.0192.168.1.2 192.168.2.2Serial ip10.0.0.210.0.0.1子网掩码 255.255.255.0 255.255.255.0 默认网关192.168.1.0192.168
18、.2.0四、结果分析:配置完PC后,先测试一下:在PC1 ping Router1C:ping 192.168.1.1Pinging 192.168.1.1 with 32 bytes of data:Reply from 192.168.1.1: bytes=32 time=60ms TTL=241Reply from 192.168.1.1: bytes=32 time=60ms TTL=241Reply from 192.168.1.1: bytes=32 time=60ms TTL=241Reply from 192.168.1.1: bytes=32 time=60ms TTL=24
19、1Reply from 192.168.1.1: bytes=32 time=60ms TTL=241Ping statistics for 192.168.1.1: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average = 55ms在PC2 ping Router2C:ping 192.168.2.1Pinging 192.168.2.1 with 32 bytes of
20、 data:Reply from 192.168.2.1: bytes=32 time=60ms TTL=241Reply from 192.168.2.1: bytes=32 time=60ms TTL=241Reply from 192.168.2.1: bytes=32 time=60ms TTL=241Reply from 192.168.2.1: bytes=32 time=60ms TTL=241Reply from 192.168.2.1: bytes=32 time=60ms TTL=241Ping statistics for 192.168.2.1: Packets: Se
21、nt = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average = 55msC: :ping 192.168.2.2Pinging 192.168.2.2 with 32 bytes of data:Reply from 192.168.2.2: bytes=32 time=60ms TTL=241Reply from 192.168.2.2: bytes=32 time=60ms TTL=241Repl
22、y from 192.168.2.2: bytes=32 time=60ms TTL=241Reply from 192.168.2.2: bytes=32 time=60ms TTL=241Reply from 192.168.2.2: bytes=32 time=60ms TTL=241Ping statistics for 192.168.2.2: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 50ms, Maximu
23、m = 60ms, Average = 55ms配置缺省路由后:C:ping 172.16.1.1Pinging 172.16.1.1with 32 bytes of data:Reply from 172.16.1.1: bytes=32 time=60ms TTL=241Reply from 172.16.1.1: bytes=32 time=60ms TTL=241Reply from 172.16.1.1: bytes=32 time=60ms TTL=241Reply from 172.16.1.1: bytes=32 time=60ms TTL=241Reply from 172.16.1.1: bytes=32 time=60ms TTL=241Ping statistics for 172.16.1.1: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average = 55ms五、 实验拓扑截图:六、 心得体会: 通过本次实验掌握了静态路由与缺省路由的配置方法,但是对于实验中的许多命令还是不熟练,今后要多加练习。专心-专注-专业
限制150内