首页 > 其他分享 >CCIE-07-OSPF-TS

CCIE-07-OSPF-TS

时间:2024-04-05 10:30:49浏览次数:462  
标签:CCIE 07 show 0.0 ospf router 134.56 OSPF ID

目录

实验条件

网络拓朴

在这里插入图片描述

逻辑拓扑

在这里插入图片描述

实现目标

在这里插入图片描述

环境配置

在我的资源里可以下载(就在这篇文章的开头也可以下载)

开始Troubleshooting

整体排错的思路如下:

  1. 检查所有的直连口是否双UP
  2. 检查所有的IGP启动情况,邻居状态
  3. 根据输出,调整路由参数
    检查所有的直连接口都正常启动。
    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

相关文章

  • FL Studio 24.0.99.4077中文版Crack With Keygen {Latest 2024} Free Download
    FLStudio24.0.99.4077中文版是最新、最具影响力的音乐制作工具。它可以与所有类型的音乐一起工作,以产生伟大的音乐。它提供了一个相对简单且易于使用的集成开发环境(IDE)。这个完整的音乐工作站是由比利时公司ImageLine开发的。它的创新理念有助于初学者和专业人士创作、组织......
  • 全能数字音乐工作站(DAW)FL Studio 24.0.99.4077中文版
    期待下一个版本21.3的FLStudio用户可能会惊讶地看到引入了新的版本号。DAW,以前称为“FLStudio21”,显然将在其下一个即将发布的版本中更名为“FLStudio2024”(目前正在进行公开测试)。此前,此版本的测试版曾被公开称为“v21.3betax”,...但截至目前”v21.3测试版3“,I......
  • ctfshow web入门 php特性 web89--web107
    web89看到有intval函数这里建议先观看一篇博客好绕过https://blog.csdn.net/wangyuxiang946/article/details/131156104?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522171220387216800197044297%2522%252C%2522scm%2522%253A%252220140713.130102334…%2522%......
  • 初探STM32f407VET6
    一、买到了板子,自己分析引脚功能我在某宝上买到一块stm32f407vet6的板子,图便宜,结果遇上了个态度差的客服。没有说明,没有资料。不能退换,只能自己想办法分析引脚在嘉里创找到了芯片原理图(LQFP-100封装),想着看走线猜引脚,结果拿着放大镜找了许久没有进展。这板子上有许多过孔,走线......
  • P1077 [NOIP2012 普及组] 摆花
    题目:链接:https://www.luogu.com.cn/problem/P1077总的来说就是和上题差不多?记dp[i][j]为前i种花塞进了j的背包的种类,那么状态转移方程:就是:dp[i][j]=dp[i-1][j]+dp[i-1]j-k贴代码:#include<iostream>#include<vector>#include<algorithm>#include<math.h>#include<ss......
  • OSPF & Virtual Link
    syssysnR1intg0/0/0ipadd172.0.10.124ospf1router-id255.255.255.255area0net172.0.10.00.0.0.255syssysnR2intg0/0/0ipadd172.0.10.224intg0/0/1ipadd172.0.20.124ospf1router-id2.2.2.2area0network172.0.10.00.0.0.255area1......
  • L3-007 天梯地图
    拿起题就开始写,最后提交测试点2和测试点3就是过不去。感觉一点问题都没有,好郁闷,找了半天,发现地点的编号是0开始的,而我一直在从1遍历....思路就是两个dijkstra,这两次思路是完全一样的,只是一个是最短距离最少节点,一个是最短时间最短距离,所以分别需要增加一个累计经过节点数量和累......
  • 环境搭建 ubuntu22.04+gtx1070+cuda12.0+cudnn8.8.0+TensorRT8.6
    构建基础             cuda12.0的.deb包会强制安装所依赖的nvidia-525.60.13版本驱动,但是对于ubuntu22.04来说,linux内核为6.5.0,其与该nvidia驱动不兼容,会报错,所以要先安装所支持的驱动,然后再使用runfile进行安装cuda12.0。cuda与驱动版本对应可查如下官网:1.C......
  • idea从零到精通07之idea数据库管理,作为移动开发程序员
    作者简介引言导航热门专栏推荐视频讲解概述一、打开Database管理界面二、配置数据库连接三、在图形化界面操作四、在控制台查询五、在控制台执行操作六、数据导出方法1,直接在结果控制台导出方法2,在Database管理区中导出七、数据结果的多种展示......
  • P3622 [APIO2007] 动物园 -题解
    好写爱写没事干所以有了这篇题解洛谷P3622[APIO2007]动物园题解$Link$hzoi题库洛谷题目说的挺繁琐,其实就传达了一个很简单的信息:\(n\)个动物,\(c\)个小孩,每个小孩能看到\(5\)个动物(所在的位置)\(E\)到\(E+4\),有\(F\)个害怕的动物,\(L\)个喜欢的动物。如果视野中有至......