Today we’re diving into one of the most fundamental yet often misunderstood topics in BGP – the difference between iBGP and eBGP. Whether you’re prepping for CCNA/CCNP or working on a real enterprise network, understanding these two forms of BGP peering is absolutely essential. I remember when I was setting up my first BGP peering lab – I had it all configured, but nothing worked until I understood the real differences between iBGP and eBGP. So trust me – this is not just theory; it’s real-world relevant!
Table of Contents
Theory in Brief: What is iBGP and eBGP?
BGP (Border Gateway Protocol) is the protocol that makes the internet work. It helps different autonomous systems (ASes) exchange routing information. Depending on whether the peers are in the same AS or different ASes, BGP functions differently as either iBGP or eBGP.
eBGP (External BGP)
- eBGP is the BGP peering between routers in different autonomous systems.
- It’s mainly used to exchange routes between your enterprise network and the outside world (like ISPs).
- Since these routers belong to different networks, the hop count between them is typically 1.
- eBGP updates have a Time-To-Live (TTL) of 1, unless modified.
iBGP (Internal BGP)
- iBGP is BGP peering within the same autonomous system.
- Commonly used to distribute eBGP-learned routes within the internal routers of your own AS.
- iBGP doesn’t modify the next-hop attribute by default and requires a full mesh or Route Reflector setup.
Key Point:
Remember this golden rule: “eBGP is for inter-AS communication, iBGP is for intra-AS route distribution.”
iBGP vs eBGP – Comparision
Feature | iBGP | eBGP |
---|---|---|
Definition | BGP between routers in same AS | BGP between routers in different ASes |
AS Number | Same on both peers | Different on each peer |
Next-Hop Behavior | Next-hop unchanged by default | Next-hop changed to self |
TTL (Time To Live) | 255 (default) | 1 (default) |
Full Mesh Requirement | Yes, or use Route Reflector | No |
Path Selection | Prefers eBGP routes over iBGP | Preferred if available |
Use Case | Internal route distribution | External route exchange |
Administrative Distance (Cisco) | 200 | 20 |
Split Horizon Rule | iBGP doesn’t advertise to other iBGP peers | Not applicable |
Common Topology | MPLS/VPN, Enterprise Core | ISP Peering, Border Routers |
Pros and Cons
Type | Pros | Cons |
---|---|---|
iBGP | Efficient internal route propagation Scalable with RR | Needs full mesh or RR No loop prevention by AS_PATH |
eBGP | Simple peering Loop prevention using AS_PATH | Only works across AS boundaries TTL of 1 can be limiting |
Essential CLI Commands
Purpose | Command | Description |
---|---|---|
Check BGP Neighbors | show ip bgp summary | Shows status of BGP peers |
View BGP Routes | show ip bgp | Displays BGP routing table |
Configure iBGP Peering | router bgp <AS> neighbor X.X.X.X remote-as <same-AS> | Set up iBGP peer |
Configure eBGP Peering | router bgp <AS> neighbor X.X.X.X remote-as <other-AS> | Set up eBGP peer |
BGP Next-Hop Self | neighbor X.X.X.X next-hop-self | Used in iBGP to update next-hop |
View BGP Advertised Routes | show ip bgp neighbors X.X.X.X advertised-routes | Shows routes sent to peer |
Enable Debugging | debug ip bgp | Enable debug messages for BGP |
Check Route Reflector | show ip bgp + look for originator /cluster-id | Identifies RR behavior |
Check TTL for Peering | show ip bgp neighbors | Verifies TTL of peer connection |
View BGP Table by Prefix | show ip bgp <prefix> | Shows detailed info for a specific prefix |
Real-World Use Case – Comparison Table
Scenario | iBGP Use | eBGP Use |
---|---|---|
Enterprise WAN Core | Route sharing between regional routers | Not applicable |
MPLS VPN Customer Edge (CE) | iBGP between CE and PE router | PE to PE/CE to PE using eBGP |
ISP Border Router | Not used | BGP peering with other ISPs |
Multi-Cloud Environment | iBGP between on-prem and cloud routers | eBGP with public cloud (AWS, Azure BGP Gateways) |
Datacenter to Branch | RR used to simplify iBGP in hub-spoke | eBGP used across datacenter boundaries |
Small EVE-NG LAB – iBGP vs eBGP LAB
LAB Topology:

