Christmas Offer - Every Learner Must Check Out - Flat 88% OFF on All Access Pass
00
days
:
00
hours
:
00
minutes
:
00
seconds
PyNet Labs- Network Automation Specialists

iBGP vs eBGP – What’s the Difference?

Author : PyNet Labs
Last Modified: February 7, 2024 
iBGP vs eBGP Featured Image

Introduction

One of the foundations of modern networking is the border gateway protocol or BGP. Without BGP working in the background to allow system communication, the modern internet as it is known today would not be able to operate. The routing protocol known as BGP has two different versions, i.e., eBGP and iBGP. Both provide the best routing pathways for network communications. In this blog, we will look into the detailed iBGP vs eBGP that better explains these two versions. We will also explain both in detail separately. Let’s Begin!

iBGP and eBGP are part of the BGP protocol which is covered in OSPF BGP Course. Let’s see the basic difference between the two.

Difference between iBGP and eBGP

Below, we have explained the difference between the two in tabular form based on different factors.

FactorsiBGP (Internal Border Gateway Protocol)eBGP (External Border Gateway Protocol)
ScopeEstablished between routers in the same AS.Established between routers in different autonomous systems.
NeighborshipEstablished between routers in the same AS.Established between routers in different autonomous systems.
Route advertisementRoutes received from an iBGP peer cannot be advertised to another iBGP peer but can be advertised to an eBGP peer.Routes received from an eBGP peer can be advertised to both eBGP and iBGP peers.
AS path additionThe local AS number is not added to the AS path attribute when advertising a route to an iBGP peer.The local AS number is added to the AS path attribute when advertising a route to an eBGP peer.
AttributesLocal preference attribute is sent to an iBGP peer.Local preference attribute is not sent to an eBGP peer.
ADThe default administrative distance is 200.The default administrative distance is 20.
TTLDefault peers are set with TTL = 255.Default peers are set with TTL = 1.
TopologyRequires full mesh topology.Does not require full mesh topology.
Loop prevention mechanismUses BGP split horizon for loop prevention.Uses AS path for loop prevention.

Let’s focus on the eBGP and iBGP in detail to understand the comparison of iBGP vs eBGP.

What is iBGP?

Internal Border Gateway Protocol or iBGP is a BGP version used by routers in the same autonomous system (AS). Without using an IGP (Interior Gateway Protocol), iBGP enables routers to share routing data about external networks, such as the Internet. To avoid routing loops, iBGP peers must create a full mesh topology. iBGP bases its routing choices on network regulations and rulesets by using BGP features like local preference.

Below, we have shown iBGP with two routers, R1 and R2.

iBGP with two routers

What is eBGP?

An external Border Gateway or eBGP allows communication between several autonomous systems (AS). Network connections via the Internet or between various organizations are made possible by eBGP. eBGP operates in the opposite manner of iBGP, i.e., inside the same AS. eBGP routes don’t need a full mesh topology and have an administrative distance of 20.

eBGP Topology

Now we have a basic understanding of eBGP and iBGP. Let’s understand the difference between iBGP and eBGP in detail.

iBGP vs eBGP

Below, we have compared iBGP vs eBGP in detail based on different factors.

Scope

While IBGP is used for routing information sharing between routers within the same autonomous system, EBGP is used for routing information exchange between routers in different autonomous systems.

As you can see in the picture above, router A in AS 100 and router B in AS 200 are eBGP peers, while router C and router D in AS 100 are iBGP peers.

iBGP vs eBGP scope

Neighborship

While iBGP peers might be indirectly linked and have the same AS number, eBGP peers are often directly connected and have separate AS numbers. We have shown this in the picture above.

Route Advertisement

iBGP routes obtained from an iBGP peer cannot be advertised to another iBGP peer but may be advertised to an eBGP peer. Conversely, eBGP routes obtained from an eBGP peer can be advertised to both eBGP and iBGP peers.

AS Path Addition

When advertising routes to an eBGP peer, eBGP adds the local AS number to the AS path, but iBGP does not modify the AS path when advertising routes to an iBGP peer.

Attributes

In contrast to iBGP, which sends attributes like local preference to iBGP peers, eBGP does not send such information.

Administrative Distance

The default administrative distance for eBGP is 20, while the default administrative distance for iBGP is 200. This indicates that eBGP routes are automatically favored over iBGP routes.

For example, if router A gets two routes from routers B (having AD 100) and C (having AD 200) for the same destination, it will choose the route from router B since it has a lower AD.

Time-to-live

The default TTL for eBGP peers is 1, while the default TTL for iBGP peers is 255. This implies that iBGP peers might be many hops away; eBGP peers must be directly linked.

Topography

iBGP needs either a complete mesh topology or one of the route reflectors, while eBGP does not. This is so because iBGP forbids peer-to-peer route redistribution.

For example, if an AS has four routers (C, D, E, and F), they must form a complete mesh topology or use other techniques to ensure they all share the same routes.

Loop Prevention Mechanism

iBGP employs BGP split horizon for loop avoidance, while eBGP uses AS path. This implies that although iBGP accepts routes with the same originator ID or cluster list, eBGP does not allow routes with its own AS number in the AS path.

These are the main difference between iBGP and eBGP.

Frequently Asked Questions

Q1 – Why is eBGP preferred over iBGP?

eBGP is preferred over iBGP for many reasons, some of these are:

  • eBGP AD is 20, and the AD of iBGP is 200. Hence, a BGP router will always choose eBGP over iBGP if the same route is learned from both eBGP and iBGP neighbors.
  • It improves scalability because eBGP minimizes the number of iBGP sessions that must be formed inside an autonomous system.

Q2 – What is the difference between eBGP and iBGP TTL?

TTL stands for time-to-live. The main difference between the eBGP and iBGP TTL is that eBGP packets have a default TTL value of 1 whereas in the case of iBGP, packets have a TTL value of 255.

Q3 – What is the full form of iBGP?

iBGP stands for internal border gateway protocol, and it’s one of the versions of BGP.

Q4 – What is the purpose of iBGP?

iBGP is a protocol for exchanging routing information within an autonomous system. It also assists in ensuring consistent and efficient routing among routers within the same network domain.

Conclusion

Both eBGP and iBGP are routing protocols crucial to the functioning of modern computer networks. iBGP vs eBGP gives a clear understanding of which one to choose for better productivity. In this blog, we have covered the detailed differences between the two BGP versions and a brief explanation.

Recent Blog Post

Leave a Reply

Your email address will not be published. Required fields are marked *

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram