What is BGP? If you ever look it up on Wikipedia, this is what you’ll find:
“Border Gateway Protocol (BGP) is a standardized exterior gateway protocol designed to exchange routing and reachability information between autonomous systems (AS) on the Internet. The protocol is often classified as a path vector protocol but is sometimes also classed as a distance-vector routing protocol.”
All true, but if you’re not a network engineer, this definition probably won’t be much help.
So what is BGP?
In plain English, BGP (a.k.a. Border Gateway Protocol) is the routing method that enables the Internet to function. Without it, we wouldn’t be able to do a Google search or send an email. That’s why we thought it’s high time to explain BGP in a way that ordinary folks can understand.
[Spoiler alert: it’s surprisingly similar to the GPS navigation system.]
Since BGP is a routing protocol, let’s start with a simple definition of network routing from John F. Shoch, an American computer scientist whose work preceded the Internet:
“The name of a resource indicates what we seek, an address indicates where it is, and a route tells us how to get there”.
With that in mind, let’s start with a brief stroll down memory lane.
BGP for History Buffs
Once upon a time, when the Internet was just a tiny cloud, there were only a few networks connected to each other. As a result, routing between network nodes was quite static. All that needed to be done to set up routing was to define network nodes and make connections between them as needed.
As we all know, the Internet didn’t stay small for very long. It began to incorporate more and more networks, which necessitated a more dynamic routing system. EGP (External Gateway Protocol) was invented to do the job.
EGP is a simple routing protocol and, consistent with the period it was created in, is based on tree-like (i.e., hierarchical) topologies. In modern networks, tree topologies were replaced by fully connected mesh topologies to allow for maximum scalability.
Tree-like vs. full mesh topologies
|In a tree-like topology, to reach E or F, A will have to go through B, C and D.||In a full mesh topology, nodes have many paths to reach each other.|
The Emergence of Autonomous System Architecture
As the Internet continued to expand, it became increasingly difficult to keep track of all the routes from one network to another. The solution was to transition to an Autonomous System (AS) architecture.
An AS can be an Internet Service Provider, a university or an entire corporate network, including multiple locations (IP addresses). Each AS is represented by a unique number called an ASN.
In this type of network architecture, each autonomous system controls a collection of connected routing prefixes, representing a range of IP addresses. It then determines the routing policy inside the network.
As the number of autonomous systems in the internet grew, the drawbacks of EGP became more pronounced. Its hierarchical structure hampered scalability and made it difficult to connect new networks in an efficient manner. Consequently, it was necessary to define a new exterior routing protocol that would provide enhanced and more scalable capabilities.
In June 1989, the first version of this new routing protocol, known as the Border Gateway Protocol, was formalized.
BGP is Just Like GPS for Packets
Let’s draw an analogy from everyday life to make all of this a bit more understandable.
You can think of an autonomous system in the computer world as a city with many streets. A network prefix is similar to one street with many houses. An IP address is like an address for a particular house in the real world, while a packet is the equivalent of a car travelling from one house to another using the best possible route.
Taking this comparison to its logical conclusion, the BGP routing protocol is analogous to your trusty GPS navigator. Like Google’s Waze application, the best route is determined by different factors, such as traffic congestion, roads temporarily closed for maintenance, etc. The path is calculated dynamically depending on the situation of the network nodes, which are like roads and junctions on a GPS map.
Let’s Get Technical
Now that the background is (hopefully) clearer, let’s delve slightly deeper into the technical aspects of BGP. As we saw in Wikipedia’s definition, BGP is designed to exchange routing and reachability information between autonomous systems on the Internet.
Each BGP speaker, which is called a “peer”, exchanges routing information with its neighboring peers in the form of network prefix announcements. This way, an AS doesn’t need to be connected to another AS to know its network prefix.
The BGP decision-making mechanism analyzes all the data and sets one of its peers as the next stop, to forward packets for a certain destination.
Each peer manages a table with all the routes it knows for each network and propagates that information to its neighboring autonomous systems.
In this way, BGP allows an AS to collect all the routing information from its neighboring autonomous systems and “advertise” that information further. Each peer transfers the information internally inside its own autonomous system.
Just like in real life, usually more than one route exists to reach a given destination. BGP is responsible for determining the most suitable route according to the information collected and an organization’s routing policy, which is based on cost, reliability, speed, etc.
So the next time you check out this blog, remember that BGP is what helped you get here.
Would you like to write for our blog? We welcome stories from our readers, customers and partners. Please send us your ideas: email@example.com