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 ID Pri State Dead Time Address Interface
197.7.1.1 1 FULL/BDR 00:01:54 100.1.0.1 Serial1/0
然后分别察看路由表,有下列显示:
RouterA#show ip route
100.0.0.0/16 is subnetted, 1 subnets
C 100.1.0.0 is directly connected, Serial1/0
197.7.1.0/32 is subnetted, 1 subnets
C 197.7.1.1 is directly connected, Loopback0
111.0.0.0/24 is subnetted, 1 subnets
C 111.111.111.0 is directly connected, FastEthernet0/0
RouterB#show ip route
C 222.222.222.0/24 is directly connected, FastEthernet0/0
100.0.0.0/16 is subnetted, 1 subnets
C 100.1.0.0 is directly connected, Serial1/0
接下来在来查看两台路由器的接口状态如下:
RouterA#show ip ospf interface
FastEthernet0/0 is up, line protocol is up
Internet Address 111.111.111.1/24, Area 0
Process ID 22, Router ID 197.7.1.1, Network Type BROADCAST, Cost: 200
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 197.7.1.1, Interface address 111.111.111.1
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:09
Index 2/2, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 0, maximum is 0
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)
Serial1/0 is up, line protocol is up
Internet Address 100.1.0.1/16, Area 0
Process ID 22, Router ID 197.7.1.1, Network Type POINT_TO_MULTIPOINT, Cost: 200
Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
oob-resync timeout 120
Hello due in 00:00:23
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 197.7.1.2, cost is 200
Suppress hello for 0 neighbor(s)
RouterB#show ip ospf interface
FastEthernet0/0 is up, line protocol is up
Internet Address 222.222.222.1/24, Area 0
Process ID 22, Router ID 197.7.1.2, Network Type BROADCAST, Cost: 200
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 197.7.1.2, Interface address 222.222.222.1
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:07
Index 2/2, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 0, maximum is 0
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)
Serial1/0 is up, line protocol is up
Internet Address 100.1.0.2/16, Area 0
Process ID 22, Router ID 197.7.1.2, Network Type NON_BROADCAST, Cost: 200
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 197.7.1.2, Interface address 100.1.0.2
Backup Designated router (ID) 197.7.1.1, Interface address 100.1.0.1
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
oob-resync timeout 120
Hello due in 00:00:17
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 197.7.1.1 (Backup Designated Router)
Suppress hello for 0 neighbor(s)
3、原因分析
从查看路由器相应接口配置和状态信息来看,RouterA和Router相连接口的OSPF网络类型并不一致,因此导致路由计算错误,无法得到正常的OSPF路由。
4、处理过程
在RouterA和RouterB上,将相应的端口网络类型改为一致,就可以学习到正常的OSPF路由。改变Router的serial1/0口的网络类型为POINT_TO_MULTIPOINT
改正完成后,我们在来看下两台路由器的路由表:
RouterA#show ip route
O 222.222.222.0/24 [110/400] via 100.1.0.2, 00:00:33, Serial1/0
100.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 100.1.0.0/16 is directly connected, Serial1/0
O 100.1.0.2/32 [110/200] via 100.1.0.2, 00:00:33, Serial1/0
111.0.0.0/24 is subnetted, 1 subnets
C 111.111.111.0 is directly connected, FastEthernet0/0
RouterB# show ip route
C 222.222.222.0/24 is directly connected, FastEthernet0/0
100.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O 100.1.0.1/32 [110/200] via 100.1.0.1, 00:00:31, Serial1/0
C 100.1.0.0/16 is directly connected, Serial1/0
111.0.0.0/24 is subnetted, 1 subnets
O 111.111.111.0 [110/400] via 100.1.0.1, 00:00:31, Serial1/0