admin管理员组文章数量:1633908
目录
- 1. 配置PSPF
- 2. 配置24位环回路由接口
- 3. 显示 OSPF 进程及区域的细节
- 4. 设置接口的 cost值
- 5. 修改Hello 间隔(秒)
- 6. 修改Dead 间隔(秒)
- 7. 修改带宽
- 8. 修改参考带宽
- 9. 修改接口优先级
- 10. 重新选举 DR
- 11. OSPF 区域内注入一条默认路由
- 12. 查看达到网络 10.10.10.0/24 的 OSPF 开销
- 13. 查看 Serial 0/0/0 接口的带宽
- 14. 验证串行链路的开销
- 15. 配置 OSPF 开销
- 16. 验证是否已修改 Hello 计时器和Dead 计时器
- 17. 验证与 R2 的相邻关系是否已恢复
- 18. 查看是否为DB,BDR
1. 配置PSPF
配置路由器 R1
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 1.1.1.0 255.255.255.0 area 0
R1(config-router)#network 192.168.12.0 255.255.255.0 area 0
2. 配置24位环回路由接口
R2(config)#interface loopback 0
R2(config-if)#ip ospf network point-to-point
//环回接口 OSPF 路由条目的掩码长度都是 32 位,这是环回接口的特性,尽管通告了24 位,解决的办法是在环回接口下修改网络类型为“Point-to-Point”
3. 显示 OSPF 进程及区域的细节
R2#show ip ospf 1
R2#show ip ospf interface s0/0/0
R2#show ip ospf neighbor
R2#show ip ospf database
4. 设置接口的 cost值
R2(config-if)#ip ospf cost
//cost 的计算公式为 10^8/带宽(bps),然后取整,而且是所有链路入口的 cost 之和,环回接口的 cost 为 1
5. 修改Hello 间隔(秒)
ip ospf hello-interval
6. 修改Dead 间隔(秒)
ip ospf dead-interval
7. 修改带宽
R3(config)#router ospf 1
R3(config-router)#bandwidth 1000
8. 修改参考带宽
R3(config)#router ospf 1
R3(config-router)#auto-cost reference-bandwidth
9. 修改接口优先级
R1(config-router)#int f0/0
R1(config-if)#ip ospf priority 1
//优先级(范围为 0-255),优先级最高的被选举成 DR,默认情况下,多路访问网络的接口优先级为 1,点到点网络接口优先级为 0
10. 重新选举 DR
1.重新启动路由器
2.clear ip ospf process
11. OSPF 区域内注入一条默认路由
R1(config-router)#default-information originate
12. 查看达到网络 10.10.10.0/24 的 OSPF 开销
R1#show ip route
<省略部分输出>
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.1.1.1/32 is directly connected, Loopback0
O 10.10.10.0/24 [110/65] via 192.168.10.2, 00:16:56, Serial0/0/0
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.1.16/28 is directly connected, FastEthernet0/0
O 172.16.1.32/29 [110/65] via 192.168.10.6, 00:17:06, Serial0/0/1
192.168.10.0/30 is subnetted, 3 subnets
C 192.168.10.0 is directly connected, Serial0/0/0
C 192.168.10.4 is directly connected, Serial0/0/1
O 192.168.10.8 [110/128] via 192.168.10.6, 00:17:06, Serial0/0/1
[110/128] via 192.168.10.2, 00:16:56, Serial0/0/0
13. 查看 Serial 0/0/0 接口的带宽
R1#show interfaces serial0/0/0
Serial0/0/0 is up, line protocol is up (connected)
Hardware is HD64570
Internet address is 192.168.10.1/30
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load
1/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input never, output never, output hang never
Last clearing of “show interface” counters never
Input queue: 0/75/0 (size/max/drops); Total output drops: 0
<省略部分输出>
14. 验证串行链路的开销
R1#show ip ospf interface
<省略部分输出>
Serial0/0/0 is up, line protocol is up
Internet address is 192.168.10.1/30, Area 0
Process ID 1, Router ID 10.1.1.1, Network Type POINT-TO-POINT, Cost:
1562
Transmit Delay is 1 sec, State POINT-TO-POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:05
Index 2/2, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1 , Adjacent neighbor count is 1
Adjacent with neighbor 10.2.2.2
Suppress hello for 0 neighbor(s)
Serial0/0/1 is up, line protocol is up
Internet address is 192.168.10.5/30, Area 0
Process ID 1, Router ID 10.1.1.1, Network Type POINT-TO-POINT, Cost:
1562
Transmit Delay is 1 sec, State POINT-TO-POINT,
<省略部分输出>
15. 配置 OSPF 开销
R3(config)#interface serial0/0/0
R3(config-if)#ip ospf cost 1562
16. 验证是否已修改 Hello 计时器和Dead 计时器
R2#show ip ospf interface serial0/0/0
Serial0/0/0 is up, line protocol is up
Internet address is 192.168.10.2/30, Area 0
Process ID 1, Router ID 10.2.2.2, Network Type POINT-TO-POINT, Cost:
1562
Transmit Delay is 1 sec, State POINT-TO-POINT,
Timer intervals configured, Hello 5, Dead 20, Wait 20, Retransmit 5
Hello due in 00:00:00
Index 3/3, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1 , Adjacent neighbor count is 1
Adjacent with neighbor 10.1.1.1
Suppress hello for 0 neighbor(s)
17. 验证与 R2 的相邻关系是否已恢复
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address
Interface
10.2.2.2 0 FULL/- 00:00:19 192.168.10.2
Serial0/0/0
10.3.3.3 0 FULL/- 00:00:34 192.168.10.6
Serial0/0/1
18. 查看是否为DB,BDR
R2#show ip ospf interface
FastEthernet0/0 is up, line protocol is up
Internet address is 192.168.1.2/24, Area 0
Process ID 1, Router ID 192.168.31.22, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 192.168.31.33, Interface address 192.168.1.3
Backup Designated Router (ID) 192.168.31.22, Interface address
192.168.1.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:03
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 192.168.1.3 (Designated Router)
Suppress hello for 0 neighbor(s)
版权声明:本文标题:OSPF配置(动态路由协议) 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1729176000a1188725.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论