eBGP vs iBGP: The Dynamic Duo of Routing Protocols

Welcome to the wonderful world of BGP in computer networking! Today, we’re going to dive into the exciting topic of EBGP vs IBGP. These might sound like a mouthful of technical jargon, but don’t worry, by the end of this journey, you’ll be a pro at understanding the difference between these two routing protocols. Imagine a network like a busy city, and the EBGP and IBGP are like the traffic cops directing the flow of information. They might have different roles, but they work together to make sure the information gets to where it needs to go seamlessly. So, put on your thinking caps, and let’s get started!

Before we dive in, make sure you have read through my previous BGP posts.

  1. What is BGP in Networking
  2. BGP Message Types
  3. BGP States
  4. How to advertise routes in BGP – 5 Simple Techniques

EBGP (Exterior Border Gateway Protocol)

A. Definition and function of EBGP:

EBGP, short for “Exterior Border Gateway Protocol,” is like the GPS of the internet. It helps direct packets of information to their proper destinations by determining the best path for data to travel through autonomous systems (ASes) on the internet. Think of it like a tour guide that helps navigate you through different cities.

B. How EBGP is used to exchange routing information between different autonomous systems (ASes) on the Internet:

EBGP routers, located at the edge of an AS, act as gatekeepers for exchanging routing information between different autonomous systems on the Internet. They help different networks communicate and share information about the best path for data to travel. It’s like a language translator that helps people from different countries communicate with each other.

C. EBGP’s role in connecting networks to the Internet and sharing routing information between different service providers:

EBGP routers play a crucial role in connecting networks to the Internet and sharing routing information between different service providers. By connecting networks to the Internet, EBGP allows them to communicate with other networks and share information about the best path for data to travel. This is like a phone operator that connects calls between different people. And by sharing routing information with other service providers, EBGP helps keep the Internet running smoothly and efficiently, like a traffic cop directing cars on a busy street.

D. Sample EBGP config:

here’s a sample configuration for EBGP and IBGP using two Cisco routers:

Router 1 (ASN: 100)

router bgp 100
neighbor 10.0.0.2 remote-as 200
network 10.0.0.0 mask 255.255.255.0

Router 2 (ASN: 200)

router bgp 200
neighbor 10.0.0.1 remote-as 100
network 20.0.0.0 mask 255.255.255.0

In this example, Router 1 and Router 2 are connected to each other via the IP addresses 10.0.0.1 and 10.0.0.2, respectively. Router 1 is configured with an ASN of 100 and is advertising the network 10.0.0.0/24 to Router 2, which is configured with an ASN of 200. Router 2 is then advertising the network 20.0.0.0/24 to Router 1. This forms an EBGP peer relationship between the two routers.

IBGP (Interior Border Gateway Protocol)

A. Definition and function of IBGP:

IBGP, short for Interior Border Gateway Protocol, is like the internal mail system of a big company. It helps direct packets of information to the right department within the same autonomous system. Think of it like a mailman that delivers mail within the same building.

B. How IBGP is used within a single organization or enterprise network:

IBGP routers, which are considered to be internal to a network, are responsible for routing information within a single organization or enterprise network. They help different parts of the network communicate with each other and share information about the best path for data to travel. It’s like a company’s intercom system that connects different floors and rooms.

C. IBGP Sample Cisco Configuration

here’s a sample configuration for IBGP using three Cisco routers:

Router 1 (ASN: 100)

router bgp 100
neighbor 10.0.0.2 remote-as 100
neighbor 10.0.0.3 remote-as 100
network 10.0.0.0 mask 255.255.255.0

Router 2 (ASN: 100)

router bgp 100
neighbor 10.0.0.1 remote-as 100
neighbor 10.0.0.3 remote-as 100
network 20.0.0.0 mask 255.255.255.0

Router 3 (ASN: 100)

router bgp 100
neighbor 10.0.0.1 remote-as 100
neighbor 10.0.0.2 remote-as 100
network 30.0.0.0 mask 255.255.255.0

In this example, Router 1, Router 2 and Router 3 are connected to each other via the IP addresses 10.0.0.1, 10.0.0.2 and 10.0.0.3, respectively. All the routers are configured with an ASN of 100, and each is advertising different networks to the other routers. This forms an IBGP full mesh peer relationship between the three routers, allowing them to exchange routing information within the same autonomous system.

It is important to note that in a real-world scenario, you would also need to configure additional options such as BGP split horizon, route reflectors or confederations to manage the IBGP full mesh requirement and prevent loops in the network.

eBGP vs iBGP comparison table

EBGPIBGP
EBGP is an Acronym that stands for External Border Gateway Protocol. It’s like the GPS of the internet for different cities.IBGP is an acronym that stands for Internal Border Gateway Protocol. It’s like the internal mail system of a big company.
eBGP is used to connect two BGP routers in distinct autonomous systems, like two different countries.iBGP connects two BGP routers in the same autonomous system, like two different departments in a building.
Its default Administrative Distance is 20, like a first-class ticket.Its default Administrative Distance is 200, like a coach ticket.
Like forwarding a package, when an EBGP peer receives an EBGP route, it can “forward” the route to other EBGP peers as well as IBGP peers.When an iBGP router receives an IBGP route, it cannot advertise that route to another IBGP peer, like keeping a secret. But it can advertise to an EBGP peer.
It does not require full mesh topology, like a bus with different routes.It requires full mesh topology, like a subway with a specific route.
It is used between organizations or between organizations and Internet Service providers, like different countries’ communication.It is used within the same organization, like different departments’ communication.
It uses AS_path for loop prevention. The AS_path attribute is a list of Autonomous System (AS) numbers that a route has passed through. When a router receives a route, it checks the AS_path to make sure that it’s own AS number is not already in the list. If it is, the router will not accept the route, and the loop is prevented.It uses iBGP Split horizon for loop prevention. (BGP split horizon prevents routing loops from occurring since a route learned from one iBGP peer will not be shared with another iBGP peer.)
Its default peers are set with TTL = 1, like a first-class ticket.Its default peers are set with TTL = 255, like a coach ticket.
The local preference attribute is not transmitted across EBGP peers.Attributes such as local preference are transmitted between IBGP peers.
When a route is advertised to an EBGP peer, the next hop is changed to a local router.When a route is advertised to an IBGP peer, the next hop remains unchanged,
eBGP vs iBGP

Conclusion

In conclusion, EBGP (Exterior Border Gateway Protocol) and IBGP (Interior Border Gateway Protocol) are both routing protocols that play an important role in network connectivity. EBGP is used for inter-autonomous system routing, connecting networks to the Internet, and sharing routing information between different service providers. It uses the AS_PATH attribute to prevent routing loops between different autonomous systems. On the other hand, IBGP is used for intra-autonomous system routing and is responsible for routing information within a single organization or enterprise network. It prevents routing loops by using the split horizon, as routers are in the same autonomous system.

It’s important to note that EBGP and IBGP are not mutually exclusive and are often used together to provide routing information throughout a network. EBGP is used to connect networks to the Internet and share routing information between different service providers, while IBGP is used to distribute that information within the organization. Network engineers must have a solid understanding of both EBGP and IBGP in order to effectively design and troubleshoot networks.

Leave a Reply

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