基本OSPF配置实验

上传人:鲁** 文档编号:563619875 上传时间:2023-02-11 格式:DOCX 页数:4 大小:15.39KB
返回 下载 相关 举报
基本OSPF配置实验_第1页
第1页 / 共4页
基本OSPF配置实验_第2页
第2页 / 共4页
基本OSPF配置实验_第3页
第3页 / 共4页
基本OSPF配置实验_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

《基本OSPF配置实验》由会员分享,可在线阅读,更多相关《基本OSPF配置实验(4页珍藏版)》请在金锄头文库上搜索。

1、基本OSPF配置实验在路由器R1上配置OSPFRl(config)#router ospf 1Rl(config-router)#Rl(config-router)#network 172.16.1.16 0.0.0.15 area 0Rl(config-router)# network 192.168.10.0 0.0.0.3 area 0Rl(config-router)# network 192.168.10.4 0.0.0.3 area 0Rl(config-router)#endR2(config)#router ospf 1R2(config-router)#R2(config-r

2、outer)#network 10.10.10.0 0.0.0.255 area 0R2(config-router)#network 192.168.10.0 0.0.0.3R2(config-router)#network 192.168.10.8 0.0.0.3 area 0R2(config-router)#endR3(config)#router ospf 1R3(config-router)#network 172.16.1.32 0.0.0.7 area 0R3(config-router)#network 192.168.10.4 0.0.0.3 area 0R3(config

3、-router)#network 192.168.10.8 0.0.0.3 area 0R3(config-router)#endRl(config)#interface loopback 0Rl(config-if)#ip address 10.1.1.1 255.255.255.255R2(config)#interface loopback 0R2(config-if)#ip address 10.2.2.2 255.255.255.255R3(config)#interface loopback 0R3(config-if)#ip address 10.3.3.3 255.255.25

4、5.255Rl(config)#router ospf 1Rl(config-router)#router-id 10.4.4.4Rl#(config-router)#endR1# clear ip ospf processReset ALL OSPF processes?no:yes使用router-id命令的no形式删除所配置的路由器ID。Rl(config)#router ospf 1Rl(config-router)#router-id 10.4.4.4Reload or use “clear ip ospf process” command, for this to take eff

5、ect使用clear ip ospf process命令重新启动OSPF进程。重新启动OSPF进程会强制路由器使用Loopback 0接口上所配置的IP地址作为路由器ID。R1(config-router)#endR1# clear ip ospf processReset ALL OSPF processes? no:yes在路由器R1和R2上使用bandwidth命令将串行接口的带宽更改为实际带宽64 kbps。路由器R1:R1(config)#interface serial0/0/0R1(config-if)#bandwidth 64R1(config-if)#interface se

6、rial0/0/1路由器R2:R2(config)#interface serialO/O/OR2(config-if)#bandwidth 64R2(config)#interface serialO/O/1R2(config-if)#bandwidth 64在路由器R3上使用ip ospf cost命令配置OSPF开销。R3(config)#interface serialO/O/OR3(config-if)#ip ospf cost 1562R3(config-if)#interface serialO/O/1R3(config-if)#ip ospf cost 1562任务10:重新分

7、配OSPF默认路由步骤1:在路由器R1上配置一个环回接口,以模拟通向ISP的链路。Rl(config)#interface loopbacklRl(config-if)#ip address 172.3O.1.1 255.255.255.252步骤2:在路由器R1上配置一条静态默认路由。使用已配置的用于模拟通向ISP的链路的环回地址作为出口接口。Rl(config)#ip route 0.0.0.0 0.0.0.0 loopback1Rl(config)#步骤3:使用default-information originate命令将该静态路由包括在从路由器R1发出 的OSPF更新中。Rl(con

8、fig)#router ospf 1Rl(config-router)#default-information originateRl(config-router)#任务11:配置其它OSPF功能步骤1:使用auto-cost reference-bandwidth命令调整参考带宽值。将参考带宽增大到10000以模拟10GigE的速度。在OSPF路由域内的所有路由器上配置此命令。Rl(config-router)#auto-cost reference-bandwidth 10000R2(config-router)#auto-cost reference-bandwidth 10000R3(

