动态路由协议RIP与OSPF的配置.pdf

上传人:ylj18****70940 文档编号:80830493 上传时间:2023-03-23 格式:PDF 页数:20 大小:871.30KB
返回 下载 相关 举报
动态路由协议RIP与OSPF的配置.pdf_第1页
第1页 / 共20页
动态路由协议RIP与OSPF的配置.pdf_第2页
第2页 / 共20页
点击查看更多>>
资源描述

《动态路由协议RIP与OSPF的配置.pdf》由会员分享,可在线阅读,更多相关《动态路由协议RIP与OSPF的配置.pdf(20页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、 动态路由协议 RIP 与OSPF 的配置 精 品 管 理 制 度、管 理 方 案、合 同、协 议、一 起 学 习 进 步 企业管理,管理制度,报告,协议,合同,标书 d2 海南大学信息科学技术学院 实 验 报 告 实验课程:计算机网络 实验名称:动态路由协议 RIP与 OSPF的配置 学号:20151681310139 姓名:李新宇 班级:电子信息类 05班 一、实验目的 1、熟悉 CISCO IOS 和 CLI 命令模式的使用;2、了解和掌握路由器基本配置命令的使用;3、掌握动态路由协议的配置;4、掌握 VLAN 中路由器的设置;3.掌握 RIP 与 OSPF 路由协议及其配置。二、实验设

2、备与环境 Windows 2000 Server/Advance Server主机局域网、CISCO Catalyst 2950交换机和 2600 系列路由器,Cisco Packet Tracer 7.0软件。三、实验内容 3.1 课内实验任务(2)实验过程 0)创建拓扑图 评定成绩 指导教师 企业管理,管理制度,报告,协议,合同,标书 d3 1)采用配置 PC1 和 PC2 的 IP 地址和子网掩码。2)连接到路由器 Router3,配置路由器的 RIP,命令如下:Routerenable Router#conf terminal Router(config)#hostname R3 R3

3、(config)#interface FastEthernet 0/0 R3(config-if)#ip address 11.0.0.1 255.255.255.0 R3(config-if)#no shutdown R3(config-if)#interface FastEthernet 0/1 R3(config-if)#ip address 12.0.0.1 255.255.255.0 R3(config-if)#no shutdown R3(config-if)#interface serial 0 R3(config-if)#ip address 10.0.0.1 255.255.

4、255.0 R3(config-if)#bandwidth 128 /设置链路带宽为 128kbit/s R3(config-if)#clock rate 64000 /设置 DCE 设备的时钟速率 R3(config-if)#no shutdown R3(config-if)#exit-设置路由器 R3 的 RIP-R3(config)#router rip /设置 RIP R3(config-router)#network 10.0.0.0 /设置接口 S0 连接的网络地址 R3(config-router)#network 11.0.0.0 /设置接口 E0 连接的网络地址 R3(con

5、fig-router)#network 12.0.0.0 /设置接口 E1 连接的网络地址 R3(config-router)#end 企业管理,管理制度,报告,协议,合同,标书 d4 R3(config)#router rip/设置 RIP R3(config-router)#network 10.0.0.0/设置接口 S0 连接的网络地址 R3(config-router)#network 11.0.0.0/设置接口 E0 连接的网络地址 R3(config-router)#network 12.0.0.0/设置接口 E1 连接的网络地址 R3(config-router)#end R3#

6、%SYS-5-CONFIG_I:Configured from console by console 4)按照步骤(3)分别完成对路由器 R1、R2、R4 的接口配置。/配置过程不再列出 5)按照步骤(3)分别完成对路由器 R1、R2、R4 的 RIP 配置。R1(config)#router rip /设置路由器 R1 的 RIP R1(config-router)#network 11.0.0.0 R1(config-router)#end R1(config)#router rip /设置路由器 R1 的 RIP R1(config-router)#network 11.0.0.0 R1

7、(config-router)#end R1#%SYS-5-CONFIG_I:Configured from console by console-设置路由器 R2 的 RIP-R2(config)#router rip /设置路由器 R2 的 RIP R2(config-router)#network 12.0.0.0 R2(config-router)#end R2(config)#router rip /设置 R2 的 RIP R2(config-router)#network 12.0.0.0 R2(config-router)#end R2#企业管理,管理制度,报告,协议,合同,标书

8、 d5%SYS-5-CONFIG_I:Configured from console by console-设置路由器 R4 的 RIP-R4(config)#router rip /设置路由器 R4 的 RIP R4(config-router)#network 10.0.0.0 R4(config-router)#network 192.168.1.0 R4(config-router)#end R4(config)#rout rip /设置 R4 的 rip R4(config-router)#network 10.0.0.0 R4(config-router)#network 192.

