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.

Key takeaways

Border gateway protocol (BGP) directs the flow of information between routers and networks.

  • BGP communicates with autonomous systems to find and remember the shortest route for network traffic. 

  • BGP uses the routing information base to store information on protocols known as peering. 

  • You can use BGP for wide area networks (WANs), infrastructure as a service (IaaS), and the internet. 

Discover what BGP is, how autonomous systems work, and some jobs that use BGP. If you're ready to build your skills in networking, enroll in the Akamai Network Engineering Professional Certificate to explore the daily roles of network engineers, build effective data analysis, and implement networking technologies. 

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 internet protocol (IP) addresses that share a network prefix. Managed by a single entity such as a university, government, or internet service provider (ISP), 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 border gateway protocol 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

Why is BGP a layer 7 protocol?

In the TCP/IP model, BGP is a layer 7 protocol because it operates above the transport layer to build and update the routing table in the application layer. However, in the open systems interconnection (OSI) model, it operates as a layer 4 transport layer. 

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 has 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 being 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?

Open shortest path first (OSPF) 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 a mesh. 

  • OSPF has a faster convergence time than BGP

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

These factors make OSPF better for small local area networks (LANs) 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 median total pay and requirements.

All salary information represents the median total pay from Glassdoor as of May 2026. These figures include base salary and additional pay, which may represent profit-sharing, commissions, bonuses, or other compensation.

Network administrator

Median total pay (Glassdoor): $100,000 per year [1]

Job outlook (projected growth from 2024 to 2034): 14,300 openings per year [2]

Requirements: Bachelor’s in computer information systems or computer science, plus one to two years of 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 troubleshoot 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

Median total pay (Glassdoor): $123,000 per year [3]

Job outlook (projected growth from 2024 to 2034): 12 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 domain name system (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

Explore our free resources for networking professionals

Subscribe to Career Chat on LinkedIn to stay current with the latest trends in your career field. Continue your learning journey with networking with our other free digital resources:

Accelerate your career growth with a Coursera Plus subscription. When you enroll in either the monthly or annual option, you’ll get access to over 10,000 courses. 

Article sources

1

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

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.