No history yet

Introduction to BGP

The Internet's Postal Service

The internet is often described as a “network of networks.” But how do these independent networks, run by different companies and organizations, talk to each other? The answer is the Border Gateway Protocol, or BGP.

Think of the internet as a massive global postal system. Each individual network is like a regional postal service, responsible for delivering mail within its own area. These regional services are called Autonomous Systems (AS). An AS is a large network, or a group of networks, that has a single, unified routing policy. Your internet service provider (ISP), a large university, or a tech giant like Google all operate their own Autonomous Systems.

BGP is the protocol that allows these different Autonomous Systems to exchange information about how to reach each other. It’s the master list of addresses and routes that ensures an email sent from your house in one country can find its way to a server on the other side of the world.

Unlike other routing protocols that might only look at the next stop, BGP is a path-vector protocol. This means it doesn't just care about the next hop; it considers the entire path, or sequence of Autonomous Systems, a data packet will travel through. This allows network administrators to set up complex routing policies, choosing paths based on cost, speed, or political agreements, not just the shortest distance.

From Humble Beginnings

In the early days of the internet's predecessor, ARPANET, the network was small. A simple protocol called the Exterior Gateway Protocol (EGP) was enough to handle routing between the few existing networks. EGP worked well, but it had a major flaw: it wasn't designed for a complex, sprawling network. As the internet exploded in growth during the late 1980s, EGP couldn't keep up and was prone to creating routing loops.

Lesson image

A more robust solution was needed. In 1989, the first version of BGP was created. It was designed from the ground up to be scalable and to prevent routing loops. The current version, BGP-4, was introduced in 1994 and has remained the standard for inter-domain routing on the internet ever since. Its longevity is a testament to its powerful and flexible design.

BGP vs. IGP

BGP is what's known as an Exterior Gateway Protocol (EGP) because it manages traffic between Autonomous Systems. But what about routing inside a single AS? For that, networks use an Interior Gateway Protocol (IGP).

Think of it this way: an IGP is like the local mail carrier who knows every street and address in your town. They are experts at finding the quickest, most efficient route within their specific delivery area. Protocols like Open Shortest Path First (OSPF) and Enhanced Interior Gateway Routing Protocol (EIGRP) are common IGPs. They are fast, efficient, and designed to work within a single network.

A routing mechanism called BGP (Border Gateway Protocol) is used on the Internet to communicate routing data between routers in various autonomous systems (AS).

BGP, on the other hand, is the international postal service sorting center. It doesn't need to know the street-by-street layout of every town. It just needs to know the best way to get a package from the sorting center in one region to the sorting center in another. BGP handles the high-level, big-picture routing, while IGPs handle the local details.

FeatureInterior Gateway Protocol (IGP)Border Gateway Protocol (BGP)
ScopeWithin a single Autonomous SystemBetween different Autonomous Systems
PurposeFind the fastest pathFind the best path based on policy
ComplexitySimpler, focused on speedMore complex, focused on control
ExampleOSPF, EIGRPBGP-4

This division of labor is crucial. It allows individual networks to manage their internal traffic efficiently with IGPs, while BGP provides the stable, scalable, and policy-driven framework that connects all of these networks into the single, global internet we use every day.