9、168.1.0 R4(config-router)#end 6)连接到路由器 R1 中,通过命令“show ip route”显示 R1 的动态路由表,观察路由表项,当目标网络是 192.168.1.0/24 时,需要多少跳数(hops)?通过命令“show ip protocols”查看每台路由器的协议。R1show ip route Codes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGP D-EIGRP,EX-EIGRP external,O-OSPF,IA-OSPF inter area N1-OSPF NSSA external t

10、ype 1,N2-OSPF NSSA external type 2 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,ia-IS-IS inter area*-candidate default,U-per-user static route,o-ODR P-periodic downloaded static route Gateway of last resort is not set R 10.0.0.0/8 120/1 via 11.0.0.1

11、,00:00:20,FastEthernet0/0 11.0.0.0/24 is subnetted,1 subnets C 11.0.0.0 is directly connected,FastEthernet0/0 R 12.0.0.0/8 120/1 via 11.0.0.1,00:00:20,FastEthernet0/0 R 192.168.1.0/24 120/2 via 11.0.0.1,00:00:20,FastEthernet0/0 答;有路由表可知,到达 192.168.1.0 需要两跳。显示协议如下 R1show ip protocol Routing Protocol

12、is rip/协议是 RIP 协议 企业管理,管理制度,报告,协议,合同,标书 d6 Sending updates every 30 seconds,next due in 13 seconds Invalid after 180 seconds,hold down 180,flushed after 240 Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Redistributing:rip Default

13、version control:send version 1,receive any version Interface Send Recv Triggered RIP Key-chain FastEthernet0/0 1 2 1 Automatic network summarization is in effect Maximum path:4 Routing for Networks:11.0.0.0 Passive Interface(s):Routing Information Sources:Gateway Distance Last Update 11.0.0.1 120 00

14、:00:19 Distance:(default is 120)7)连接到 R2、R3 和 R4,通过“show ip route”和“show ip protocols”命令查看每台路由器的路由表和协议。R2:R2 的路由表:R2show ip route Codes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGP D-EIGRP,EX-EIGRP external,O-OSPF,IA-OSPF inter area N1-OSPF NSSA external type 1,N2-OSPF NSSA external type 2 E1-OS

15、PF external type 1,E2-OSPF external type 2,E-EGP i-IS-IS,L1-IS-IS level-1,L2-IS-IS level-2,ia-IS-IS inter area*-candidate default,U-per-user static route,o-ODR P-periodic downloaded static route Gateway of last resort is not set R 10.0.0.0/8 120/1 via 12.0.0.1,00:00:19,FastEthernet0/0 R 11.0.0.0/8 1

16、20/1 via 12.0.0.1,00:00:19,FastEthernet0/0 12.0.0.0/24 is subnetted,1 subnets C 12.0.0.0 is directly connected,FastEthernet0/0 R 192.168.1.0/24 120/2 via 12.0.0.1,00:00:19,FastEthernet0/0/需要两跳 企业管理,管理制度,报告,协议,合同,标书 d7 R2 所用协议:R2show ip protocols Routing Protocol is rip Sending updates every 30 secon

17、ds,next due in 11 seconds Invalid after 180 seconds,hold down 180,flushed after 240 Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Redistributing:rip Default version control:send version 1,receive any version Interface Send Recv Tr

18、iggered RIP Key-chain FastEthernet0/0 1 2 1 Automatic network summarization is in effect Maximum path:4 Routing for Networks:12.0.0.0 Passive Interface(s):Routing Information Sources:Gateway Distance Last Update 12.0.0.1 120 00:00:25 Distance:(default is 120)R3:R3 路由表:R3show ip route Codes:C-connect

19、ed,S-static,I-IGRP,R-RIP,M-mobile,B-BGP D-EIGRP,EX-EIGRP external,O-OSPF,IA-OSPF inter area N1-OSPF NSSA external type 1,N2-OSPF NSSA external type 2 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,ia-IS-IS inter area*-candidate default,U-per-user stat

20、ic route,o-ODR P-periodic downloaded static route Gateway of last resort is not set 10.0.0.0/24 is subnetted,1 subnets C 10.0.0.0 is directly connected,Serial0/0 11.0.0.0/24 is subnetted,1 subnets C 11.0.0.0 is directly connected,FastEthernet0/0 12.0.0.0/24 is subnetted,1 subnets C 12.0.0.0 is direc

