Network Basics by Packet Design: What are iBGP and eBGP?

Border Gateway Protocol (BGP) is the routing protocol of the Internet. It is the standard exterior gateway protocol used for exchanging routing information between Autonomous Systems (AS) and routing traffic across the Internet. In this blog, we look at what are iBGP and eBGP – two versions of BGP, where one is used for routing within the same AS and the other to exchange routing information between two different AS’s.

What is eBGP?

To understand iBGP, let us first look at external BGP (eBGP). The Internet routing world consists of many autonomous systems which are interconnected. Each AS consists of multiple routers. eBGP is the version of BGP that is used to exchange BGP routing updates between two different AS’s. eBGP is implemented on the edge BGP router that provides interconnection to other AS’s. Check out our blog on how Internet routing works to understand how BGP is used for Internet routing.

What is iBGP?

While we have eBGP for inter-AS communication, some of the autonomous systems in the Internet work as transit AS’s that pass the BGP advertisements received from their neighbor AS’s through their own internal routers to other neighbor AS’s. But forwarding BGP updates within an AS introduces a couple of challenges.

A key issue arises from the design of BGP, requiring a BGP router to add its own AS number (ASN) entry to the AS_PATH attribute when forwarding BGP route updates to another AS. At the same time, to prevent routing loops from occurring, BGP is designed to drop a route if a BGP router sees its own ASN in the AS_PATH list. Thus, when forwarding a BGP route advertisement through the routers within an AS, each BGP edge router will add its own ASN to the AS_PATH list. But the next hop BGP router, which is in the same AS, sees its own ASN in the AS_PATH list, assumes that a loop has occurred and drops the route. While this can be overcome by redistributing all BGP routes into an interior gateway protocol (IGP), such as OSPF, and not using BGP, this is never recommended as the sizeable number of routes that are usually advertised by BGP can cause IGP to crash.

Due to this, a mechanism known as internal BGP (iBGP) is used to forward route advertisements received from an external BGP router through the internal network. With iBGP, a router within an AS do not exchange routing updates to another iBGP router. The ASN is added and routes are advertised only when they are being sent to a BGP router in another autonomous system, i.e. to an eBGP router.

What are iBGP and eBGP

What are iBGP and eBGP?

However, this introduces another problem. Because routing updates learned are not advertised to other iBGP peers to prevent loops, route reachability is achieved by using a full-mesh topology between all the iBGP peers. This means that every device within an AS is logically connected to every other device through a peering relationship.

Generally, the loopback interface is used to establish connections between iBGP peers and it is IGP that is used to find a path to a remote router’s loopback interface. Thus, if IGP fails, iBGP too will fail. You can learn more about configuring iBGP and eBGP on a Cisco router here:https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13751-23.html

Hopefully, you now have a better understanding of what are iBGP and eBGP and why they are needed. And after you have BGP configured in your network, don’t forget how important it is to monitor BGP.

The “Network Basics by Packet Design” blog series covers the basics of various terminologies and technologies used by network operators and service providers, including routing, MPLS, Traffic Engineering, SDN, etc. Don’t forget to check out the other blogs in this series here.

Request A Demo | More Resources | Follow us on Twitter