Course contents

Module 4: BGP Beyond IPv4 UnicastLesson 4.2 (2 of 3 in this module)13 of 14 in the Advanced BGP course

Troubleshooting advanced BGP

Advanced BGP features tend to fail quietly. The network works until a reflector goes down, or only some routes are missing, or a session fails to come up for a reason that looks like a normal fault. This lesson gives you a way to tell them apart.

Advanced · 20 min read

You'll learn to place a fault in the right layer, recognise the symptoms of redundant reflector, confederation, security, BFD and VPN faults, and name the command that confirms each.

Why advanced faults are harder to see

A basic BGP fault is loud: the session is down, or a prefix is missing, or traffic takes the wrong exit. Advanced features add redundancy, protection and new route families, and each of those can fail without any alarm. Two reflectors keep the network up while one is misconfigured. A security feature drops a packet and logs nothing. A VPN route is received and then ignored because a tag does not match.

The cure is to decide which layer the fault is in before you look at the feature. Every symptom belongs to one of five layers, and each layer has its own first command.

Diagram
Five layers, each with its own first check
Five layers, each with its own first check

Transport, session, distribution, policy and VPN, with the command that tests each.

  1. 1 TransportTCP, TTL, BFDshow ip bgp neighbors X
  2. 2 SessionState and prefix countshow ip bgp summary
  3. 3 DistributionReflectors, cluster listshow ip bgp prefix
  4. 4 PolicyCommunities, filters, RPKIadvertised and received routes
  5. 5 VPNRD and route targetsshow bgp vpnv4 unicast all
Start at the top. A fault in a lower layer cannot be fixed by changes in a higher one.

Read the session state first

The State/PfxRcd column of show ip bgp summary is the cheapest clue you have. A word in that column means the session is not established and shows how far it got. A number means the session is up, so the fault is in what the two routers exchange and you move on to layers 3 to 5.

Diagram
How far a session got
How far a session got

A session moves to Connect when the TCP handshake starts, to OpenSent once TCP is up and an OPEN message has gone out, to OpenConfirm when both OPEN messages are accepted, and to Established when the first KEEPALIVE arrives. Active is the retry state after a failed TCP attempt.

  1. ConnectTCP starts
  2. ActiveTCP retry
  3. OpenSentOPEN sent
  4. OpenConfirmOPEN agreed
  5. Establishedprefix count
The state that shows tells you which step failed. Active means the TCP step is failing and being repeated. Idle, where no attempt is made, is in the table below.
Diagram
What each BGP state tells you
What each BGP state tells you
State shownHow far it gotCheck first
IdleNot trying. There is no route to the neighbour address, the neighbour is shut down, a prefix limit closed the session, or the router is waiting out a retry timershow ip route to the neighbour address, then read the text after Idle: (Admin) or (PfxCt)
ConnectThe TCP handshake to port 179 has started and has not finishedReachability, and any filter on TCP 179 between the two update sources
ActiveThe last TCP attempt failed, and the router is trying againUpdate source, TTL, authentication, and whether the other side has a neighbour statement for this router
OpenSentTCP is up and this router has sent its OPEN message; no acceptable OPEN has come backThe log for a NOTIFICATION, such as a wrong remote AS
OpenConfirmBoth OPEN messages are accepted and the router waits for the first KEEPALIVEThe log. A session that stays here is rare, so look for a path that drops packets after the first exchange
A numberEstablished. The number is the count of prefixes receivedA zero or a low count points at policy at either end (layer 4)
A word means the session is not up. A number means it is, and the fault is in the routes.

Two words are easy to misread. Active does not mean working: it means the TCP attempt is failing and being repeated. Idle can be correct: it is the right state for a neighbour that was shut down on purpose. A session that cycles between Idle and Active or Connect is usually being closed by a NOTIFICATION and retried, and the log names the reason.

Eight faults and what they look like

This table groups the faults by what you see. Find the symptom, run the check, then apply the fix. The faults at the top are the ones that hide until something fails.