9、config-router)#auto-cost reference-bandwidth 10000步骤2:在路由器R1上检查路由表以验证OSPF开销度量所发生的变化。步骤3:在R1上使用show ip ospf neighbor命令查看Dead间隔。Dead间隔正在从默认的40秒钟开始倒计时。Rl#show ip ospf neighbor步骤4:配置OSPF Hello间隔和Dead间隔。可分别使用 ip ospf hello-interval 和 ip ospf dead-interval 接口命令手动修改OSPF Hello间隔和Dead间隔。在路由器R1的Serial 0/0/0接口

10、上使用这些命令将hello间隔和 Dead间隔分别更改为5秒和20秒。Rl(config)#interface serialO/0/0Rl(config-if)#ip ospf hello-interval 5Rl(config-if)#ip ospf dead-interval 20Rl(config-if)#步骤5:修改Dead计时器和Hello计时器。在路由器R2的Serial 0/0/0接口上修改Dead计时器和Hello计时器,使其分别匹配 R1的Serial0/0/0接口上所配置的相应间隔。R2(config)#interface serialO/O/OR2(config-if)#

11、ip ospf hello-interval 5R2(config-if)#ip ospf dead-interval 20R2(config-if)#步骤5:使用show ip ospf interface serial0/0/0命令验证是否已修改Hello计时器和 Dead计时器。R2#show ip ospf interface serial0/0/0步骤6:在R1上使用show ip ospf neighbor命令验证与R2的相邻关系是否已恢复。请注意,Serial 0/0/0接口的Dead间隔现在低得多了,因为它现在从20秒钟而非默认的40秒钟 开始倒计时。Serial 0/0/1仍

12、然使用默认计时器工作。Rl#show ip ospf neighbo场景B:在多路访问网络上配置OSPF任务4:在DR路由器上配置OSPF步骤1:在路由器R3上,在全局配置模式下使用router ospf命令启用OSPF。R3(config)#router ospf 1R3(config-router)#network 192.168.1.0 0.0.0.255 area 0R3(config-router)#end任务5:在BDR路由器上配置OSPF步骤1:在路由器R2上,在全局配置模式下使用router ospf命令启用OSPF。R2(config)#router ospf 1R2(con

13、fig-router)#network 192.168.1.0 0.0.0.255 area 0R2(config-router)#end步骤2:使用show ip ospf interface命令验证是否已正确配置OSPF以及R2是否为BDR。R2#show ip ospf interfaceR2#步骤3:使用show ip ospf neighbors命令查看与该OSPF区域内的其它路由器相关的信息。请注意,R3为DR。R2#show ip ospf neighbor任务6:在DRother路由器上配置OSPF步骤1:在路由器R1上,在全局配置模式下使用router ospf命令启用OSP

14、F。Rl(config)#router ospf 1Rl(config-router)#network 192.168.1.0 0.0.0.255 area 0Rl(config-router)#end步骤2:使用show ip ospf interface命令验证是否已正确配置OSPF以及R1是否为DRother oRl#show ip ospf interface步骤3:使用show ip ospf neighbors命令查看与该OSPF区域内的其它路由器相关的信息。请注意,R3是DR, R2是BDRoRl#show ip ospf neighbor任务7:使用OSPF优先级确定DR和BD

15、R步骤1使用ip ospf priority接口命令将路由器R1的OSPF优先级更改为255。Rl(config)#interface fastEthernetO/ORl(config-if)#ip ospf priority 255Rl(config-if)#end步骤2:使用ip ospf priority接口命令将路由器R3的OSPF优先级更改为100。R3(config)#interface fastEthernetO/OR3(config-if)#ip ospf priority 100R3(config-if)#end步骤3:使用ip ospf priority接口命令将路由器R2的OSPF优先级更改为0。优先级为0 导致路由器不具备参与OSPF选举并成为DR或BDR的资格。R2(config)#interface fastEthernetO/OR2(config-if)#ip ospf priority OR2(config-if)#end步骤4:关闭FastEthernet0/0接口,然后将其重新启动,以强制进行OSPF选举。R1:Rl(config)#interface fastethernetO/O

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

当前位置:首页 > 学术论文 > 其它学术论文

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号