21、tly connected,FastEthernet0/1 R 192.168.1.0/24 120/1 via 10.0.0.2,00:00:09,Serial0/0 企业管理,管理制度,报告,协议,合同,标书 d8/需要一跳 R3 协议:R3show ip protocol Routing Protocol is rip Sending updates every 30 seconds,next due in 12 seconds Invalid after 180 seconds,hold down 180,flushed after 240 Outgoing update filter

22、 list for all interfaces is not set Incoming update filter list for all interfaces is not set Redistributing:rip Default version control:send version 1,receive any version Interface Send Recv Triggered RIP Key-chain Serial0/0 1 2 1 FastEthernet0/0 1 2 1 FastEthernet0/1 1 2 1 Automatic network summar

23、ization is in effect Maximum path:4 Routing for Networks:10.0.0.0 11.0.0.0 12.0.0.0 Passive Interface(s):Routing Information Sources:Gateway Distance Last Update 10.0.0.2 120 00:00:14 Distance:(default is 120)R4:R4 路由表:R4show ip route Codes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGP D-EIGRP,EX

24、-EIGRP external,O-OSPF,IA-OSPF inter area N1-OSPF NSSA external type 1,N2-OSPF NSSA external type 2 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,ia-IS-IS inter area*-candidate default,U-per-user static route,o-ODR P-periodic downloaded static route

25、Gateway of last resort is not set 10.0.0.0/24 is subnetted,1 subnets C 10.0.0.0 is directly connected,Serial0/0 R 11.0.0.0/8 120/1 via 10.0.0.1,00:00:03,Serial0/0 R 12.0.0.0/8 120/1 via 10.0.0.1,00:00:03,Serial0/0 C 192.168.1.0/24 is directly connected,FastEthernet0/0 R4 协议:R4show ip protocols 企业管理,

26、管理制度,报告,协议,合同,标书 d9 Routing Protocol is rip Sending updates every 30 seconds,next due in 1 seconds Invalid after 180 seconds,hold down 180,flushed after 240 Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Redistributing:rip Default

27、version control:send version 1,receive any version Interface Send Recv Triggered RIP Key-chain Serial0/0 1 2 1 FastEthernet0/0 1 2 1 Automatic network summarization is in effect Maximum path:4 Routing for Networks:10.0.0.0 192.168.1.0 Passive Interface(s):Routing Information Sources:Gateway Distance

28、 Last Update 10.0.0.1 120 00:00:24 Distance:(default is 120)8)使用 ping 命令测试到路由器各接口的连通状态,以检测路由器的配置。用 PC1 测试与各个路由器接口的连接性:C:ping 11.0.0.1 Pinging 11.0.0.1 with 32 bytes of data:Reply from 11.0.0.1:bytes=32 time=31ms TTL=254 Reply from 11.0.0.1:bytes=32 time=31ms TTL=254 Reply from 11.0.0.1:bytes=32 time

29、=15ms TTL=254 Reply from 11.0.0.1:bytes=32 time=31ms TTL=254 Ping statistics for 11.0.0.1:Packets:Sent=4,Received=4,Lost=0(0%loss),Approximate round trip times in milli-seconds:Minimum=15ms,Maximum=31ms,Average=27ms/接通 C:ping 12.0.0.2 Pinging 12.0.0.2 with 32 bytes of data:企业管理,管理制度,报告,协议,合同,标书 d10

30、Reply from 12.0.0.2:bytes=32 time=16ms TTL=253 Reply from 12.0.0.2:bytes=32 time=31ms TTL=253 Reply from 12.0.0.2:bytes=32 time=31ms TTL=253 Reply from 12.0.0.2:bytes=32 time=47ms TTL=253 Ping statistics for 12.0.0.2:Packets:Sent=4,Received=4,Lost=0(0%loss),Approximate round trip times in milli-seco

31、nds:Minimum=16ms,Maximum=47ms,Average=31ms/接通 C:ping 192.168.1.1 Pinging 192.168.1.1 with 32 bytes of data:Reply from 192.168.1.1:bytes=32 time1ms TTL=255 Reply from 192.168.1.1:bytes=32 time1ms TTL=255 Reply from 192.168.1.1:bytes=32 time1ms TTL=255 Reply from 192.168.1.1:bytes=32 timeping 10.0.0.2

32、 Pinging 10.0.0.2 with 32 bytes of data:Reply from 10.0.0.2:bytes=32 time1ms TTL=255 Reply from 10.0.0.2:bytes=32 time1ms TTL=255 Reply from 10.0.0.2:bytes=32 time=15ms TTL=255 Reply from 10.0.0.2:bytes=32 timeping 11.0.0.2 Pinging 11.0.0.2 with 32 bytes of data:Reply from 11.0.0.2:bytes=32 time=47m

