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.
Transport, session, distribution, policy and VPN, with the command that tests each.
- 1 TransportTCP, TTL, BFDshow ip bgp neighbors X
- 2 SessionState and prefix countshow ip bgp summary
- 3 DistributionReflectors, cluster listshow ip bgp prefix
- 4 PolicyCommunities, filters, RPKIadvertised and received routes
- 5 VPNRD and route targetsshow bgp vpnv4 unicast all
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.
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.
- ConnectTCP starts
- ActiveTCP retry
- OpenSentOPEN sent
- OpenConfirmOPEN agreed
- Establishedprefix count
| State shown | How far it got | Check first |
|---|---|---|
| Idle | Not 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 timer | show ip route to the neighbour address, then read the text after Idle: (Admin) or (PfxCt) |
| Connect | The TCP handshake to port 179 has started and has not finished | Reachability, and any filter on TCP 179 between the two update sources |
| Active | The last TCP attempt failed, and the router is trying again | Update source, TTL, authentication, and whether the other side has a neighbour statement for this router |
| OpenSent | TCP is up and this router has sent its OPEN message; no acceptable OPEN has come back | The log for a NOTIFICATION, such as a wrong remote AS |
| OpenConfirm | Both OPEN messages are accepted and the router waits for the first KEEPALIVE | The log. A session that stays here is rare, so look for a path that drops packets after the first exchange |
| A number | Established. The number is the count of prefixes received | A zero or a low count points at policy at either end (layer 4) |
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.
| Fault | What you see | Check | Fix |
|---|---|---|---|
| One reflector hears too little | Works until the other reflector fails | show ip bgp summary on each reflector: is every client there? | Peer every client with both reflectors |
| Cluster IDs differ by accident | Two copies with different cluster lists | show ip bgp prefix: Cluster list | Set one bgp cluster-id on both if one cluster is intended |
| Confederation mismatch | Session stays Active, or the AS path lacks the sub-AS | show ip bgp summary and the AS path segments | Match identifier and peers on each side |
| Paths not equal | Only one next hop is installed | show ip route prefix, then compare the attributes | Make attributes equal and set maximum-paths |
| Prefix limit passed | Idle (PfxCt) | show ip bgp summary and show logging | Find the cause, then clear the session |
| TTL security on one end | Active, with no TCP connection | show ip bgp neighbors X: the TTL lines | Enable ttl-security on both ends |
| BFD too aggressive | The session flaps under load | show logging: BFD adjacency down | Lengthen the interval or the multiplier |
| Route target mismatch | Route in the VPNv4 table, missing from the VRF | show bgp vpnv4 unicast all, then the VRF import list | Match an export route target to an import route target |
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.
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
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.
R1 peers with RR1 only. RR1 reflects to C1. RR2 receives nothing it will accept.
- R1 to RR1session up,routes sent
- RR1 reflectsadds clusterID 9.9.9.9
- RR2 hears itown cluster IDin the list
- RR2 drops itno copy kept
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.
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
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.
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.1R1. 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.
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
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
| Attribute | Via 192.0.2.1 | Via 192.0.2.5 | Equal? |
|---|---|---|---|
| Weight | 0 | 0 | Yes |
| Local preference | 100 | 100 | Yes |
| AS path length | 1 (64501) | 1 (64501) | Yes |
| Origin | IGP | IGP | Yes |
| MED | 50 | 100 | No |
| Neighbouring AS | 64501 | 64501 | Yes |
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 inR1. 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.
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
How uneven the split looks depends mostly on how many flows share the links, as the table shows for the simplest case.
| Concurrent flows | Busier link, average share | Chance the busier link holds 60 percent or more |
|---|---|---|
| 4 | 68.8 percent | 62.5 percent |
| 10 | 62.3 percent | 75.4 percent |
| 20 | 58.8 percent | 50.3 percent |
| 50 | 55.6 percent | 20.3 percent |
| 100 | 54.0 percent | 5.7 percent |
| 1,000 | 51.3 percent | under 0.01 percent |
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.
PE1 exports with route target 64500:1. PE2 imports route target 64500:2, so the route is received but not placed in the VRF.
show bgp vpnv4 unicast all
show vrf detail CUST1
show ip route vrf CUST1PE2. 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.
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.
- 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
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
Two reflectors share a cluster ID, and a border router peers with only one of them. What is the risk?
A session shows Active with no messages after TTL security was enabled on one end. What is the likely cause?
A VPNv4 route is in the BGP table on PE2 but not in the VRF. Which is the first thing to compare?
show ip bgp summary shows Idle (Admin) next to one neighbour. What does that tell you?
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?
A neighbour stays in OpenSent. What is the best next step?
A session is Established but PfxRcd is 0 from a neighbour that should send routes. Which layer do you check next?
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?
R1 has ttl-security hops 1 on an eBGP neighbour. What is the lowest TTL it accepts from that neighbour?
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?