Diagram
Eight advanced BGP faults
Eight advanced BGP faults
FaultWhat you seeCheckFix
One reflector hears too littleWorks until the other reflector failsshow ip bgp summary on each reflector: is every client there?Peer every client with both reflectors
Cluster IDs differ by accidentTwo copies with different cluster listsshow ip bgp prefix: Cluster listSet one bgp cluster-id on both if one cluster is intended
Confederation mismatchSession stays Active, or the AS path lacks the sub-ASshow ip bgp summary and the AS path segmentsMatch identifier and peers on each side
Paths not equalOnly one next hop is installedshow ip route prefix, then compare the attributesMake attributes equal and set maximum-paths
Prefix limit passedIdle (PfxCt)show ip bgp summary and show loggingFind the cause, then clear the session
TTL security on one endActive, with no TCP connectionshow ip bgp neighbors X: the TTL linesEnable ttl-security on both ends
BFD too aggressiveThe session flaps under loadshow logging: BFD adjacency downLengthen the interval or the multiplier
Route target mismatchRoute in the VPNv4 table, missing from the VRFshow bgp vpnv4 unicast all, then the VRF import listMatch an export route target to an import route target
Faults 1 to 4 are about distribution, 5 to 7 about the session and transport, and 8 about the VPN.

Worked example: it works until RR1 fails

The company runs two reflectors with a shared cluster ID. Everything looked fine in testing, but during a maintenance window RR1 went down and C1 lost the ISP routes. The reflectors were working, and one of them was missing a client session. Start on the reflector that stayed up.

Example output written for this lesson, not a router capture
RR2#show ip bgp summary
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.255.0.1      4 64500       0       0        1    0    0 never    Active
10.255.0.11     4 64500      52      51        1    0    0 00:35:12        0
10.255.0.12     4 64500      51      51        1    0    0 00:35:10        0
The border router R1, 10.255.0.1, has not come up on RR2. R1 was configured to peer only with RR1. RR2 did not hear the ISP routes directly from R1, and it could not learn them from RR1 either: with a shared cluster ID, a route reflected by RR1 already carries the cluster ID, and RR2 drops it.

Two design choices met here. The shared cluster ID is correct only when every client peers with both reflectors, because the reflectors discard each other's copies. The fix is on R1, which needs a session to RR2 as well.

Diagram
Why RR2 had no routes
Why RR2 had no routes

R1 peers with RR1 only. RR1 reflects to C1. RR2 receives nothing it will accept.

  1. R1 to RR1session up,routes sent
  2. RR1 reflectsadds clusterID 9.9.9.9
  3. RR2 hears itown cluster IDin the list
  4. RR2 drops itno copy kept
A shared cluster ID makes the reflectors blind to each other.

Worked example: Active and not coming up

After a security review, the company enabled TTL security on R1 for the ISP A session. The session went down and stayed down.

Example output written for this lesson, not a router capture
R1#show ip bgp summary
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.0.2.1       4 64501       0       0        1    0    0 never    Active
Active with no messages sent or received means the TCP connection did not complete. The link is up, so check the other candidates: the update source, a filter and a TTL setting. Here the cause is that R1 now accepts only packets that arrive with a TTL of 254 or higher, and ISP A, which did not enable the feature, sends its replies with TTL 1.
Diagram
Why TTL security drops the reply
Why TTL security drops the reply

R1 has TTL security on and accepts only packets with a TTL of 254 or higher. ISP A has not enabled the feature and sends its packets with a TTL of 1, so R1 drops them on arrival and the TCP connection does not complete.

R1, TTL security onSends with TTL 255Accepts TTL 254 or higher
ISP A, feature offSends with TTL 1Dropped on arrival at R1
The drop is silent, so nothing in the log points at the cause.

The feature has to be enabled on both ends with the same hops value. R1 sends with TTL 255 and expects to receive near 255, so a neighbour that is not configured for it is silently rejected. Do not combine it with ebgp-multihop on the same neighbour, because the two features pull the TTL in opposite directions.

show ip bgp neighbors 192.0.2.1 | include TTL show logging | include 192.0.2.1

R1. The first command prints the TTL settings the router expects and uses for this neighbour. The second shows whether anything was logged for this neighbour, which a silent TTL drop will not have.

Worked example: two links, one carrying the traffic

R1 has two links to ISP A, with neighbours 192.0.2.1 and 192.0.2.5, and maximum-paths 2 is set under the IPv4 address family. Both sessions are Established and receive the same number of prefixes. The traffic graph still shows one link busy and the other almost idle. Start with what the routing table installed, because that is what forwards packets.

