日前,笔者在工作中发现一个问题,即无法得到正常的OSPF路由。笔者现将OSPF协议排错的过程写下来,希望能与更多的朋友共享。
1、 现象描述
在下图中,两台路由器通过串口连接,在互连接口上运行OSPF协议。RouterA的以太网接口地址为111.111.111.1,且运行了OSPF协议,Router的以太网接口地址为222.222.222.1,也启用了OSPF协议。 RouterA的主要配置如下:
interface Loopback0 ip address 197.7.1.1 255.255.255.255 ! interface FastEthernet0/0 ip address 111.111.111.1 255.255.255.0 ip ospf cost 200 duplex auto speed auto ! interface Serial1/0 ip address 100.1.0.1 255.255.0.0 ip ospf network point-to-multipoint ip ospf cost 200 serial restart-delay 0 ! router ospf 22 router-id 197.7.1.1 log-adjacency-changes network 100.1.0.1 0.0.0.0 area 0 network 111.111.111.1 0.0.0.0 area 0 neighbor 100.1.0.2 cost 200
Router的主要配置如下:
interface FastEthernet0/0 ip address 222.222.222.1 255.255.255.0 ip ospf cost 200 duplex auto speed auto ! interface Serial1/0 ip address 100.1.0.2 255.255.0.0 ip ospf network non-broadcast ip ospf cost 200 serial restart-delay 0 router ospf 22 router-id 197.7.1.2 log-adjacency-changes network 100.1.0.2 0.0.0.0 area 0 network 222.222.222.1 0.0.0.0 area 0 neighbor 100.1.0.1 cost 200
故障现象如下:
在RouterA和RouterB上查看路由表,发现相互之间并没有学习到OSPF路由。 2、 显示OSPF信息
分别在两台路由器上查看邻居状态,显示如下:
RouterA#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 197.7.1.2 0 FULL/ - 00:01:38 100.1.0.2 Serial1/0 RouterA#show ip ospf neighbor Neighbor [1] [2] [3] [4] 下一页 |