- R1 is in AS 65001 (eBGP)
- R2 and R3 are in AS 65002 (iBGP)
- Loopback 0 of R1: 1.1.1.1/32
- Loopback 0 of R3: 3.3.3.3/32
LAB Configuration:
R1 (eBGP)
interface lo0
ip address 1.1.1.1 255.255.255.255
!
router bgp 65001
neighbor 192.168.12.2 remote-as 65002
network 1.1.1.1 mask 255.255.255.255
R2 (eBGP + iBGP)
interface lo0
ip address 2.2.2.2 255.255.255.255
!
router bgp 65002
neighbor 192.168.12.1 remote-as 65001
neighbor 192.168.23.3 remote-as 65002
neighbor 192.168.23.3 update-source Loopback0
neighbor 192.168.23.3 next-hop-self
R3 (iBGP)
interface lo0
ip address 3.3.3.3 255.255.255.255
!
router bgp 65002
neighbor 2.2.2.2 remote-as 65002
neighbor 2.2.2.2 update-source Loopback0
Troubleshooting Tips
Symptom | Possible Cause | Troubleshooting Command |
---|---|---|
BGP Peering Not Coming Up | AS mismatch, no IP reachability | show ip bgp summary , ping , traceroute |
No Routes Learned via iBGP | Next-hop unreachable | Use next-hop-self in configuration |
eBGP Peering Down | TTL expired (especially multi-hop) | Add ebgp-multihop , check routing |
iBGP Loopbacks Not Used | Update-source not configured | Use update-source Loopback0 |
Route Not Propagated from iBGP to iBGP | Split horizon rule | Use Route Reflector or Confederation |
FAQ Section
1. What is the basic difference between iBGP and eBGP?
Answer:
The key difference lies in where the peers exist:
- iBGP (Internal BGP): Used between routers within the same Autonomous System (AS).
- eBGP (External BGP): Used between routers in different Autonomous Systems.
In short, iBGP = internal communication, eBGP = external/global communication.
2. How does the default TTL differ between iBGP and eBGP?
Answer:
- eBGP uses a TTL (Time-To-Live) of 1 by default, expecting peers to be directly connected.
- iBGP uses a TTL of 255, allowing non-direct peer relationships across the internal network.
For eBGP peering over non-direct links (like loopbacks), use:
neighbor x.x.x.x ebgp-multihop 2
3. What is the AS-PATH behavior in iBGP vs eBGP?
Answer:
- In eBGP, each router adds its AS number to the AS-PATH, preventing loops across different ASes.
- In iBGP, the AS-PATH remains unchanged, as all routers belong to the same AS.
This is why iBGP requires additional mechanisms to avoid routing loops, like the split-horizon rule.
4. Can iBGP neighbors form adjacency if not directly connected?
Answer:
Yes. iBGP peers don’t need to be directly connected, but you must ensure:
- There’s IP reachability between loopback or interface IPs.
- Update source is set properly:
neighbor x.x.x.x update-source Loopback0
- You don’t forget the full mesh or route reflection requirement.
5. What is the iBGP Split Horizon Rule?
Answer:
In iBGP, a router will not advertise routes learned from one iBGP peer to another iBGP peer.
This prevents loops but requires a full mesh between iBGP speakers — a major scalability concern in large networks.
To overcome this, we use:
- Route Reflectors
- Confederations
6. How does the next-hop behavior differ between iBGP and eBGP?
Answer:
- In eBGP, the next-hop IP is automatically changed to the IP of the advertising router.
- In iBGP, the next-hop IP is not changed — it remains as the original eBGP speaker’s IP.
To fix this in iBGP, use:
neighbor x.x.x.x next-hop-self
Especially useful when redistributing eBGP-learned routes inside an iBGP network.
7. Is synchronization required in iBGP or eBGP?
Answer:
- iBGP requires synchronization only if redistribution with IGP (like OSPF) is enabled.
- eBGP does not require synchronization.
Synchronization ensures that iBGP-learned routes are known to the IGP before being used — but in modern networks, it is usually disabled.
8. What about route propagation — does eBGP require full mesh like iBGP?
Answer:
No. eBGP routers do not follow the iBGP split-horizon rule and can freely propagate routes.
- iBGP needs a full mesh or Route Reflectors to propagate routes.
- eBGP is much simpler in this regard — no special topology design is needed for route sharing.
9. Can a single router participate in both iBGP and eBGP?
Answer:
Yes! In fact, this is very common.
Example:
- A router at the edge of an enterprise connects to an ISP via eBGP.
- That same router also peers with internal routers via iBGP.
Such routers are often Route Reflectors or ASBRs in real-world networks.
10. Can you summarize the key differences between iBGP and eBGP in a table?
Answer:
Feature | iBGP | eBGP |
---|---|---|
AS Relationship | Within same AS | Between different ASes |
Default TTL | 255 | 1 (needs direct connection) |
AS Path Modification | No | Yes (adds local AS) |
Split-Horizon Rule | Applies (needs full mesh) | Not applicable |
Route Propagation | Requires full mesh or route reflectors | Routes freely propagated |
Next-Hop Behavior | Not changed | Changed to advertising router |
Synchronization Needed | Sometimes (if IGP redistribution) | Not required |
Use Case | Internal BGP routing | External/global routing |
YouTube Link
Final Note
Understanding how to differentiate and implement iBGP vs eBGP Differences – A Deep Dive with Real-World Examples is critical for anyone pursuing CCNP Enterprise (ENCOR) certification or working in enterprise network roles. Use this guide in your practice labs, real-world projects, and interviews to show a solid grasp of architectural planning and CLI-level configuration skills.
If you found this article helpful and want to take your skills to the next level, I invite you to join my Instructor-Led Weekend Batch for:
CCNP Enterprise to CCIE Enterprise – Covering ENCOR, ENARSI, SD-WAN, and more!
Get hands-on labs, real-world projects, and industry-grade training that strengthens your Routing & Switching foundations while preparing you for advanced certifications and job roles.
Email: info@networkjourney.com
WhatsApp / Call: +91 97395 21088
Upskill now and future-proof your networking career!