eBGP vs iBGP
eBGP and iBGP are both flavours of the BGP protocol. Let’s understand a short on what both terms mean before comparing (eBGP vs iBGP) the functionalities of both –
External Border Gateway Protocol or eBGP
It is a flavour of Border Gateway Protocol (BGP) used for communication between different autonomous systems (AS). eBGP functions as the protocol responsible for interconnection of networks from different organizations or the Internet.
eBGP is used and implemented at the edge or border router that provides interconnectivity for two or more autonomous system.
Internal Border Gateway Protocol or iBGP
It is the protocol used between the routers in the same autonomous system (AS).
iBGP is used to provide information to your internal routers. iBGP requires all the devices in same AS to form full mesh neighborship or either of Route reflectors and Confederation for prefix learning.
Related – BGP Local Preference Attribute
You can watch this video for better understanding:
(or continue reading)
Difference between eBGP & iBGP
Now that we have brief of both the eBGP and iBGP protocols, let’s compare them (eBGP vs iBGP) on various parameters.
- Neighborship: Exterior Border Gateway Protocol (EBGP) is utilized to establish a connection between two distinct Autonomous Systems (AS), while Interior Border Gateway Protocol (IBGP) is employed to set up a link between the same Autonomous Systems.
- Route Advertisement: Any routes received from an external BGP (eBGP) peer will be distributed to other peers (BGP or iBGP). However, routes received from an iBGP peer will not be advertised to other iBGP peers.
- As Path addition: AS path is prepended to route when advertised to eBGP peer. However, that is not the case with internal BGP.
- Attributes: In case of eBGP, attributes like local preference are are sent to iBGP peer and not sent to the eBGP peers. On the other hand in case of iBGP, attributes like local preference are sent to the iBGP peers but not to an EBGP peer.
- Scope: The eBGP scope is between organizations or between organization and Internet Service provider. However, iBGP is used within the same organization.
- TTL: By default, EBGP peers are set with a Time To Live (TTL) value of 1, indicating that the neighbors are assumed to be directly connected. However, this is not the case with IBGP. To modify the TTL setting for EBGP, the command “neighbor x.x.x.x ebgp-multihop TTL>” should be used. The term “multihop” is only associated with EBGP.
- AD (Administrative Distance): The administrative distance of exterior border gateway protocol (EBGP) routes is 20, whereas the administrative distance for interior border gateway protocol (IBGP) is 200.
- Next Hop attribute: The next hop of a route remains the same when it is advertised to an Internal BGP peer, but it is modified when it is propagated to an External BGP peer by default. It is possible to alter the default behavior of IBGP through the command “neighbor x.x.x.x next-hop-self”, which modifies the next hop value to the router’s own local route when it sends out an advertisement.
- Topology: iBGP requires full mesh topology or else either of Route reflectors or Confederation. eBGP doesn’t require full mesh topology.
- Loop prevention mechanism: External BGP utilizes AS Path for loop prevention. However, iBGP uses BGP Split horizon i.e. non advertisement from iBGP to iBGP neighbor.
Comparison Table: eBGP vs iBGP
Below table summarizes the differences between the two types of BGP protocols:
Download the comparison table: eBGP vs iBGP .
Related- Dynamic BGP Peering
If you want to learn more about BGP, then check our easy to understand Free BGP Cheatsheet in downloadable PDF Format explained with relevant Diagrams.
Are you Preparing for your next Interview?
If you ware preparing for your nest job interview, then check our ebook on BGP Interview Q&A in downloadable PDF Format explained with relevant Diagrams.