ospf故障排错流程-酷5爱网络

来源:百度文库 编辑:神马文学网 时间:2024/04/30 02:06:04
拓扑图:

在这样一个较复杂的OSPF多区域网络中,配置稍不小心就可能出错,出现故障后我们该从哪下手开始OSPF故障排错呢?对大多数刚学路由或没有经验的从业人员来说真的是头疼。我以多年的OSPF工作经验总结了以下OSPF的故障排错步骤,希望对大家有所帮助:
1、  首先要查看所有路由器的路由表,找到没学到路由的那台路由器。
使用命令show ip route,对照拓扑图,到底哪条路由没学到。这条路由该有谁发过来这台路由器才能学到。
2、  查看第1步中缺少路由的路由器OSPF邻接关系表。查看这台路由器是否与所有邻居建立好邻接关系(在OSPF中要发送LSU,必须先建立邻接关系)。
使用show ip ospf neighbor,找到本路由器与谁没有建立好邻接关系。
3、  解决没建立好邻接关系的问题。
如何解决?我们首先理解OSPF建立邻接关系的三大条件:
1)  两邻居路由器必须在同一物理链路上。
使用show cdp neighbor命令查看CDP邻居关系。如果发现没有CDP邻接关系说明物理连接有问题,你得去查看接口状态是否为UP?是否激活接口?是否物理线路有问题?如果能看到CDP邻居关系说明物理链路没有问题。进入下一步。
2)  相连路由器都必须加入OSPF。
通过show ip protocols命令查看路由器接口是否宣告到相应区域内。
或者用debug ip ospf hello命令查看路由器哪些接口没有发HELLO包,就说明这个接口没有加入OSPF。找到问题马上更正。如果这一步也没问题,进入下一步。
3)  相连路由器的6大HELLO包参数是否一样?
?         Network/mask
?         Hello/dead interval
?         Network type
?         Area-id
?         Area-type
?         Authentication-type
a.前四个参数通过show ip ospf interface ……
Router#show ip ospf int f0/0
FastEthernet0/0 is up, line protocol is up
Internet Address 192.168.1.2/24, Area 0
Process ID 2, Router ID 192.168.1.2, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 192.168.1.1, Interface address 192.168.1.1
Backup Designated router (ID) 192.168.1.2, Interface address 192.168.1.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:00
Supports Link-local Signaling (LLS)
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.1  (Designated Router)
Suppress hello for 0 neighbor(s)
b.后两个参数通过show ip ospf 查看
Router#show ip os
Routing Process "ospf 2" with ID 192.168.1.2
Start time: 00:02:45.988, Time elapsed: 00:11:02.160
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Incremental-SPF disabled
Minimum LSA interval 5 secs
Minimum LSA arrival 1000 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Number of external LSA 0. Checksum Sum 0x000000
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 1. 1 normal 0 stub 0 nssa area-type
Number of areas transit capable is 0
External flood list length 0
Area BACKBONE(0)
Number of interfaces in this area is 1
Area has message digest authentication    authentication-type
SPF algorithm last executed 00:00:10.064 ago
SPF algorithm executed 5 times
Area ranges are
Number of LSA 3. Checksum Sum 0x0291F5
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
配合debug ip ospf event
经过这三个步骤的检查,一定能找到问题所在,解决故障!整个排错过程都离不开OSPF的原理。其实只要大家非常熟悉OSPF的原理就一定能排除OSPF故障!其他路由交换技术也是一个道理。所以大家一定要重视理论的学习,结合实践就一定能学好!谢谢!