Border Gateway Protocol (BGP): An Overview

Written by Coursera Staff • Updated on

Border Gateway Protocol allows for efficiency across the internet, networks, and autonomous systems. Explore more about BGP and its role in internet data management.

[Featured Image] A network engineer explains Border Gateway Protocol to a new hire who will be working with the company’s internet data management team.

Border Gateway Protocol (BGP) directs the flow of information between routers and networks, providing an essential protocol for communication between autonomous systems. It is the standard routing protocol for the internet backbone and data management. Due to its complexity, BGP has many advantages and disadvantages when routing data packets through networks. 

Discover what BGP is, how autonomous systems work, how different types of BGP work, its pros and cons, and some jobs that use BGP. 

What is Border Gateway Protocol (BGP)?

Border Gateway Protocol (BGP) is the routing protocol that routers use to communicate and exchange information through networks on the internet. BGP dictates how networks send and receive data packets. Part of BGP’s function is to find the best route for data transmission, so it includes network information and network attributes to find the best path. An important characteristic that BGP receives is information about autonomous systems (ASes), which creates network route efficiency.

Autonomous systems (ASes)

An autonomous system (AS) refers to a grouping of IP (internet protocol) addresses that share a network prefix. Managed by a single entity such as a university, government, or ISP (internet service provider), an AS communicates and transmits routing information to other ASes. An AS uses a specific set of routing information that the ISP or administrator of an AS controls. It also operates with the ability to learn and respond to changes in open-ended environments.

Types of BGP

When two routers exchange information, you typically call them neighbors or peers. When any two devices want to communicate with each other, two types of BGP emerge:

  • Internal BGP (iBGP)

  • External BGP (eBGP)

Let’s examine how iBGP and eBGP differ. 

Internal BGP (iBGP)

With internal BGP (iBGP), two networks communicate or transmit data with each other over an internal AS. BGP manages itself within the internal AS, becoming iBGP. An important use-case for iBGP in enterprise usage is in redundancy, so not all data goes through a singular edge router (a router that interfaces with eBGP). For this to work, iBGP must establish a connection between the edge router and the internal router using the same AS. Therefore, the other internal router has information on the routes or the ability to connect to a different client or outside router. 

External BGP

External BGP (eBGP) occurs when two routers communicate or transmit data with each other over different ASes, enacting eBGP. An edge router, sometimes called a border router, creates a communicative link between itself and other ASes via eBGP. The edge router communicates that information to other routers within the same AS through iBGP.

How does BGP work?

BGP is a process that generates routing table information that routers use to tell data packets where to go. It works because BGP on a router receives information from other routers and also contains a routing information base (RIB) stored on the router. The RIB has information from neighboring internal and external routers and the protocols for routing data packets, a process known as “peering.” The RIB can update this information continually. 

BGP uses a client-server network topology where the client requests information from a server, starting a BGP session that directs the flow of the data packets. Let’s look at a list of functions that make BGP work:

  • Peer acquisition and authentication: The process of how BGP identifies the correct neighboring peer that data packets flow to, increasing the efficiency of networks

  • Reachability information: Information BGP sends to tell whether a neighboring peer is responsive

  • Peer verification: Once neighbors running BGP are peering, BGP verifies the strength of the connection, which maintains better connections

  • Routing storage: BGP routers store routing information on the router in a database

  • Routing update: BGP routers update routing information when new updates are available and stored in the routing table

  • Routing selection and advertisement: BGP only communicates to peers what it thinks the best route is

What are the advantages and disadvantages of BGP?

BGP is a networking standard with advantages and disadvantages in its protocol. The chart below details the pros and cons.  

AdvantagesDisadvantages
BGP is the standard of router communication on the internet, allowing communication with any router regardless of ISP.Potential issues arise if configured improperly
BGP is scalable and with the ability to store thousands of routes in the routing tableBGP has potential stability issues caused by route flap damping, leading to problems of widespread failure in ASes
Efficient and optimized routing algorithms for data transmissionBGP fails to see network congestion, which sometimes leads to an inefficient route chosen for traffic
Makes efficient use of bandwidthBGP is prone to security issues like BGP hijacking, which disrupts traffic and gives the wrong routing information.
Handles network failures and can reroute traffic quicklyThe list of global BGP network routes constantly grows and is memory-intensive to store, leading to slowdowns on large networks.

How does OSPF compare to BGP?

OSPF (open shortest path first) is another popular routing protocol and an interior gateway protocol (IGP) used with an AS. Routers running the OSPF protocol send out information called link-state advertisements (LSAs) that contain routing information so that routers can recalculate the shortest path if necessary. This protocol works because OSPF routers split ASes into areas, which are sections where all routers within hold the same LSA database.

How does OSPF differ from BGP?

OSPF differs from BGP in a few ways, but the biggest is that it cannot scale up the entire internet like BGP. A few other ways OSPF differs include the following.

  • OSPF is intra-domain, and you can use BGP as inter- and intra-domain routing.

  • OSPF is best suited for small-to-large networks with hundreds of routers, while BGP can scale for the entire internet. 

  • OSPF is more straightforward to set up.

  • OSPF has a hierarchical network topology, while BGP’s is mesh. 

  • OSPF has a faster convergence time than BGP

  • OSPF is more memory and CPU-intensive, while BGP’s memory and power consumption bases itself on the size of the routing table

These factors make OSPF better for small LAN networks and data centers. In contrast, BGP is optimal for WAN, IaaS, and the internet. 

Jobs that use BGP and how to get one

Network administrators and network engineers are two jobs that consistently use BGP. The following provides a closer look at each position, including its average base salary and requirements. 

Network administrator

Average annual salary: $79,415 per year [1]

Job outlook (projected growth from 2023 to 2033): 3 percent [2]

Requirements: Bachelor’s in computer information systems or computer science plus one to two years experience 

Network administrators use TCP/IP, DNS, DHCP, and BGP to route information on their networks properly. They may set up the network architecture, provide network security, and trouble network issues. To become a network administrator, you will need a bachelor’s degree in computer science or computer information systems, although some do have an associate degree. 

Network engineer

Average annual salary: $95,963 per year [3]

Job outlook (projected growth from 2023 to 2033): 13 percent [4]

Requirements: Bachelor’s in computer science, engineering, or related field plus some experience in the field

Network engineers analyze BGP tables and routes and create new routes for traffic. They may also use OSPF, install DNS servers, and design and maintain network infrastructure. Most network engineers will have a bachelor’s degree in computer science or electrical engineering, with some acquiring a master’s before becoming one. Some companies may require more work experience before deeming you qualified to become a network engineer. 

Read more: Bachelor’s Degree Guide: Resources for Your Undergraduate Education

Next steps

BGP is a powerful routing protocol that directs the flow of data packets within and between autonomous systems through iBGP and eBGP, respectively. Network administrators and engineers consistently use BGP in their careers, making it an essential protocol to understand for those entering networking. 

To learn more about BGP and its uses in IT, try the Google IT Support Professional Certificate if you’re just starting in networking and IT support. If you’re looking to further your career or upskill at your current position, try the Akamai Network Engineering Professional Certificate, both of which you can find on Coursera. 

Article sources

1

Glassdoor. “How Much Does a Network Administrator Make?, https://www.glassdoor.com/Salaries/network-administrator-salary-SRCH_KO0,21.htm.” Accessed November 26, 2024. 

Keep reading

Updated on
Written by:

Editorial Team

Coursera’s editorial team is comprised of highly experienced professional editors, writers, and fact...

This content has been made available for informational purposes only. Learners are advised to conduct additional research to ensure that courses and other credentials pursued meet their personal, professional, and financial goals.