Course contents

Module 6: Troubleshooting and PracticeLesson 6.3 (3 of 6 in this module)40 of 43 in the BGP course

Troubleshooting route advertisement

The session is Established and the route is still missing. That is a different problem from a session that will not come up, and it has a different list of causes. Follow the route hop by hop: is it originated, advertised, received, valid, best, installed?

Advanced · 14 min read

You'll learn to trace a missing BGP route through originate, advertise, receive and install, and name the cause for each place it can be lost.

Trace the route, one place at a time

A BGP route can be lost at six places between the router that owns it and the router where you expect it. Work along that path from the source. The mistake to avoid is staring at the receiver, because the route may never have left the sender.

Six places a route can be lost
Six places a route can be lostFrom the originating router to the routing table of the receiver.OriginatedIn the senderBGP table?AdvertisedSent to theneighbour?ReceivedArrived, orfiltered?ValidNext hopreachable?BestChosen overother paths?InstalledIn the routingtable?

On small screens, swipe sideways or focus the diagram and use the arrow keys.

At each stage there is one show command that answers the question.
Which command answers which question
Which command answers which questionOne command per stage.Originatedshow ip bgp(on the sender)Advertisedshow ip bgp neighbors Xadvertised-routes (sender)Receivedshow ip bgp neighbors Xroutes (receiver)Valid and bestshow ip bgp prefix(receiver)Installedshow ip route prefix(receiver)

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Run them in this order on the two routers involved.

Stage 1: the route is never originated

If the prefix is not in the sender BGP table, nothing downstream can find it. The usual cause is the network statement rule: the prefix and mask must exactly match a route in the routing table. A /23 in the routing table and a network for the /24 inside it originates nothing. The originating routes lesson covers this and the other ways a route enters BGP.

Illustrative Cisco IOS XE output written for this lesson, not a router capture
R1#show ip bgp 198.51.100.0/24
% Network not in table
BGP has nothing for this prefix. Check show ip route 198.51.100.0 255.255.255.0 next. If the routing table does not have the exact prefix, create it (for example a static route to Null0) or correct the statement.

Summaries have the same shape of fault. An aggregate-address exists only while at least one more-specific route is in the BGP table. If all contributors were only in the routing table, the aggregate never appears.

Stage 2: advertised, or filtered on the way out

A route is in the table but the neighbour never hears about it. Check what is actually sent, then look at outbound policy: a prefix list, a route map, an AS-path filter, a no-export community. Each of these can drop it, and each needs a soft reset after a change.

show ip bgp neighbors 192.0.2.1 advertised-routes show ip bgp 198.51.100.0/24 show ip bgp neighbors 192.0.2.1 | include policy|filter|route-map

R1. The first command lists what is sent after outbound policy. In the second, the line Advertised to update-groups shows who receives the prefix. The third lists the policies attached to the neighbour.

Stage 3: iBGP split horizon

A router does not pass a route it learned from an iBGP peer to another iBGP peer. This stops loops inside the AS, because iBGP does not add to the AS path, but it means every iBGP router must hear the route directly from the router that learned it, or from a route reflector.

iBGP split horizon: the route stops at R2
iBGP split horizon: the route stops at R2R1 learns 203.0.113.0/24 from ISP A over eBGP and passes it to R2 over iBGP. R2 learned it from an iBGP peer, so it does not pass it to R3. R3 never hears the route. Fixes are a direct iBGP session from R1 to R3 for a full mesh, or a route reflector.ISP AAS 64501R1AS 64500R2AS 64500R3AS 64500eBGPiBGPnot sentR1 has the routelearned from eBGPR2 has it toolearned from iBGPR3 has nothingno path to 203.0.113.0/24Fix: iBGP full mesh (R1 to R3) or a route reflector at R2R2 can also be made a client of a reflector that passes the route on.

On small screens, swipe sideways or focus the diagram and use the arrow keys.

A router advertises iBGP-learned routes only to eBGP neighbours. This rule prevents loops inside an AS, because iBGP does not add to the AS path.
Two fixes for split horizon
Two fixes for split horizonFull mesh or reflector.Full meshEvery router peerswith every othern(n-1)/2 sessionsRoute reflectorClients peer withone reflectorthat passes routes onor

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Full mesh grows with the square of the number of routers. A reflector keeps the session count linear.