33、s TTL=253 Reply from 11.0.0.2:bytes=32 time=31ms TTL=253 Reply from 11.0.0.2:bytes=32 time=31ms TTL=253 Reply from 11.0.0.2:bytes=32 time=32ms TTL=253 Ping statistics for 11.0.0.2:Packets:Sent=4,Received=4,Lost=0(0%loss),Approximate round trip times in milli-seconds:Minimum=31ms,Maximum=47ms,Average

34、=35ms Pc2 与 R1 连接成功 C:ping 12.0.0.2 Pinging 12.0.0.2 with 32 bytes of data:Reply from 12.0.0.2:bytes=32 time=15ms TTL=253 Reply from 12.0.0.2:bytes=32 time=31ms TTL=253 Reply from 12.0.0.2:bytes=32 time=31ms TTL=253 Reply from 12.0.0.2:bytes=32 time=31ms TTL=253 Ping statistics for 12.0.0.2:Packets:

35、Sent=4,Received=4,Lost=0(0%loss),Approximate round trip times in milli-seconds:Minimum=15ms,Maximum=31ms,Average=27ms Pc2 与 R2 连接成功 (3)实验小结 RIP 是一个距离矢量路由协议,非常简单,仅通过源节点与目的节点之间的路由器或路程段的数目(跳数)来决定发送数据包的最佳途径。由于RIP 自身的一些限制,企业管理,管理制度,报告,协议,合同,标书 d12 其允许的最大跳数为 15,只适用于小型的网络。RIP 有两种版本:RIPv1 和 RIPv2。前者不支持 VLSM

36、,而后者支持。企业管理,管理制度,报告,协议,合同,标书 d13 2、路由器的 OSPF 协议配置(1)实验准备工作 运用 Cisco Packet Tracer软件设计如下网络拓扑图。不同型号的交换机配置命令不同,这里选择 2600 系列路由器的 2621 型号,交换机选择 2900 系列。IP 地址、掩码和连接路由器的端口号如图所示。将网络拓扑图保存,并在Cisco Packet Tracer模拟器中打开该图(参考实验4 的方法)。(2)实验过程 1)使用上述的网络拓扑图作为本实验所需的网络,配置PC 的 IP 地址和子网掩码。/拓扑图如下 f0/0 f0/0 f0/0 f0/1 se0/

37、0 se0/0 f0/0 f0/1 f0/3 f0/2 IP:11.0.0.2/24 IP:11.0.0.1/24 IP:12.0.0.1/24 IP:12.0.0.2/24 IP:10.0.0.1/24 IP:10.0.0.2/24 IP:192.168.1.2/24 IP:192.168.1.3/24 IP:192.168.1.1/24 企业管理,管理制度,报告,协议,合同,标书 d14 2)连接到路由器 Router3,配置路由器的 OSPF,命令如下:Routerenable Router#conf terminal Router(config)#hostname R3 R3(conf

38、ig)#interface FastEthernet 0/0 R3(config-if)#ip address 11.0.0.1 255.255.255.0 R3(config-if)#no shutdown R3(config-if)#interface FastEthernet 0/1 R3(config-if)#ip address 12.0.0.1 255.255.255.0 R3(config-if)#no shutdown R3(config-if)#interface serial 0 R3(config-if)#ip address 10.0.0.1 255.255.255.0

39、 R3(config-if)#bandwidth 128 /设置链路带宽为 128kbit/s R3(config-if)#clock rate 64000 /设置 DCE 设备的时钟速率 R3(config-if)#no shutdown R3(config-if)#exit /启动进程号为 10 的单区域 OSPF 路由选择进程 R3(config)#router ospf 10 /在接口 S0 启动 OSPF,加入区域 0 R3(config-router)#network 10.0.0.0 0.0.0.255 area 0 /通告直连网络/在接口 F0/0 启动 OSPF,加入区域 0

40、 企业管理,管理制度,报告,协议,合同,标书 d15 R3(config-router)#network 11.0.0.0 0.0.0.255 area 0 /通告直连网络/在接口 F0/1 启动 OSPF,加入区域 0 R3(config-router)#network 12.0.0.0 0.0.0.255 area 0 /通告直连网络 R3(config-router)#exit R3(config)#router ospf 10/启动进程号为 10 的单区域 OSPF 路由选择进程 R3(config-router)#network 10.0.0.0 0.0.0.255 area 0 R

