OSPF Router ID冲突问题定位思路

  一:问题现象

  由于Router ID是标识OSPF设备的重要依据,一旦冲突会导致OSPF的LSA频繁的老化和产生,进而导致网络不稳定。

  当Router ID冲突时通常会出现如下现象:

  1. CPU占用高,其中Rout任务占用很高

  2. 有路由振荡发生

  二:区域内Router id冲突判断方法

  假设有如下拓扑:

                                 

图片5.png

  RTA、RTB和RTC、RTD在区域0建立OSPF邻居关系,RTA和RTC的router id都是1.1.1.1,发生了冲突。

  注意:上图的top中四台路由器都在一个区域中。

  判断方法:

  1. 在任意一台路由器上每隔一秒输入display ospf lsdb, 查看是否有Router LSA的Age字段频繁变化, 同时查看Sequence字段是否增加的很快:

  display ospf lsdb

  OSPF Process 1 with Router ID1.1.1.1

  LinkStateDatabase

  Area:0.0.0.0

  Type LinkState ID AdvRouter Age Len Sequence Metric

  Router 1.1.1.1 1.1.1.1 6 36 800015D0 1562

  display ospf lsdb

  OSPF Process 1 with Router ID1.1.1.1

  LinkStateDatabase

  Area:0.0.0.0

  Type LinkState ID AdvRouter Age Len Sequence Metric Router 1.1.1.1 1.1.1.1 0 36 800015D3 1562

  上例中router id为1.1.1.1的Router LSA Age频繁变化,Sequenc增加得也很快。

  2. 每隔一秒在RTB上输入display ospf routing,可以看到有路由在振荡,如果区域内路由频繁振荡,在没有邻居振荡的情况下,可以判断为Router ID冲突。

  display ospf routing

  OSPF Process 1 with Router ID2.2.2.2

  Routing Tables

  Routing for Network

  Destination Cost Type NextHop AdvRouter Area

  33.33.33.0/24 3124 Transit 22.22.22.2 4.4.4.4 0.0.0.0

  display ospf routing

  OSPF Process 1 with Router ID2.2.2.2

  Routing Tables

  Routing for Network

  Destination Cost Type NextHop AdvRouter Area

  总的来说,在现网中,Router ID配置冲突的现象时有发生。如果掌握了一些常用的判断方法,可以比较方便的找到问题的原因,然后逐个排查,找出冲突的Router ID,更改冲突的Router ID后通过reset ospf process可以修正该配置错误。


2015年07月