基本ospf配置实验

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

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

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

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

3、.0.3 area 0 R3(config-router)#network 192.168.10.8 0.0.0.3 area 0 R3(config-router)#end R1(config)#interface loopback 0R1(config-if)#ip address 10.1.1.1 255.255.255.255 R2(config)#interface loopback 0 R2(config-if)#ip address 10.2.2.2 255.255.255.255 R3(config)#interface loopback 0 R3(config-if)#ip

4、address 10.3.3.3 255.255.255.255R1(config)#router ospf 1 R1(config-router)#router-id 10.4.4.4 R1#(config-router)#end R1# clear ip ospf processReset ALL OSPF processes?no:yes 使用 router-id 命令的 no 形式删除所配置的路由器 ID。 R1(config)#router ospf 1 R1(config-router)#router-id 10.4.4.4 Reload or use “clear ip ospf

5、 process” command, for this to take effect 使用 clear ip ospf process 命令重新启动 OSPF 进程。 重新启动 OSPF 进程会强制路由器使用 Loopback 0 接口上所配置的 IP 地址作为路由器 ID。 R1(config-router)#end R1# clear ip ospf processReset ALL OSPF processes? no:yes 在路由器 R1 和 R2 上使用 bandw idth 命令将串行接口的带宽更改为实际带宽 64 kbps。 路由器 R1: R1(config)#interfa

6、ce serial0/0/0 R1(config-if)#bandwidth 64 R1(config-if)#interface serial0/0/1 路由器 R2: R2(config)#interface serial0/0/0 R2(config-if)#bandwidth 64 R2(config)#interface serial0/0/1 R2(config-if)#bandwidth 64 在路由器 R3 上使用 ip ospf cost 命令配置 OSPF 开销。R3(config)#interface serial0/0/0 R3(config-if)#ip ospf c

7、ost 1562 R3(config-if)#interface serial0/0/1 R3(config-if)#ip ospf cost 1562 任务 10:重新分配 OSPF 默认路由 步骤 1:在路由器 R1 上配置一个环回接口,以模拟通向 ISP 的链路。 R1(config)#interface loopback1 R1(config-if)#ip address 172.30.1.1 255.255.255.252 步骤 2:在路由器 R1 上配置一条静态默认路由。使用已配置的用于模拟通向 ISP 的链路的环回地址作为出口接口。 R1(config)#ip route 0.0

8、.0.0 0.0.0.0 loopback1 R1(config)# 步骤 3:使用 default-information originate 命令将该静态路由包括在从路由器 R1 发出的 OSPF 更新中。 R1(config)#router ospf 1 R1(config-router)#default-information originateR1(config-router)#任务 11:配置其它 OSPF 功能 步骤 1:使用 auto-cost reference-bandwidth 命令调整参考带宽值。将参考带宽增大到 10000 以模拟 10GigE 的速度。在 OSPF

9、路由域内的所有路由器上配置此命令。 R1(config-router)#auto-cost reference-bandwidth 10000 R2(config-router)#auto-cost reference-bandwidth 10000 R3(config-router)#auto-cost reference-bandwidth 10000 步骤 2:在路由器 R1 上检查路由表以验证 OSPF 开销度量所发生的变化。步骤 3:在 R1 上使用 show ip ospf neighbor 命令查看 Dead 间隔。Dead 间隔正在从默认的 40 秒钟开始倒计时。 R1#sho

10、w ip ospf neighbor步骤 4:配置 OSPF Hello 间隔和 Dead 间隔。 可分别使用 ip ospf hello-interval 和 ip ospf dead-interval 接口命令手动修改 OSPF Hello 间隔和 Dead 间隔。在路由器 R1 的 Serial 0/0/0 接口上使用这些命令将 hello 间隔和 Dead 间隔分别更改为 5 秒和 20 秒。 R1(config)#interface serial0/0/0 R1(config-if)#ip ospf hello-interval 5 R1(config-if)#ip ospf dea

11、d-interval 20 R1(config-if)# 步骤 5:修改 Dead 计时器和 Hello 计时器。在路由器 R2 的 Serial 0/0/0 接口上修改 Dead 计时器和 Hello 计时器,使其分别匹配 R1 的 Serial 0/0/0 接口上所配置的相应间隔。 R2(config)#interface serial0/0/0 R2(config-if)#ip ospf hello-interval 5 R2(config-if)#ip ospf dead-interval 20 R2(config-if)# 步骤 5:使用 show ip ospf interface

12、 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 仍然使用默认计时器工作。 R1#show ip ospf neighbo场景 B:在多路访问网络上配置 OSPF 任务 4:在 DR 路由器上配置 OSPF 步骤 1:在

13、路由器 R3 上,在全局配置模式下使用 router ospf 命令启用 OSPF。R3(config)#router ospf 1 R3(config-router)#network 192.168.1.0 0.0.0.255 area 0 R3(config-router)#end 任务 5:在 BDR 路由器上配置 OSPF 步骤 1:在路由器 R2 上,在全局配置模式下使用 router ospf 命令启用 OSPF。R2(config)#router ospf 1 R2(config-router)#network 192.168.1.0 0.0.0.255 area 0 R2(co

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

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

16、BDR 步骤 1:使用 ip ospf priority 接口命令将路由器 R1 的 OSPF 优先级更改为 255。R1(config)#interface fastEthernet0/0 R1(config-if)#ip ospf priority 255 R1(config-if)#end 步骤 2:使用 ip ospf priority 接口命令将路由器 R3 的 OSPF 优先级更改为 100。R3(config)#interface fastEthernet0/0 R3(config-if)#ip ospf priority 100 R3(config-if)#end 步骤 3:使用 ip ospf priority 接口命令将路由器 R2 的 OSPF 优先级更改为 0。优先级为 0 导致路由器不具备参与 OSPF 选举并成为 DR 或 BDR 的资格。R2(config)#interface fastEthernet0/0 R2(config-if)#ip ospf pr

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 生活休闲 > 科普知识

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