BGP Implementation and Troubleshooting (Neighbors, Attributes, Path Selection, Route Reflectors, Confederations)
What this domain tests
BGP Implementation and Troubleshooting tests neighbor establishment, attribute manipulation, the deterministic best-path algorithm, and the scaling mechanisms that replace a full iBGP mesh: route reflectors and confederations. You must be able to read a show command output and explain why one path won.
Neighbor formation
- States: Idle, Connect, Active, OpenSent, OpenConfirm, Established. Active means the router is retrying TCP; it is not a failure by itself.
- eBGP packets use TTL 1 by default; use
ebgp-multihopandupdate-source Loopback0when peering over multiple hops. iBGP also needsupdate-source. - iBGP split horizon prevents an iBGP-learned route from being sent to another iBGP peer. Fix it with a full mesh, route reflectors, or confederations.
next-hop-selfis required when the next-hop IP of an eBGP route is not reachable inside the AS.
Attributes and best-path order
Cisco compares, in order: weight (local, higher wins), local preference (default 100, higher), locally originated, shortest AS-path, lowest origin (IGP < EGP < incomplete), lowest MED, eBGP over iBGP, lowest IGP metric to next hop, oldest eBGP route, lowest router ID, shortest cluster list, lowest neighbor address. MED is compared only between paths from the same neighbor AS unless bgp always-compare-med is configured. Local preference is not transitive across eBGP.
Route reflectors
neighbor x route-reflector-client; usebgp cluster-idwhen multiple RRs share a cluster.- A route from a client is reflected to clients and non-clients; a route from a non-client is reflected only to clients; eBGP routes go to all.
- Loop prevention uses originator-id and cluster-list.
Confederations
bgp confederation identifier 65000andbgp confederation peers 65001 65002. Inside a sub-AS it is iBGP; between sub-ASes it is eBGP-like but local preference, MED, and next hop are preserved.- Confederation AS-path segments are removed when the route leaves the confederation.
Worked example
R1 receives 203.0.113.0/24 from peer A (AS 65100, AS-path 65100 65200, MED 50) and peer B (AS 65101, AS-path 65101, MED 10). Both have local preference 100. B wins first on AS-path length (1 vs 2), so MED is never reached. If A were set local-preference 200, A would win before AS-path comparison. If both AS paths had length 1 but came from different neighbor ASes, the MEDs would be ignored by default.
Traps
- Weight is local and never advertised.
- Local preference is not sent over eBGP.
- An RR does not reflect a non-client route to another non-client.
- A reflected route with the local cluster ID in its cluster-list is dropped.
- MED from different neighbor ASes is ignored unless always-compare-med is set.