




已阅读5页,还剩5页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
本实验是对OSPF协议的基本配置,涉及到配置OSPF协议所必须的命令和常用的show命令。1.实验目的通过本实验,读者可以掌握以下技能:在路由器上启动OSPF协议;声明相应网络进入OSPF路由进程;查看OSPF路由信息;查看OSPF协议配置信息;查看OSPF邻居路由器信息。2.设备需求本实验需要以下设备:Cisco路由器3台,分别命名为R1。R2和R3,其中R2要求具有2个串行接口,R1和R3均要求具有1个串行接口和1个以太网接口;2条DCE电缆和2条DTE电缆 (或2条DCE转DTE电缆);1台终端服务器,如Cisco 2509路由器,及用于反向Telnet的相应电缆;4台带有超级终端程序的PC机,以及Console电缆及转接器。3.拓扑结构及配置说明本实验的拓扑结构如图11-1所示,利用DCE和DTE电缆把R1。R2和R3路由器连接起来。各路由器使用的接口及其编号如图11-1中的标注。各接口IP地址分配如下:R1:S1192.168.1.130,E0172.16.1.1/24R2:S0192.168.1.5/30,S1192.168.1.2/30R3:S0192.168.1.6/30,E0172.16.3.1/24实验中R1、R2之间串行线路速率设置为 125kbit/s;R2、R3之间串行线路速率设置为64kbit/s。本实验要求通过对OSPF路由选择协议的配置,实现拓扑中全网的连通性。4.实验配置及监测结果按照拓扑结构图连接好所有设备后,给设备加电,开始进行实验。第1部分:配置接口和OSPF首先对各路由器的接口和OSPF协议进行配置。配置清单11-1记录了对3台路由器的配置。配置清单11-1 OSPF协议的基本配置第1段:配置R1路由器RouterenRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#no logg consoleRouter(config)#hostn R1R1(config)#int e0R1(config-if)#no keepaR1(config-if)#ip addr 172.16.1.1255.255.255.0R1(config-if)#no shR1(config-if)#R1(config-if)#int s1R1(config-if)#ip addr 192.168.1.1255.255.255.252R1(config-if)#clock rate 125000R1(config-if)#no shutR1(config-if)#exitR1(config)#router ospf 100R1(config-router)#network 192.168.1.1 0.0.0.0 area 0R1(config-router)#network 172.16.1.1 0.0.0.0 area 0R1(config-router)#ZR1#第2段:配置R2路由器Term_Server#2Resuming connection 2 to r2 . RouterenRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#no logg consoleRouter(config)#shostn R2R2(config)#int s0R2(config-if)#ip addr 192.168.1.5 255.255.255.252R2(config-if)#no shR2(config-if)#int s1R2(config-if)#ip addr 192.168.1.2 255.255.255.252R2(config-if)#no shR2(config-if)#exitR2(config)#router ospf 100R2(config-router)#netw 192.168.1.2 0.0.0.0 area 0R2(config-router)#netw 192.168.1.5 0.0.0.0 area 0R2(config-router)#ZR2#第3段:配置R3路由器Term_Server#3Resuming connection 3 to r3 . RouterenRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#no logg consoleRouter(config)#shostn R3R3(config)#int s0R3(config-if)#ip addr 192.168.1.6 255.255.255.252R3(config-if)#clock rate 64000R3(config-if)#no shutR3(config)#int e0R3(config-if)#no keepaR3(config-if)#ip addr 172.16.3.1255.255.255.0R3(config-if)#no shR3(config-if)#exitR3(config)#router ospf 100R3(config-router)#netw 192.168.1.6 0.0.0.0 area 0R3(config-router)#netw 172.16.3.1 0.0.0.0 area 0R3 (config-router)#exitR3(config-if)#ZR3#(1)在上述配置中,首先对每台路由器的接口进行了配置。需要注意以下两点:在配置串行接口时,应按照接口所连接的电缆类型,对连接DCE电缆的接口配置时钟;在配置以太网接口时,使用了no keepalive命令,以便在不连接网线的情况下,使接口处于激活状态。(2)router ospf 100命令启动一个OSPF路由选择协议进程(Process),其中的100为进程号。与配置IGRP和EIGRP协议中的AS号不同的是,在配置OSPF时,并不需要每台路由器中的进程号一致。AS和进程是完全不同的两个概念。(3)network命令使相应酌网段加入OSPF路由进程中,其格式为:network网络地址(或IP地址)通配码area区域号在本实验的配置中,使用了相应接口IP地址,并且把通配码写成0.0.0.0,区域号为0,即主干区域。在OSPF的配置中,只要把接口加入到OSPF进程中,此接口所对应的网段就加入到OSPF路由进程中了。(4)对于另外2台路由器重复类似的配置,完成OSPF协议的基本配置。第2部分:查看IP路由表和测试连通性下面对配置后的各路由器进行查看和测试,看是否实现了全网的连通。在这一部分,我们使用了show ip route、ping、trace等命令。监测清单11-1记录了所有的操作及其结果。监测清单11-1查看IP路由表并测试连通性R3#sh ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, 0 - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is not set172.16.0.0/24 is subnetted, 2 subnetsO172.16.1.0110/138via 192.168.1.5,00:00:21,Serial0C172.16.3.0 is directly connected, Ethernet0192.168.1.0/30 is subnetted, 2 subnetsO192.168.1.0110/128via 192.168.1.5,00:00:21,Serial0C192.168.1.4 is directly connected, Serial0R3#Term_Server#2Resuming connection 2 to r2 . R2#sh ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, 0 - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - 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 - ODRP - periodic downloaded static routeGateway of last resort is not set172.16.0.0/24 is subnetted, 2 subnetsO172.16.1.0 110/74 via 192.168.1.1,00:00:43,Serial1O172.16.3.0 110/74 via 192.168.1.6,00:00:43,Serial0192.168.1.0/30 is subnetted, 2 subnetsC192.168.1.0 is directly connected, Serial1C192.168.1.4 is directly connected, Serial0R2#ping 172.16.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-tdp min/avg/max =16/18/20 msR2#ping 172.163.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 172.16.3.1, timeout is 2 seconds:!Success rate is 100 percent(5/5),round-trip min/avg/max=28/31/32 msR2#(1)首先在R3路由器上使用show ip route命令查看其IP路由表,可以看到有2条行首标注为O的路由项,它们就是由OSPF协议学习到的路由。这2条路由的目的网段分别为172.16.1.0/24和192.168.1.0/30,它们的下一跳点均为192.168.1.5(R2 S0接口)。在第1个路由表项中有110/138字段,其中110是OSPF的缺省管理距离,138则是本条路由的Cost。Cost即费用,是OSPF中的度量值标准,路由器用Cost来比较到达同一目的网段的不同路径的耗费。低的Cost表示是好的路径,相反则是差的路径。(2)接下来切换到R2路由器的控制台界面上,show ip route命令显示有2条OSPF路由,它们分别是通过192.168.1.1(R1 S1接口)到达172.16.1.0/24网段和通过192.168.1.6(R3 S0接口)到达172.16.3.0/24网段的路由项。(3)在R2路由器上分别间172.16.1.1和172.16.3.1发出了ping测试,结果是成功的。(4)在R1路由器上查看路由表,同样得到2条OSPF路由,分别指向目的网段172.16.3.0/24和192.168.1.4/30,其网关地址均为192.168.1.2(R2 S1接口)。(5)为测试172.16.1.0/24网段到172.16.1.0/24网段的端到端连通性,我们使用了扩展的ping命令。测试结果是成功的,表明从R1的E0接口到R3的E0接口之间是在IP层是正常连通的。(6)接下来的trace命令测试了从R1到R3的E0接口所经过的各个网关,它们依次是192.168.1.2和192.168.1.6。第3部分:查看OSPF协议相关信息下面使用有关命令查看OSPF协议的配置、邻居、接口和路由等信息。监测清单11-2记录了所使用的命令和相应的结果。监测清单11-2查看OSPF相关信息R2#sh ip protocolRouting Protocol is ospf 100Invalid after 0 seconds, hold down 0, flushed after 0Outgoing update filter list for all interfaces isIncoming update filter list for all interfaces isRouting for Networks:192.168.1.2/32192,168.1.5/32Routing Infottuation Sources:GatewayDistanceLast Update192.168.1.111000:09:26192.168.1.611000:09:26Distance: (default is 110)R2#sh ip ospf neighborNeighbor IDPriStateDead TimeAddressInterface192.168.1.61FULL/ -00:00:34192.168.1.6Serial0192.168.1.11FULL/ -00:00:36192.168.1.1Serial1R2#sh ip ospf neighbor detailNeighborIn the area 0 via interface Serial0Neighbor priority is 1,State is FULL,6 state changesDR is 0.0.0.0 BDR is 0.0.0.0Options is 0x42Dead timer-due in 00:00:38Neighbor is up for 00:10:40Index 2/2, retransmission queue length 0, number of retransmission 1First 0x0(0/0x0(0) Next 0x0(0)/0x0(0)Last retransmission scan length is 1, maximum is 1Last retransmission scan time is 0 msec, maximum is 0 msecNeighbor 192.168.1.1,interface address 192.168.1.1In the area 0 via interface Serial 1Neighbor priority is 1,State is FULL, 6 state changesDR is 0.0.0.0 BDR is 0.0.0.0Options is 0x42Dead timer due in 00:00:39Neighbor is up- for 00:10:50Index 1/1, retransmission queue length 0, number of retransmission 1First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)Last retransmission scan length is 1, maximum is 1Last retransmission scan time is 0 msec, maximum is 0 msecR2#sh ip ospf interface s0Serial0 is up, line protocol is upInternet Address 192.168.1.5/30, Arca0Proems ID 100, Router ID 192.168.1.5,Network Type POINT_TO_POINT,Cost:64 Transmit Delay is 1 sec. State POINT_TO_POINT,Timer ititervals configured Hello 10,1ead 40, Wait 40, Retransmit 5Hello due in 00:00:00Index 2/2, flood queue length 0Next 0x0(0)/0x0(0)Last flood scan length is 1, maximum is 1Last flood scan time is 0 msec, maximum is 0 msecNeighbor Count is-: 1,Adjacent neighbor count is 1Adjacent with neighbor 192.168.1.6Suppress hello for 0 neighbor(s)R2#sh ip ospf databaseOSPF Router with ID (192.168.1.5) (Process ID 100)Router Link States(Area 0)Link IDADV RouterAgeSeq#Checksum Link count192.168.1.1192.168.1.18320x800000050xF6B83192.168.1.5192.168,1.58200x800000060xF6B84192.168.1.6192.168.1.68060x800000050xF6B83R2#Term_Server1Resuming connection 1 to r1 . R1#sh ip ospf neighborNeighbor IDPriStateDead TimeAddressInterface192.168.1.51FULL/-00:00:36192.168.1.2Serial1R1#Term_Server3Resuming connection 3 to r3.R3#sh ip ospf neighborNeighbor IDPriStateDead TimeAddressInterface192.168.1.51FULL/-00:00:35192.168.1.5Serial0R3#sh ip route ospf172.16.0.0/24 is subnetted,2 subnetsO172.16.1.0110/138via 192.168.1.5,00:12:12,Serial0192.168.1.0/30 is subnetted,2 subnetsO192.168.1.0110/128via 192.168.1.5,00:12:12,Serial0R3#sh ip route 172.16.1.0Routing entry for 172.16.1./24Known viaospf 100,distance 110,metric 138,type intra areaLast update from 192.168.1.5 on Serial0,00:12:20 agoRouting Descriptor Blocks:* 192J68.1.5, from 192.168.1.1, 00:12:20 ago, via Serial
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 濮阳市中石油2025秋招面试半结构化模拟题及答案油品分析质检岗
- 宝鸡市中石化2025秋招笔试模拟题含答案炼油设备技术岗
- 中国联通普洱市2025秋招面试典型题目及答案
- 中国广电云南地区2025秋招综合管理类专业追问清单及参考回答
- 国家能源南宁市2025秋招面试专业追问及参考能源与动力工程岗位
- 中国移动大庆市2025秋招心理测评常考题型与答题技巧
- 定西市中石化2025秋招写作申论万能模板直接套用
- 宁波市中石油2025秋招笔试模拟题含答案油气储运与管道岗
- 丹东市中石化2025秋招笔试模拟题含答案炼油设备技术岗
- 中国广电济宁市2025秋招网络优化与维护类专业追问清单及参考回答
- 多格列艾汀片-药品临床应用解读
- 图书馆外文图书分编工作细则
- 干漆膜(涂层)厚度检测报告
- 过氧化氢异丙苯安全技术说明书MSDS
- GB/T 3098.4-2000紧固件机械性能螺母细牙螺纹
- 【演练方案】特种设备事故(压力容器)应急预案
- 全新档案法专题学习讲座课件
- 六年级上册道德与法治课件第四单元第8课
- 量具使用知识培训课件
- 感动中国人物-于敏
- Q-RJ 557-2017 航天型号产品禁(限)用工艺目录(公开)
评论
0/150
提交评论