目录
实验条件
网络拓朴
逻辑拓扑
实现目标
环境配置
在我的资源里可以下载(就在这篇文章的开头也可以下载)
开始Troubleshooting
整体排错的思路如下:
- 检查所有的直连口是否双UP
- 检查所有的IGP启动情况,邻居状态
- 根据输出,调整路由参数
检查所有的直连接口都正常启动。
R22发生报错
%OSPF-4-NET_TYPE_MISMATCH: Received Hello from 123.5.5.5 on Ethernet0/0 indicating a potential
network type mismatch
和R5的邻居关系报错了,提示ospf网络类型不一致
问题1. R22的e0/0接口配置了网络类型
R5#show run interface e1/0
Building configuration...
Current configuration : 83 bytes
!
interface Ethernet1/0
ip address 134.56.78.41 255.255.255.252
duplex auto
end
R22#show run interface e0/0
Building configuration...
Current configuration : 115 bytes
!
interface Ethernet0/0
ip address 134.56.78.42 255.255.255.252
ip ospf network point-to-point
duplex auto
end
修改R22的e0/0口, no掉ptop的网络类型
R5#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
123.1.1.1 1 FULL/BDR 00:00:36 123.45.67.17 Ethernet0/0
134.22.22.22 1 FULL/BDR 00:00:33 134.56.78.42 Ethernet1/0
R22(config-if)#do show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
123.5.5.5 1 FULL/DR 00:00:36 134.56.78.41 Ethernet0/0
R22与R21之间没有建立OSPF邻居关系。查看R22和R21的OSPF配置
R21#show run | s router ospf
router ospf 12345
router-id 134.21.21.21
max-metric router-lsa
passive-interface default
no passive-interface Ethernet2/0
network 134.21.21.21 0.0.0.0 area 1
network 134.56.78.38 0.0.0.0 area 1
network 134.56.78.48 0.0.0.7 area 1
neighbor 123.3.3.3
R22(config-if)#do show run | s router ospf
router ospf 12345
router-id 134.22.22.22
passive-interface default
no passive-interface Ethernet0/0
no passive-interface Ethernet2/0
network 134.22.22.22 0.0.0.0 area 1
network 134.56.78.42 0.0.0.0 area 1
network 134.56.78.48 0.0.0.7 area 1
邻居配置并无异常。 R22和R21之间并没有配置成被动接口,理论上是可以建立邻居的。查看两台路由器对应的接口配置
R21#show run interface e2/0
Building configuration...
Current configuration : 83 bytes
!
interface Ethernet2/0
ip address 134.56.78.50 255.255.255.248
duplex auto
end
R22#show run interface e2/0
Building configuration...
Current configuration : 83 bytes
!
interface Ethernet2/0
ip address 134.56.78.49 255.255.255.252
duplex auto
end
问题2. R22和R21之间的IP地址子网掩码长度不一致
根据OSPF的配置文件判断,子网掩码应该是29位,也就是255.255.255.248,修改R22的子网掩码
R22#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R22(config)#int e2/0
R22(config-if)#ip address 134.56.78.49 255.255.255.248
R22(config-if)#do show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
134.21.21.21 1 FULL/DR 00:00:38 134.56.78.50 Ethernet2/0
123.5.5.5 1 FULL/DR 00:00:36 134.56.78.41 Ethernet0/0
R21和R3之间也需要有邻居关系、但是从上面的配置来看。R21的e0/0配置成了被动接口,
问题3. R21的e0/0口配置了被动接口
修改
R21#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R21(config)#int e0/0
R21(config-if)#exit
R21(config)#router ospf 12345
R21(config-router)#no passive-interface e0/0
R21(config-router)#do show run | s router ospf
router ospf 12345
router-id 134.21.21.21
max-metric router-lsa
passive-interface default
no passive-interface Ethernet0/0
no passive-interface Ethernet2/0
network 134.21.21.21 0.0.0.0 area 1
network 134.56.78.38 0.0.0.0 area 1
network 134.56.78.48 0.0.0.7 area 1
neighbor 123.3.3.3
R21(config-router)#do show run interface e0/0
Building configuration...
Current configuration : 83 bytes
!
interface Ethernet0/0
ip address 134.56.7