Module C – eBGP and iBGP
BGP sessions are classified by whether the peers belong to the same AS or different ASes. eBGP connects routers in different ASes; iBGP connects routers within the same AS.
| Characteristic | eBGP | iBGP |
|---|---|---|
| Peer AS relationship | Different ASNs | Same ASN |
| Typical purpose | Inter-AS route exchange | Distribute BGP routes within one AS |
| Default Cisco TTL behaviour | Typically 1 for directly connected eBGP | Typically 255 |
| AS_PATH handling | Local ASN is normally added when advertising to eBGP | AS_PATH is not normally changed when advertising to iBGP |
| iBGP split horizon | Not applicable in the same way | Routes learned from one iBGP peer are not normally advertised to another iBGP peer |
| Next hop | For directly connected eBGP, normally the advertising interface address | Normally preserved unless changed, for example using next-hop-self |
Example peering configuration
! R1 in AS65001 – eBGP to R2
router bgp 65001
neighbor 11.1.1.2 remote-as 65002
!
! R1 – iBGP to R3
router bgp 65001
neighbor 13.1.1.2 remote-as 65001
!
! R2 in AS65002 – iBGP to R4
router bgp 65002
neighbor 12.1.1.2 remote-as 65002
iBGP full mesh
Without route reflectors or confederations, iBGP requires a full mesh so that routes learned from one iBGP peer can be distributed to all other iBGP peers. The number of sessions for n routers is n(n−1)/2. For two routers in an AS, one iBGP session is required.
next-hop-self
router bgp 65002
neighbor 12.1.1.2 next-hop-self
Use next-hop-self when an iBGP neighbour would otherwise receive a route with a next hop it cannot reach. Confirm the resulting next-hop and underlying IGP reachability.
QA test ideas
Student Knowledge Assessment – Module C
Q1. When are two BGP peers eBGP peers?
A. When they use the same ASN
B. When they use different ASNs
C. When they share an interface
D. When both use OSPF
Correct answer: B. When they use different ASNs Explanation: eBGP connects BGP speakers in different autonomous systems.
Q2. When are two BGP peers iBGP peers?
A. When they use the same ASN
B. When they use different ASNs
C. When they use different vendors
D. When one uses IPv6
Correct answer: A. When they use the same ASN Explanation: iBGP peers belong to the same AS.
Q3. What normally happens to AS_PATH when a route is advertised to an eBGP peer?
A. The advertising ASN is added
B. The entire path is removed
C. It becomes a community
D. It is always unchanged
Correct answer: A. The advertising ASN is added Explanation: An eBGP speaker normally prepends its own ASN to AS_PATH.
Q4. What is the iBGP split-horizon rule?
A. An iBGP-learned route is not normally advertised to another iBGP peer
B. All iBGP routes are discarded
C. iBGP cannot advertise IPv4
D. iBGP must use TCP port 80
Correct answer: A. An iBGP-learned route is not normally advertised to another iBGP peer Explanation: The rule prevents loops and creates the need for full mesh or route-reflector designs.
Q5. What does next-hop-self do?
A. Changes the local ASN
B. Advertises the local router as next hop to a neighbour
C. Disables AS_PATH
D. Changes the BGP TCP port
Correct answer: B. Advertises the local router as next hop to a neighbour Explanation: It sets the advertising router as the next hop for the specified neighbour.
Q6. What is the default Cisco eBGP TTL for directly connected peers?
A. 1
B. 16
C. 64
D. 255
Correct answer: A. 1 Explanation: Cisco's typical default eBGP TTL is 1 for directly connected peers.
Q7. What is the common default Cisco iBGP TTL?
A. 1
B. 2
C. 64
D. 255
Correct answer: D. 255 Explanation: Cisco's typical iBGP TTL is 255.
Q8. How many full-mesh iBGP sessions are needed for four routers?
A. 2
B. 4
C. 6
D. 8
Correct answer: C. 6 Explanation: n(n−1)/2 gives 4×3/2 = 6 sessions.
Q9. Which feature can reduce the need for a full iBGP mesh?
A. Route reflector
B. ARP
C. NAT
D. STP
Correct answer: A. Route reflector Explanation: Route reflectors provide controlled route distribution and reduce full-mesh session requirements.
Q10. Does an Established iBGP session prove that every received route is installed?
A. Yes, always
B. No
C. Only for static routes
D. Only when MED is zero
Correct answer: B. No Explanation: Session state and route selection/installation are separate checks.