CCNP ENCOR reference
BGP Peering & Best-Path Quick Reference
eBGP session establishment and the best-path selection order tested in ENCOR objectives 3.9–3.10.
Session establishment
BGP neighbors are explicitly, manually configured — never discovered dynamically. State machine: Idle → Connect → Active → OpenSent → OpenConfirm → Established. Only Established sessions exchange real routing updates.
A session stuck at Active with confirmed IP reachability to the peer usually means an AS number mismatch — check 'neighbor ... remote-as' against the peer's actual AS first.
Directly connected eBGP defaults to TTL 1; a peer more than one hop away needs explicit 'ebgp-multihop' configuration.
Best-path selection (simplified, in order)
1. Highest local preference (intra-AS only, not advertised to eBGP peers). 2. Shortest AS-path. 3. Lowest origin type. 4. Lowest MED (comparing routes from the same neighboring AS — and only a suggestion, not binding on the receiver). 5. Prefer eBGP over iBGP. 6. Lowest IGP metric to next hop.
Evaluation stops at the first criterion that produces a clear winner — a tie moves to the next criterion, nothing more.
Local preference vs. MED
| Local preference | MED | |
|---|---|---|
| Scope | Within one AS (iBGP) | Between two ASes (eBGP) |
| Purpose | Prefer one exit path over another | Suggest a preferred entry point to a neighbor |
| Binding on receiver? | N/A — local policy | No — the neighboring AS isn't obligated to honor it |
| Evaluated | Early in best-path selection | Later, only when comparing routes from the same neighbor AS |