41、3(config-router)#network 11.0.0.0 0.0.0.255 area 0 R3(config-router)#network 12.0.0.0 0.0.0.255 area 0 R3(config-router)#exit R3(config)#4)按照步骤(3)分别完成路由器 R1、R2、R4 的接口和 OSPF 配置。/在 R1 上启动进程号为 10 的单区域/OSPF 路由选择进程 R1(config)#router ospf 10 R1(config-router)#network 11.0.0.0 0.0.0.255 area 0 R1(config-ro

42、uter)#network 11.0.0.0 0.0.0.255 area 0 /在 R2 上启动进程号为 10 的单区域 OSPF 路由选择进程 R2(config)#router ospf 10 R2(config-router)#network 12.0.0.0 0.0.0.255 area 0 R2(config)#router ospf 10 R2(config-router)#network 11.0.0.0 0.0.0.255 area 0 R2(config-router)#exit /在 R4 上启动进程号为 10 的单区域 OSPF 路由选择进程 R4(config)#ro

43、uter ospf 10 R4(config-router)#network 10.0.0.0 0.0.0.255 area 0 R4(config-router)#network 192.168.1.0 0.0.0.255 area 0 Enter configuration commands,one per line.End with CNTL/Z.企业管理,管理制度,报告,协议,合同,标书 d16 Router(config)#router ospf 10/启动进程号为 10 的单区域 OSPF 路由选择进程 Router(config-router)#network 10.0.0.0

44、0.0.0.255 area 0 Router(config-router)#networ 00:09:20:%OSPF-5-ADJCHG:Process 10,Nbr 12.0.0.1 on Serial0/0 from LOADING to FULL,Loading Done%Incomplete command.Router(config-router)#network 192.168.1.0 0.0.0.255 area 0 Router(config-router)#exit 5)连接到路由器 R1 中,通过命令“show ip route”显示 R1 的动态路由表,观察路由表项,当

45、目标网络是 192.168.1.0/24 时,度量值为多少?R1show ip route Codes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGP D-EIGRP,EX-EIGRP external,O-OSPF,IA-OSPF inter area N1-OSPF NSSA external type 1,N2-OSPF NSSA external type 2 E1-OSPF external type 1,E2-OSPF external type 2,E-EGP i-IS-IS,L1-IS-IS level-1,L2-IS-IS l

46、evel-2,ia-IS-IS inter area*-candidate default,U-per-user static route,o-ODR P-periodic downloaded static route Gateway of last resort is not set 10.0.0.0/24 is subnetted,1 subnets O 10.0.0.0 110/65 via 11.0.0.1,00:05:34,FastEthernet0/0 11.0.0.0/24 is subnetted,1 subnets C 11.0.0.0 is directly connec

47、ted,FastEthernet0/0 12.0.0.0/24 is subnetted,1 subnets O 12.0.0.0 110/2 via 11.0.0.1,00:05:34,FastEthernet0/0 O 192.168.1.0/24 110/66 via 11.0.0.1,00:00:47,FastEthernet0/0 答:度量值为 66 6)连接到 R2、R3 和 R4,查看每台路由器的路由表。企业管理,管理制度,报告,协议,合同,标书 d17 R2:R2show ip route Codes:C-connected,S-static,I-IGRP,R-RIP,M-mo

48、bile,B-BGP D-EIGRP,EX-EIGRP external,O-OSPF,IA-OSPF inter area N1-OSPF NSSA external type 1,N2-OSPF NSSA external type 2 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,ia-IS-IS inter area*-candidate default,U-per-user static route,o-ODR P-periodic dow

49、nloaded static route Gateway of last resort is not set 10.0.0.0/24 is subnetted,1 subnets O 10.0.0.0 110/65 via 12.0.0.1,00:06:26,FastEthernet0/0 11.0.0.0/24 is subnetted,1 subnets O 11.0.0.0 110/2 via 12.0.0.1,00:06:26,FastEthernet0/0 12.0.0.0/24 is subnetted,1 subnets C 12.0.0.0 is directly connec

50、ted,FastEthernet0/0 O 192.168.1.0/24 110/66 via 12.0.0.1,00:06:26,FastEthernet0/0 R3:R3show ip route Codes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGP D-EIGRP,EX-EIGRP external,O-OSPF,IA-OSPF inter area N1-OSPF NSSA external type 1,N2-OSPF NSSA external type 2 E1-OSPF external type 1,E2-OSPF ex

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 应用文书 > 解决方案

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