Example output written for this lesson, not a router capture
R1#show ip route 198.51.100.0
Routing entry for 198.51.100.0/24
  Known via "bgp 64500", distance 20, metric 50
  Tag 64501, type external
  Last update from 192.0.2.1 00:12:40 ago
  Routing Descriptor Blocks:
  * 192.0.2.1, from 192.0.2.1, 00:12:40 ago
      Route metric is 50, traffic share count is 1
One next hop is installed. The multipath setting is present, so BGP offered the routing table only one path. The reason is in the BGP table.
Example output written for this lesson, not a router capture
R1#show ip bgp 198.51.100.0
BGP routing table entry for 198.51.100.0/24, version 14
Paths: (2 available, best #1, table default)
  64501
    192.0.2.1 from 192.0.2.1 (192.0.2.1)
      Origin IGP, metric 50, localpref 100, valid, external, best
  64501
    192.0.2.5 from 192.0.2.5 (192.0.2.5)
      Origin IGP, metric 100, localpref 100, valid, external
Both paths are valid and both come from AS 64501, but they carry different MED values, 50 and 100. The lower MED made the first path best, and it also stops the second path from sharing the load.
Diagram
What multipath compares on these two paths
What multipath compares on these two paths
AttributeVia 192.0.2.1Via 192.0.2.5Equal?
Weight00Yes
Local preference100100Yes
AS path length1 (64501)1 (64501)Yes
OriginIGPIGPYes
MED50100No
Neighbouring AS6450164501Yes
One unequal attribute is enough. For iBGP paths, the IGP metric to each next hop is compared as well.

There are two ways to fix it. Ask ISP A to send the same MED on both links, or overwrite the MED on R1 with an inbound route map. Ask first, because a lower MED on one link may be the provider's way of saying which link it prefers, and the route map discards that preference.

route-map ISPA-IN permit 10 set metric 100 ! router bgp 64500 neighbor 192.0.2.1 route-map ISPA-IN in neighbor 192.0.2.5 route-map ISPA-IN in ! clear ip bgp 192.0.2.1 soft in clear ip bgp 192.0.2.5 soft in

R1. The route map sets the same MED on everything received from both neighbours. The soft clear re-applies the policy to the routes already received, without closing either session.

Example output written for this lesson, not a router capture
R1#show ip route 198.51.100.0
Routing entry for 198.51.100.0/24
  Known via "bgp 64500", distance 20, metric 100
  Tag 64501, type external
  Last update from 192.0.2.1 00:00:21 ago
  Routing Descriptor Blocks:
  * 192.0.2.1, from 192.0.2.1, 00:00:21 ago
      Route metric is 100, traffic share count is 1
    192.0.2.5, from 192.0.2.5, 00:00:21 ago
      Route metric is 100, traffic share count is 1
Both next hops are installed. Expect the two links to carry different amounts of traffic anyway: forwarding spreads flows across the two next hops, and a few large flows can land on the same link.

How uneven the split looks depends mostly on how many flows share the links, as the table shows for the simplest case.

Diagram
How evenly two equal links share flows (computed)
How evenly two equal links share flows (computed)
Concurrent flowsBusier link, average shareChance the busier link holds 60 percent or more
468.8 percent62.5 percent
1062.3 percent75.4 percent
2058.8 percent50.3 percent
5055.6 percent20.3 percent
10054.0 percent5.7 percent
1,00051.3 percentunder 0.01 percent
Computed exactly from the binomial distribution and checked against a simulation of 100,000 trials. Assumptions: every flow is the same size and each flow lands on a link by independent, even hashing. Real flows differ in size, so the real split is less even, and a platform that hashes on fewer fields is less even again.

Two links that look badly balanced at a quiet hour with a handful of flows can be a normal result. Judge the split at a busy hour, and judge it by traffic, not by the installed next hops.

Worked example: a VPN route that stays out of the VRF

A provider edge router PE1 exports the customer routes from VRF CUST1 into BGP. The other edge router, PE2, receives them over the VPNv4 session and shows them in show bgp vpnv4 unicast all, yet show ip route vrf CUST1 on PE2 does not list them. The session works. What is missing is the match between two tags.

Diagram
Route targets decide which VRF imports a route
Route targets decide which VRF imports a route

PE1 exports with route target 64500:1. PE2 imports route target 64500:2, so the route is received but not placed in the VRF.

PE1 exportsRT 64500:1from VRF CUST1
PE2 importsRT 64500:2into VRF CUST1
Route targets are the only filter between a VPNv4 route and a VRF. A mismatch is not an error, it is a route that no VRF wanted.
show bgp vpnv4 unicast all show vrf detail CUST1 show ip route vrf CUST1

PE2. The first command confirms the route arrived with its route target. The second shows the import and export route targets of the VRF so you can compare them. The third confirms what the VRF actually uses.

Compare the route target on the received route with the VRF's import list. If they differ, correct one side so that an export route target on one edge router equals an import route target on the other.

Where an expected route can disappear

When a route is missing in an advanced design, it left the path at one of five points. Match the symptom to a branch, run the command for that layer, and change nothing until you have seen the evidence.

Diagram
Five places an expected route can disappear
Five places an expected route can disappear

The session is not up, a reflector dropped the copy, a policy or validation result rejected it, selection kept only one path, or no VRF imported it.

Route missing
  • Sessionnot Establishedor closed bya prefix limit
  • Reflectioncluster list ororiginator IDdrops the copy
  • Policya filter oran RPKI resultrejects it
  • Selectionvalid but notbest, or notequal enough
  • VPN importno route targetmatches theVRF import list
Work from the session inward: the summary for state, the prefix detail for reflection and selection, received routes for policy, VRF detail for import.

Other checks worth knowing

Routes dropped as invalid by RPKI validation

If a validation policy rejects routes whose origin does not match a published authorisation, an unexpected missing route may be a validation result rather than a filter. Check that the router can reach the validator with show ip bgp rpki servers, and look up the prefix with show ip bgp rpki table. A route with the state not found is usually kept, an invalid route usually is not, depending on your policy.

The session flaps only at busy times

Look for BFD adjacency down in the log at the same times. Very short intervals can miss a packet when the router or the path is busy. Lengthen the multiplier first, then the interval, and test again under load.

Output above is an example written for this lesson. For exact command syntax and messages on your release, use the Cisco IOS XE configuration and command references.

Check what you learned

Predict · scenario 1

Two reflectors share a cluster ID, and a border router peers with only one of them. What is the risk?

Predict · scenario 2

A session shows Active with no messages after TTL security was enabled on one end. What is the likely cause?

Predict · scenario 3

A VPNv4 route is in the BGP table on PE2 but not in the VRF. Which is the first thing to compare?

Predict · scenario 4

show ip bgp summary shows Idle (Admin) next to one neighbour. What does that tell you?

Predict · scenario 5

Both ISP A links are Established and maximum-paths 2 is set, yet one next hop is installed. The paths differ only in MED, 50 and 100. What does that mean?

Predict · scenario 6

A neighbour stays in OpenSent. What is the best next step?

Predict · scenario 7

A session is Established but PfxRcd is 0 from a neighbour that should send routes. Which layer do you check next?

Predict · scenario 8

Ten flows share two equal links, and the router places each flow on a link by even hashing. Roughly how often does the busier link carry 60 percent or more of the flows?

Predict · scenario 9

R1 has ttl-security hops 1 on an eBGP neighbour. What is the lowest TTL it accepts from that neighbour?

Predict · scenario 10

Two eBGP paths from AS 64501 tie on weight, local preference, AS path length, origin and MED. They come from neighbours with different router IDs. Does maximum-paths 2 install both?

FAQ

Why do redundant designs hide faults?
A second path or second reflector keeps the network working while the first one is broken. The fault shows only when the working half fails, so it is worth testing each half on its own.
A session stays in Active. Is the cause the TCP connection?
Active means the router is trying to open the TCP connection and has not completed it. Reachability, the update source, a filter, a TTL mismatch and a missing neighbour configuration on the other side all look the same from here, so check them in that order.
Where do I look when a VPN route is in the BGP table but not in the VRF?
At the route targets. The route is accepted into the VPNv4 table by the session, but it enters a VRF only if one of the route targets it carries matches the VRF's import list.