目录
实验条件
网络拓朴
逻辑拓扑
实现目标
环境配置
在我的资源里可以下载(就在这篇文章的开头也可以下载)
开始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.78.38 255.255.255.252
duplex auto
end
不过发现和R3依然没有建立起邻居关系,查看R3的OSPF配置项,及相关接口配置
R3#show run | s router ospf
router ospf 12345
router-id 123.3.3.3
area 1 range 134.56.78.0 255.255.255.0
network 123.3.3.3 0.0.0.0 area 0
network 123.45.67.6 0.0.0.0 area 0
network 134.56.78.37 0.0.0.0 area 1
R3#show run interface e2/0
Building configuration...
Current configuration : 110 bytes
!
interface Ethernet2/0
ip address 134.56.78.37 255.255.255.252
ip ospf hello-interval 11
duplex auto
end
问题4. R3配置了不一致的hello-time
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#int e2/0
R3(config-if)#no ip ospf hello-interval 11
R3(config-if)#do show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
123.1.1.1 1 FULL/BDR 00:00:37 123.45.67.5 Ethernet0/0
134.21.21.21 1 FULL/DR 00:00:34 134.56.78.38 Ethernet2/0
所有的邻居关系都起来了,接下来实现OUTPUT的要求
R1#show ip ospf database summary 134.56.78.48
OSPF Router with ID (123.1.1.1) (Process ID 12345)
Summary Net Link States (Area 0)
LS age: 516
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 134.56.78.48 (summary Network Number)
Advertising Router: 123.5.5.5
LS Seq Number: 80000002
Checksum: 0xAEB8
Length: 28
Network Mask: /29
MTID: 0 Metric: 20
只有123.5.5.5通告过来的路由,并没有123.3.3.3通告过来的路由。
通过拓扑图可以看出134.56.78.48/29是R21和R22之间的网段,R22可以通过R5再到R1与R21通过R3再到R1之间的Cost值应该是一样的、R1可以接收R3和R5两条通告,查询OSPF数据库
R1#show ip ospf database
OSPF Router with ID (123.1.1.1) (Process ID 12345)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
123.1.1.1 123.1.1.1 457 0x80000005 0x007236 4
123.3.3.3 123.3.3.3 451 0x80000005 0x00277B 2
123.5.5.5 123.5.5.5 459 0x80000005 0x003345 2
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
123.45.67.6 123.3.3.3 467 0x80000001 0x009A29
123.45.67.18 123.5.5.5 464 0x80000001 0x002E7D
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
134.21.21.21 123.3.3.3 78 0x80000001 0x00D413
134.21.21.21 123.5.5.5 217 0x80000001 0x000FC8
134.22.22.22 123.3.3.3 78 0x80000001 0x00B133
134.22.22.22 123.5.5.5 268 0x80000001 0x008955
134.56.78.0 123.3.3.3 499 0x80000001 0x00821F
134.56.78.36 123.5.5.5 77 0x80000002 0x003D32
134.56.78.40 123.5.5.5 268 0x80000001 0x00B4C1
134.56.78.48 123.5.5.5 227 0x80000002 0x00AEB8
R1#show ip ospf database summary 134.56.78.0
OSPF Router with ID (123.1.1.1) (Process ID 12345)
Summary Net Link States (Area 0)
LS age: 632
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 134.56.78.0 (summary Network Number)
Advertising Router: 123.3.3.3
LS Seq Number: 80000001
Checksum: 0x821F
Length: 28
Network Mask: /24
MTID: 0 Metric: 10
R1#
发现从123.3.3.3过来的只有一条134.56.78.0/24的路由(目标网段的子网掩码都是24位以上的,所以路由被汇总了)查询R3上的OSPF配置
R3#show run | s router ospf
router ospf 12345
router-id 123.3.3.3
area 1 range 134.56.78.0 255.255.255.0
network 123.3.3.3 0.0.0.0 area 0
network 123.45.67.6 0.0.0.0 area 0
network 134.56.78.37 0.0.0.0 area 1
R3#
发起这里有一条汇总命令,取消,让明细路由可以传递给Area0的区域
问题5. R3汇总了134.56.78.0的网段路由。
取消汇总信息
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#router ospf 12345
R3(config-router)#no area 1 range 134.56.78.0 255.255.255.0
R3(config-router)#
再次查询R1上的OSPF数据库
R1#show ip ospf database
OSPF Router with ID (123.1.1.1) (Process ID 12345)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
123.1.1.1 123.1.1.1 869 0x80000005 0x007236 4
123.3.3.3 123.3.3.3 863 0x80000005 0x00277B 2
123.5.5.5 123.5.5.5 871 0x80000005 0x003345 2
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
123.45.67.6 123.3.3.3 880 0x80000001 0x009A29
123.45.67.18 123.5.5.5 877 0x80000001 0x002E7D
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
134.21.21.21 123.3.3.3 490 0x80000001 0x00D413
134.21.21.21 123.5.5.5 629 0x80000001 0x000FC8
134.22.22.22 123.3.3.3 490 0x80000001 0x00B133
134.22.22.22 123.5.5.5 680 0x80000001 0x008955
134.56.78.36 123.3.3.3 4 0x80000001 0x000779
134.56.78.36 123.5.5.5 490 0x80000002 0x003D32
134.56.78.40 123.3.3.3 4 0x80000001 0x004131
134.56.78.40 123.5.5.5 680 0x80000001 0x00B4C1
134.56.78.48 123.3.3.3 4 0x80000001 0x007404
134.56.78.48 123.5.5.5 639 0x80000002 0x00AEB8
R1#
再次查看R1上ABR的汇总路由
R1#show ip ospf database summary 134.56.78.48
OSPF Router with ID (123.1.1.1) (Process ID 12345)
Summary Net Link States (Area 0)
LS age: 73
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 134.56.78.48 (summary Network Number)
Advertising Router: 123.3.3.3
LS Seq Number: 80000001
Checksum: 0x7404
Length: 28
Network Mask: /29
MTID: 0 Metric: 65545
LS age: 708
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 134.56.78.48 (summary Network Number)
Advertising Router: 123.5.5.5
LS Seq Number: 80000002
Checksum: 0xAEB8
Length: 28
Network Mask: /29
MTID: 0 Metric: 20
R1#show ip route
......
134.56.0.0/16 is variably subnetted, 3 subnets, 2 masks
O IA 134.56.78.36/30 [110/11] via 123.45.67.6, 00:02:27, Ethernet1/0
O IA 134.56.78.40/30 [110/20] via 123.45.67.18, 00:13:43, Ethernet2/0
O IA 134.56.78.48/29 [110/30] via 123.45.67.18, 00:12:57, Ethernet2/0
R1#
还是没有形成等价负载均衡, 因为一个Metric为65545,一个为20,根据路由通告路径一个节点一个节点去检查Metric
R3#show ip ospf database summary 134.56.78.48
OSPF Router with ID (123.3.3.3) (Process ID 12345)
Summary Net Link States (Area 0)
LS age: 600
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 134.56.78.48 (summary Network Number)
Advertising Router: 123.3.3.3
LS Seq Number: 80000001
Checksum: 0x7404
Length: 28
Network Mask: /29
MTID: 0 Metric: 65545
LS age: 1237
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 134.56.78.48 (summary Network Number)
Advertising Router: 123.5.5.5
LS Seq Number: 80000002
Checksum: 0xAEB8
Length: 28
Network Mask: /29
MTID: 0 Metric: 20
R3#show ip route
......
134.56.0.0/16 is variably subnetted, 4 subnets, 3 masks
C 134.56.78.36/30 is directly connected, Ethernet2/0
L 134.56.78.37/32 is directly connected, Ethernet2/0
O 134.56.78.40/30 [110/65555] via 134.56.78.38, 00:10:43, Ethernet2/0
O 134.56.78.48/29 [110/65545] via 134.56.78.38, 00:10:43, Ethernet2/0
R3#show run interface e2/0
Building configuration...
Current configuration : 83 bytes
!
interface Ethernet2/0
ip address 134.56.78.37 255.255.255.252
duplex auto
end
R3#show run | s router ospf
router ospf 12345
router-id 123.3.3.3
network 123.3.3.3 0.0.0.0 area 0
network 123.45.67.6 0.0.0.0 area 0
network 134.56.78.37 0.0.0.0 area 1
R3#
检查了R3上的配置。已经入方向上的COST配置(未配置E口默认cost为10)继续检查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
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 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#
发现了R21上配置了max-metric,要删除
问题6. R21配置了max-metric导致路由Metric过大
删除该配置
R21#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R21(config)#router ospf 12345
R21(config-router)#no max-metric router-lsa
R21(config-router)#
验证修改的效果
R1#show ip ospf database summary 134.56.78.48
OSPF Router with ID (123.1.1.1) (Process ID 12345)
Summary Net Link States (Area 0)
LS age: 14
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 134.56.78.48 (summary Network Number)
Advertising Router: 123.3.3.3
LS Seq Number: 80000002
Checksum: 0xD894
Length: 28
Network Mask: /29
MTID: 0 Metric: 20
LS age: 1664
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 134.56.78.48 (summary Network Number)
Advertising Router: 123.5.5.5
LS Seq Number: 80000002
Checksum: 0xAEB8
Length: 28
Network Mask: /29
MTID: 0 Metric: 20
R1#
目标达成了,再看一下路由表是否形成了等价负载均衡
R1#show ip route
......
134.56.0.0/16 is variably subnetted, 3 subnets, 2 masks
O IA 134.56.78.36/30 [110/11] via 123.45.67.6, 00:18:10, Ethernet1/0
O IA 134.56.78.40/30 [110/20] via 123.45.67.18, 00:10:03, Ethernet2/0
O IA 134.56.78.48/29 [110/21] via 123.45.67.6, 00:01:15, Ethernet1/0
R1#
发现134.56.78.48并没有形成等价的负载均衡、从R3和R5通告过来的路由信息来看、R3去往134.56.78.48和R5去往134.56.78.48的开销是一样的都是20(R3、R5、R1都是区域0,所以ABR通告的信息整个区域0的所有的路由器都可以收到、而且他里面的Metric值都是通告者到目标的距离),所以R1去往(R3或是R5)对应的Cost应该要再加上10(默认10M的接口开销是10)所以R1去往134.56.78.48的开销应该是30,而上面路由表却显示是21,因此说明E1/0上应该是有手动配置了开销值,导致没有办法形成等价负载均衡。
问题7. R1的E1/0被手动配置了cost值
R1# show run interface e1/0
Building configuration...
Current configuration : 110 bytes
!
interface Ethernet1/0
no shutdown
ip address 123.45.67.5 255.255.255.252
ip ospf cost 1
mpls ip
end
R1# conf t
R1(config)# int e1/0
R1(config-if)# no ip ospf cost 1
再次验证
R1#show ip route
......
O IA 134.56.78.48/29 [110/30] via 123.45.67.18, 00:54:21, Ethernet2/0
[110/30] via 123.45.67.6, 00:54:21, Ethernet1/0
形成了等价负载均衡
R1#show ip ospf database summary 134.56.78.48
OSPF Router with ID (123.1.1.1) (Process ID 12345)
Summary Net Link States (Area 0)
LS age: 707
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 134.56.78.48 (summary Network Number)
Advertising Router: 123.3.3.3
LS Seq Number: 80000003
Checksum: 0xD695
Length: 28
Network Mask: /29
MTID: 0 Metric: 20
LS age: 470
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 134.56.78.48 (summary Network Number)
Advertising Router: 123.5.5.5
LS Seq Number: 80000006
Checksum: 0xA6BC
Length: 28
Network Mask: /29
MTID: 0 Metric: 20
R1#show ip route 134.56.78.48
Routing entry for 134.56.78.48/29
Known via "ospf 12345", distance 110, metric 30, type inter area
Last update from 123.45.67.6 on Ethernet1/0, 00:55:36 ago
Routing Descriptor Blocks:
* 123.45.67.18, from 123.5.5.5, 00:55:36 ago, via Ethernet2/0
Route metric is 30, traffic share count is 1
123.45.67.6, from 123.3.3.3, 00:55:36 ago, via Ethernet1/0
Route metric is 30, traffic share count is 1
R1#
实验排错完成。
标签:CCIE,07,show,0.0,ospf,router,134.56,OSPF,ID From: https://blog.csdn.net/Linux7985/article/details/137211130