Stage 4: the next hop is unreachable

The route arrives but there is no asterisk. The router received it, the next hop in it is not reachable, and so the path is not valid. Across an iBGP session the next hop is not changed, so a path from an eBGP neighbour usually carries a next hop on an external link that the internal routers do not know about.

NEXT_HOP: eBGP changes it, iBGP does not
NEXT_HOP: eBGP changes it, iBGP does notISP A advertises 203.0.113.0/24 to R1 over eBGP with next hop 192.0.2.1. R1 passes it to R2 over iBGP and by default leaves the next hop at 192.0.2.1, which R2 cannot reach. With next-hop-self, R1 sets the next hop to its own loopback 10.255.0.1.ISP AAS 64501R1AS 64500R2AS 64500eBGPiBGPNEXT_HOP 192.0.2.1set by ISP ADefault iBGP: NEXT_HOP stays 192.0.2.1R2 has no route to it, path not validWith next-hop-self on R1NEXT_HOP 10.255.0.1, R2 can reach itFix on R1: neighbor 10.255.0.2 next-hop-self

On small screens, swipe sideways or focus the diagram and use the arrow keys.

The next hop is the address the router forwards packets to. A path whose next hop is unreachable is not valid, so it is never chosen as best.
Illustrative Cisco IOS XE output written for this lesson, not a router capture
R2#show ip bgp 203.0.113.0
BGP routing table entry for 203.0.113.0/24, version 1
Paths: (1 available, no best path)
  Not advertised to any peer
  64501
    192.0.2.1 (inaccessible) from 10.255.0.1 (10.255.0.1)
      Origin IGP, metric 0, localpref 100, valid, internal
(inaccessible) and no best path are the signs. The route exists, but R2 has no route to 192.0.2.1. Add neighbor 10.255.0.2 next-hop-self on R1, or advertise the external link in the IGP.

Stage 5 and 6: chosen as best, but not installed

If the path is valid and best but the routing table shows something else, look for an RIB failure, marked r in the BGP table. BGP offered the route and the routing table refused it, because another source has a route to the same prefix with a lower administrative distance. An OSPF route (distance 110) beats an iBGP route (distance 200), so the iBGP copy of a prefix that OSPF also carries is rejected. An eBGP route (distance 20) beats OSPF.

Illustrative Cisco IOS XE output written for this lesson, not a router capture
R2#show ip bgp
     Network          Next Hop            Metric LocPrf Weight Path
 r>i 198.51.101.0     10.255.0.1               0    100      0 i
The r marks the RIB failure. Run show ip bgp rib-failure to list the routes and the reason. Remove or lower the competing route, or change the distance of the BGP route, if you want BGP to win.
Administrative distances in the contest
Administrative distances in the contestLower wins when two sources offer the same prefix.eBGP: 20Wins over most IGPsOSPF: 110Beats iBGP for the same prefixiBGP: 200Loses to every IGPunless you change it

On small screens, swipe sideways or focus the diagram and use the arrow keys.

The default values on Cisco IOS XE.

Technical reference: Cisco, BGP best path selection algorithm. Output above is illustrative.

Check your understanding

Predict · scenario 1

R1 hears a route from ISP A over eBGP and passes it to R2 over iBGP. R2 does not send it to R3, another iBGP peer. Why?

Predict · scenario 2

show ip bgp lists a path without an asterisk and with (inaccessible) after the next hop. What should you check?

Predict · scenario 3

A route is marked r> in the BGP table. What happened?

FAQ

What does the r in show ip bgp mean?
r marks a RIB failure: BGP chose the path as best but the routing table did not install it, usually because another protocol has a route to the same prefix with a lower administrative distance.
Why is a route in the BGP table but without an asterisk?
No asterisk means the path is not valid, almost always because its next hop is not reachable. Fix the next hop and the flag appears.
Why does an iBGP router not pass a route to another iBGP router?
iBGP split horizon: a route learned from an iBGP neighbour is not advertised to other iBGP neighbours. Use a full mesh or a route reflector.