收藏 分销(赏)

CiscoPacketTracer实验8:开放式最短路径优先路由协议OSPF配置.doc

上传人:天**** 文档编号:4718533 上传时间:2024-10-10 格式:DOC 页数:7 大小:189.02KB
下载 相关 举报
CiscoPacketTracer实验8:开放式最短路径优先路由协议OSPF配置.doc_第1页
第1页 / 共7页
CiscoPacketTracer实验8:开放式最短路径优先路由协议OSPF配置.doc_第2页
第2页 / 共7页
点击查看更多>>
资源描述
实验8:开放式最短路径优先路由协议OSPF 配置 一、实验目的 1、练习OSPF 动态路由协议的基本配置; 2、掌握了解OSPF 路由协议原理 二、实验环境 packet tracer 5.0 三、OSPF 协议介绍 OSPF(Open Shortest Path First 开放式最短路径优先)是一个内部网关协议 (Interior Gateway Protocol, 简称IGP) , 用于在单一自治系统(autonomous system,AS)内决策路由。与RIP 相对,OSPF 是链路状态路由协议,而RIP 是距 离向量路由协议 OSPF 的主要特性如下: 适应范围——支持各种规模的网络,最多可支持几千台路由器。 快速收敛——在网络的拓扑结构发生变化后立即发送更新报文,使这一变化 在自治系统中同步。 无自环——OSPF 根据收集到的链路状态用最短路径树算法计算路由,从算法上本身保证了不会生成自环路由。 OSPF 把一个大型网络分割成多个小型网络的能力被称为分层路由,这些被 分割出来的小型网络就称为“区域”(Area)。由于区域内部路由器仅与同区域的 路由器交换LSA (链路状态广播)信息,这样LSA 报文数量及链路状态信息库表项都会极大减少,SPF (Shortest Path First 最短路径优先算法)计算速度因此得到提高。多区域的OSPF 必须存在一个主干区域,主干区域负责收集非主干区域发出的汇总路由信息,并将这些信息返还给到各区域。 OSPF 区域不能随意划分,应该合理地选择区域边界,使不同区域之间的通 信量最小。但在实际应用中区域的划分往往并不是根据通信模式而是根据地理或 政治因素来完成的。 在OSPF 多区域网络中,路由器可以按不同的需要同时成为以下四种路由器 中的几种: 1. 内部路由器:所有端口在同一区域的路由器,维护一个链路状态数据库。 2. 主干路由器:具有连接主干区域端口的路由器。 3. 区域边界路由器(ABR): 具有连接多区域端口的路由器,一般作为一个区域的出口。ABR 为每一个所连接的区域建立链路状态数据库,负责将所连接区域的路由摘要信息发送到主干区域,而主干区域上的ABR 则负责将这些信息发送到各个区域。 4. 自治域系统边界路由器(ASBR): 至少拥有一个连接外部自治域网络(如非OSPF 的网络)端口的路由器,负 责将非OSPF 网络信息传入OSPF 网络。 四、实验步骤: 拓扑结构图如下所示: 1、配置命令 Router 5: Router>enable //进入特权模式 Router#configure terminal //进入配置模式 Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface FastEthernet0/0 //配置端口 Router(config-if)#ip address 172.16.0.1 255.255.255.0 Router(config-if)#no shutdown %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up Router(config-if)# Router(config-if)#exit Router(config)#interface Serial1/0 //配置端口 Router(config-if)#ip address 192.168.0.1 255.255.255.0 Router(config-if)#clock rate 64000 Router(config-if)#no shutdown Router(config-if)# %LINK-5-CHANGED: Interface Serial1/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up Router(config-if)#route ospf 1 //启用OSPF 协议,ID 号为1 Router(config-router)#network 192.168.0.0 0.0.0.255 area 0 //发布网络 Router(config-router)#network 172.16.0.0 0.0.0.255 area 0 Router(config-router)#exit Router(config)#copy running-config start Router(config)#copy running-config startup- Router(config)#copy running-config startup-c Router(config)#exit %SYS-5-CONFIG_I: Configured from console by console Router#copy run Router#copy running-config s Router#copy running-config startup-config //写入启动文件 Destination filename [startup-config]? Building configuration... [OK] Router 6: Router>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface FastEthernet0/0 Router(config-if)#ip address 172.17.0.1 255.255.255.0 Router(config-if)#no shutdown %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up Router(config-if)#exit Router(config)#interface Serial1/0 Router(config-if)#ip address 192.168.0.2 255.255.255.0 Router(config-if)# %LINK-5-CHANGED: Interface Serial1/0, changed state to upno shutdown %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up Router(config-if)#exit Router(config)#interface Serial1/1 Router(config-if)#ip address 192.168.1.1 255.255.255.0 Router(config-if)#clock rate 64000 Router(config-if)#no shutdown Router(config-if)# %LINK-5-CHANGED: Interface Serial1/1, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up Router(config-if)#router ospf 1 Router(config-router)#network 192.168.0.0 0.0.0.255 area 0 Router(config-router)#network 192.168.1.0 0.0.0.255 area 0 Router(config-router)#network 172.17.0.0 0.0.0.255 area 0 Router(config-router)#exit Router(config)#ex %SYS-5-CONFIG_I: Configured from console by console Router#copy Router#copy r Router#copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] Router# 00:13:29: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.2.1 on Serial1/1 from LOADING to FULL, Loading Done Router 3: Router>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface FastEthernet0/0 Router(config-if)#ip address 172.18.0.1 255.255.255.0 Router(config-if)#no shutdown %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up Router(config-if)#exit Router(config)#interface Serial1/0 Router(config-if)#ip address 192.168.1.2 255.255.255.0 Router(config-if)# %LINK-5-CHANGED: Interface Serial1/0, changed state to upno shutdown Router(config-if)#exit Router(config)#interface Serial1/1 Router(config-if)#ip address 192.168.2.1 255.255.255.0 Router(config-if)#clock rate 64000 Router(config-if)#no shutdown Router(config-if)# %LINK-5-CHANGED: Interface Serial1/1, changed state to up Router(config-if)#exit Router(config)#route ospf 1Router(config-router)#network 192.168.1.0 0.0.0.255 area 0 Router(config-router)#network 192.168.1. 00:13:29: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.1 on Serial1/0 from LOADING to FULL, Loading Done0 0.0.0.255 area 0 Router(config-router)#network 192.168.2.0 0.0.0.255 area 0 Router(config-router)#network 172.18.0.0 0.0.0.255 area 0 Router(config-router)#exit Router(config)#ex %SYS-5-CONFIG_I: Configured from console by console Router#copy r Router#copy running-config s Router#copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] Router 4: Router>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface FastEthernet0/0 Router(config-if)#ip address 10.1.1.1 255.255.255.0 Router(config-if)#no shutdown %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up Router(config-if)#exit Router(config)#interface Serial1/0 Router(config-if)#ip address 192.168.2.2 255.255.255.0 Router(config-if)#ex Router(config)#router ospf 1 Router(config-router)#network 192.168.2.0 0.0.0.255 area 0 Router(config-router)#network 10.1.1.0 0.0.0.255 area 0 Router(config-router)#ex Router(config)#ex %SYS-5-CONFIG_I: Configured from console by console Router#copy r Router#copy running-config s Router#copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] 2、校验、诊断(鉴于篇幅,以下命令均在router 6 上调试) show ip protocol 查看路由器中所启用的路由计算协议: show ip ospf: show ip ospf neighbor show ip ospf database debug ip ospf events 开启诊断,no debug ip ospf events 关闭诊断 完成上述配置之后,为所有网段内的计算机配置正确的Ip 地址,并且人一 台计算机可以ping 通所有的计算机或路由器
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传
相似文档                                   自信AI助手自信AI助手

当前位置:首页 > 通信科技 > 网络/通信

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:4009-655-100  投诉/维权电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服