Sometimes prefixes in BGP do not get installed into the routing table, if the route is also in an IGP that might be a reason but then a RIB-failure would be indicated. This scenario shows another possible source of problems. Once again, the topology is this.

All internal routers are running iBGP in a full mesh. Routers R4 and R6 have eBGP peerings to the backbone routers which are injecting external prefixes into the AS. All internal routers are announcing their loopbacks into BGP. SW3 is trying to reach 119.0.0.1 in the prefix 119.0.0.0/8 but is unable to do so, lets look at some output.

Rack1SW3#ping 119.0.0.1 so lo0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 119.0.0.1, timeout is 2 seconds:
Packet sent with a source address of 150.1.9.9
…..
Success rate is 0 percent (0/5)

SW3 can’t reach 119.0.0.1, why?

Rack1SW3#sh ip route 119.0.0.0
% Network not in table

We have no route there, what routes can we see from BGP?

Rack1SW3#sh ip route bgp
     150.1.0.0/24 is subnetted, 10 subnets
B       150.1.7.0 [200/0] via 155.1.79.7, 01:26:58
B       150.1.6.0 [200/0] via 155.1.67.6, 01:26:58
B       150.1.5.0 [200/0] via 155.1.45.5, 01:26:58
B       150.1.4.0 [200/0] via 155.1.146.4, 01:26:58
B       150.1.3.0 [200/0] via 155.1.37.3, 01:26:58
B       150.1.2.0 [200/0] via 155.1.23.2, 01:26:58
B       150.1.1.0 [200/0] via 155.1.146.1, 01:26:58
B       150.1.10.0 [200/0] via 155.1.108.10, 01:26:45
B       150.1.8.0 [200/0] via 155.1.58.8, 01:26:45

We can see all the loopbacks just fine but we have no route to the external prefixes. What is R6 announcing to us?

Rack1SW3# sh ip bgp nei 155.1.67.6 routes
BGP table version is 11, local router ID is 150.1.9.9
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
              r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete
   Network          Next Hop            Metric LocPrf Weight Path
* i28.119.16.0/24   54.1.1.254               0    100      0 54 i
* i28.119.17.0/24   54.1.1.254               0    100      0 54 i
* i112.0.0.0            54.1.1.254               0    100      0 54 50 60 i
* i113.0.0.0            54.1.1.254               0    100      0 54 50 60 i
* i114.0.0.0            54.1.1.254               0    100      0 54 i
* i115.0.0.0            54.1.1.254               0    100      0 54 i
* i116.0.0.0            54.1.1.254               0    100      0 54 i
* i117.0.0.0            54.1.1.254               0    100      0 54 i
* i118.0.0.0            54.1.1.254               0    100      0 54 i
* i119.0.0.0            54.1.1.254               0    100      0 54 i
*150.1.6.0/24        155.1.67.6               0    100       0 i
Total number of prefixes 11

R6 is announcing the external prefixes to us but what do we have in our BGP table? Output has been abbreviated.

Rack1SW3#sh ip bgp
BGP table version is 11, local router ID is 150.1.9.9
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
              r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete
   Network          Next Hop            Metric LocPrf Weight Path
* i119.0.0.0        204.12.1.254             0    100      0 54 i
* i                         54.1.1.254               0    100      0 54 i

So we do have 119.0.0.0/8 via 204.12.1.254 and 54.1.1.254 but how do we get to the next-hops, remember that route recursion will occur and that the first rule of the BGP best path is that we must have a valid next-hop. We can see that the route is valid but not best.

Rack1SW3#sh ip route 54.1.1.254
% Network not in table

We have an invalid next-hop, so that is why the route is not being installed, lets fix this.

Rack1R6(config)#router eigrp 100
Rack1R6(config-router)#network 54.1.1.0 0.0.0.255
Rack1R4(config)#router eigrp 100
Rack1R4(config-router)#network 204.12.1.0 0.0.0.255

That should take care of the next-hops, lets check the routing table.

Rack1SW3#sh ip route 54.1.1.254
Routing entry for 54.1.1.0/24
  Known via “eigrp 100”, distance 90, metric 2174976, type internal
  Redistributing via eigrp 100
  Last update from 155.1.79.7 on Vlan79, 00:02:04 ago
  Routing Descriptor Blocks:
  * 155.1.79.7, from 155.1.79.7, 00:02:04 ago, via Vlan79
      Route metric is 2174976, traffic share count is 1
      Total delay is 20200 microseconds, minimum bandwidth is 1544 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 2

We now have a route for the next-hop. Lets look at the BGP table again.

Rack1SW3#sh ip bgp
BGP table version is 31, local router ID is 150.1.9.9
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
              r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete
   Network          Next Hop            Metric LocPrf Weight Path
*i119.0.0.0        204.12.1.254             0    100      0 54 i
* i                      54.1.1.254                 0    100      0 54 i

So the path is now have a best path, is it in the routing table?

Rack1SW3#sh ip route bgp
B    119.0.0.0/8 [200/0] via 204.12.1.254, 00:02:27

Route is installed, we should be good to go.

Rack1SW3#ping 119.0.0.1 so lo0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 119.0.0.1, timeout is 2 seconds:
Packet sent with a source address of 150.1.9.9
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/37/84 ms

Success. Always remember to have a valid next-hop in BGP. Next-hops are modified over eBGP peerings but not over iBGP. To resolve this kind of problem either redistribute connected interface to the external peer into IGP or use next-hop-self on iBGP peerings. A route-map can also be used to achieve the same thing. I hope this post has showed you how to do BGP troubleshooting step by step.

BGP troubleshooting – route not installed
Tagged on:         

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: