课题内容: 双点双向重分布中的一个疑难故障

知识点: OSPF转发地址对自治系统外部路由的影响

拓扑:

CCNP实战 双点双向重分布中的一个疑难故障_第1张图片

按图配置IP地址  (配置省略)


配置动态路由协议

其中R3的环回口 10.1.1.3/32宣告进入EIGRP 90

R3(config)#router eigrp 90
R3(config-router)#network 0.0.0.0


R1(config)#router eigrp 90
R1(config-router)#network 10.1.134.0 0.0.0.255


R4(config)#router eigrp 90
R4(config-router)#network 10.1.134.0 0.0.0.255


R1(config)#interface s1/0
R1(config-if)#ip ospf 110 area 0

R1(config)#interface e0/2   //注意,这里由于操作失误,将自治系统外部的接口宣告进入了OSPF //
R1(config-if)#ip ospf 110 area 0  


R4(config)#interface s1/1
R4(config-if)#ip ospf 110 area 0


R2(config)#interface s1/0
R2(config-if)#ip ospf 110 area 0
R2(config-if)#interface s1/1
R2(config-if)#ip ospf 110 area 0

R2(config)#interface loopback 0
R2(config-if)#ip ospf 110 area 0


执行双点双向重分布

R1、R4

router eigrp 90
  redistribute ospf 110 metric 1544 2000 255 1 1500

router ospf 110
  redistribute eigrp 90 subnets


验证效果:

R3#show ip route eigrp | begin Gateway
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 6 subnets, 3 masks
D EX     10.1.1.2/32 [170/2195456] via 10.1.134.4, 00:00:25, Ethernet0/2
                      [170/2195456] via 10.1.134.1, 00:00:25, Ethernet0/2


R2#show ip route ospf | begin Gateway
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 7 subnets, 3 masks
O E2     10.1.1.3/32 [110/20] via 10.1.24.1, 00:00:51, Serial1/1
O        10.1.134.0/24 [110/74] via 10.1.12.1, 00:03:27, Serial1/0


R3上的EIGRP路由表中,往R2环回口的路由出现了负载均衡,显然是管理员意向中的;

但是R2的OSPF路由表中,去往EIGRP自治系统的路由,却不是负载均衡的;


通常的故障排查思路如下:

R2#show ip ospf neighbor    //检查邻居是否正常

 

Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.1.4          0   FULL/  -        00:00:35    10.1.24.1       Serial1/1
10.1.1.1          0   FULL/  -        00:00:37    10.1.12.1       Serial1/0


R2#show ip ospf database   //检查链路状态数据库

            OSPF Router with ID (10.1.1.2) (Process ID 110)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
10.1.1.1        10.1.1.1        312         0x80000004 0x003F60 3
10.1.1.2        10.1.1.2        363         0x80000003 0x007DBB 5
10.1.1.4        10.1.1.4        283         0x80000003 0x00B07D 2

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
10.1.1.3        10.1.1.1        312         0x80000001 0x003AB5 0
10.1.1.3        10.1.1.4        282         0x80000001 0x00AED2 0
10.1.134.0      10.1.1.4        282         0x80000001 0x0010EE 0

五类LSA的位置出现了蹊跷,关于 10.1.134.0的外部前缀,本应该由R1和R4都产生,但是现在R1却没有产生,去检查R1的情况


R1#show ip ospf database external self-originate

            OSPF Router with ID (10.1.1.1) (Process ID 110)

                Type-5 AS External Link States

  LS age: 492
   Options: (No TOS-capability, DC, Upward)
   LS Type: AS External Link
   Link State ID: 10.1.1.3 (External Network Number )
   Advertising Router: 10.1.1.1
   LS Seq Number: 80000001
   Checksum: 0x3AB5
   Length: 36
   Network Mask: /32
         Metric Type: 2 (Larger than any link state path)
         MTID: 0
         Metric: 20
         Forward Address: 10.1.134.3
         External Route Tag: 0

//R1仅仅产生了一条五类LSA,并且携带了转发地址 10.1.134.3 //


根据OSPF外部路由转发地址规则,做如下检查:

R1#show ip ospf interface brief
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Et0/2        110   0               10.1.134.1/24      10    DR    0/0
Se1/0        110   0               10.1.12.1/30       64    P2P   1/1

// 果然,R1的 e0/2 接口被宣告进入了OSPF //


R1#show ip ospf interface e0/2
Ethernet0/2 is up, line protocol is up
   Internet Address 10.1.134.1/24, Area 0, Attached via Interface Enable
   Process ID 110, Router ID 10.1.1.1, Network Type BROADCAST, Cost: 10

// 检查显示,该接口通过接口下命令使能了OSPF (当然,现网中,这种情况更多的会出现在通配符掩码计算错误的场景中)//


排除故障:

R1(config)#interface e0/2
R1(config-if)#no ip ospf 110 area 0


R2#show ip route ospf | begin Gateway
Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 7 subnets, 3 masks
O E2     10.1.1.3/32 [110/20] via 10.1.24.1, 00:17:20, Serial1/1
                      [110/20] via 10.1.12.1, 00:00:21, Serial1/0
O E2     10.1.134.0/24 [110/20] via 10.1.24.1, 00:00:21, Serial1/1
                        [110/20] via 10.1.12.1, 00:00:21, Serial1/0

  问题解决。


感谢大家,我是达叔。