Cisco CCNP Enterprise (ENCOR 350-401) · lesson 4 of 12 · 35 min
What is BGP and Why Does It Matter?
BGP (Border Gateway Protocol) is the routing protocol that runs the internet. Every autonomous system (AS) — every ISP, cloud provider, enterprise with public IP space — uses BGP to exchange reachability information. Unlike OSPF or EIGRP which optimize for the fastest path, BGP optimizes for policy : which paths are acceptable, which are preferred, and which should be avoided based on business relationships. For the CCNP ENCOR exam, you need to understand BGP at a deep level: how sessions form, how routes are selected, how attributes influence path selection, and how to apply policy with route-maps and prefix-lists. OSPF is like GPS — it finds the fastest route automatically. BGP is like a corporate travel policy — it might route you through a preferred airline partner even if a competitor is faster, because of business agreements. Policy, not just speed, drives the decision.
Autonomous Systems and AS Numbers
eBGP vs iBGP
iBGP split horizon rule is critical: a route learned from one iBGP peer is NOT advertised to another iBGP peer. This requires either a full mesh of iBGP sessions, Route Reflectors, or Confederations to propagate routes through the AS.
BGP Session Formation
BGP uses TCP port 179 for all sessions. Unlike OSPF/EIGRP which discover neighbors automatically, BGP neighbors must be manually configured . The session goes through these states: BGP Message Types OPEN — establishes session, negotiates parameters (AS number, hold time, BGP ID). UPDATE — advertises new routes or withdraws old ones. KEEPALIVE — maintains session (sent every 1/3 of hold time, default 60s). NOTIFICATION — reports errors and closes session.
BGP Configuration Fundamentals
The
next-hop-self
command is essential on eBGP-facing routers that also have iBGP peers. Without it, iBGP peers receive routes with a next-hop that only the edge router can reach — they can’t install the route.
Route Reflectors: Solving iBGP Full Mesh
A full iBGP mesh requires n(n-1)/2 sessions. With 10 routers that’s 45 sessions; with 100 routers it’s 4,950. Route Reflectors (RR) solve this by relaxing the iBGP split-horizon rule — an RR can re-advertise iBGP routes to other iBGP peers.
Flashcard Drill
eBGP AD 20 — lower than iBGP (200) and most IGPs, so eBGP routes are preferred when multiple sources exist. iBGP AD 200 — highest AD of any dynamic routing protocol. iBGP routes are only used when no IGP or eBGP route exists. iBGP split horizon Routes learned from one iBGP peer are NOT re-advertised to other iBGP peers — requires full mesh, RR, or confederation. next-hop-self Forces the advertising router to set itself as the next-hop when sending routes to iBGP peers — fixes unreachable next-hop. BGP TCP port 179 — BGP uses TCP for reliable, ordered session establishment. Active state (BGP) BGP is retrying TCP connection — session is NOT up. Confusingly named — Active is a problem state. Route Reflector Relaxes iBGP split horizon — re-advertises iBGP routes to clients. Eliminates need for full iBGP mesh. AS_PATH loop prevention If a router receives a BGP route with its own AS in the AS_PATH, it rejects the route — prevents routing loops. ebgp-multihop Allows eBGP session to form across multiple hops (TTL > 1). Required when peers are not directly connected. Private ASNs 64512–65535 (16-bit). Used internally and stripped before advertising to the internet.
Knowledge Check — 12 Questions
BGP Fundamentals: eBGP, iBGP, Sessions
What TCP port does BGP use?
- 23
- 80
- 179
- 443
Answer: 179
BGP uses TCP port 179 for all session establishment and route exchange.
What is the administrative distance of an eBGP route?
- 20
- 90
- 110
- 200
Answer: 20
eBGP has AD 20 — lower than most IGPs, so eBGP routes are preferred. iBGP has AD 200.
Why is next-hop-self needed on eBGP-facing routers with iBGP peers?
- To increase BGP metric
- Because iBGP peers can’t reach the eBGP next-hop address
- To prevent AS_PATH loops
- To enable route reflection
Answer: Because iBGP peers can’t reach the eBGP next-hop address
When an eBGP route is reflected to iBGP peers, the next-hop is the eBGP neighbor’s address — which only the edge router can reach. next-hop-self replaces it with the edge router’s address.
What is the iBGP split horizon rule?
- Routes learned via iBGP are not re-advertised to other iBGP peers
- Routes learned via eBGP are not re-advertised to iBGP peers
- BGP routes are not advertised to OSPF
- iBGP routes have infinite metric
Answer: Routes learned via iBGP are not re-advertised to other iBGP peers
iBGP split horizon prevents routing loops within an AS. It requires a full mesh, Route Reflectors, or Confederations to propagate routes.
BGP uses _____ as its primary loop prevention mechanism for eBGP.
Answer: AS_PATH
AS_PATH lists every AS a route has traversed. If a router sees its own AS in the AS_PATH, it rejects the route.
What BGP state indicates the session is fully established and routes are being exchanged?
- Active
- OpenSent
- OpenConfirm
- Established
Answer: Established
Established is the only healthy BGP state. All other states indicate the session is forming or has failed.
BGP neighbors are automatically discovered using multicast Hellos.
- True
- False
Answer: False
BGP neighbors must be manually configured with the neighbor command. There is no automatic neighbor discovery.
What is the default eBGP TTL value, and what does this imply?
- 255 — can peer across any number of hops
- 1 — peers must be directly connected by default
- 64 — peers can be up to 64 hops away
- 128 — standard internet TTL
Answer: 1 — peers must be directly connected by default
eBGP uses TTL=1 by default, meaning peers must be directly connected. Use ebgp-multihop to peer across multiple hops.
What problem does a Route Reflector solve?
- BGP loop prevention
- iBGP full mesh scalability
- eBGP next-hop reachability
- BGP metric calculation
Answer: iBGP full mesh scalability
A full iBGP mesh requires n(n-1)/2 sessions. Route Reflectors allow iBGP routes to be re-advertised to clients, eliminating the full mesh requirement.
Which private ASN range is used for 16-bit private AS numbers?
- 1–1023
- 1024–32767
- 64512–65535
- 65536–131071
Answer: 64512–65535
Private 16-bit ASNs are 64512–65535. They are used internally and should be stripped before advertising to the internet.
What command is used to configure an iBGP neighbor?
- neighbor 10.0.0.2 remote-as 65002 (different AS)
- neighbor 10.0.0.2 remote-as 65001 (same AS)
- neighbor 10.0.0.2 internal
- neighbor 10.0.0.2 ibgp
Answer: neighbor 10.0.0.2 remote-as 65001 (same AS)
iBGP is configured the same way as eBGP — using neighbor remote-as. The difference is that the remote AS number matches the local AS.
What BGP attribute does a Route Reflector add to prevent routing loops?
- AS_PATH
- ORIGINATOR_ID and CLUSTER_LIST
- LOCAL_PREF
- MED
Answer: ORIGINATOR_ID and CLUSTER_LIST
ORIGINATOR_ID identifies the original route advertiser. CLUSTER_LIST tracks which RR clusters the route has passed through. Both prevent loops in RR topologies.
Previous lesson: EIGRP advanced: DUAL algorithm, feasible successor, variance, named mode
Back to Cisco CCNP Enterprise (ENCOR 350-401)
Next lesson: BGP path selection: weight, local preference, AS-path, MED, origin; attributes
