4. Network Layer

Exterior Routing

Inter-domain routing with BGP, policies, path selection, route advertisement, and scalability challenges on the Internet.

Exterior Routing

Hey students! πŸ‘‹ Ready to dive into one of the most fascinating aspects of how the internet actually works? Today we're exploring exterior routing, specifically focusing on the Border Gateway Protocol (BGP) - the protocol that literally holds the entire internet together! By the end of this lesson, you'll understand how different networks communicate with each other across the globe, how routing policies shape internet traffic, and why BGP is both incredibly powerful and surprisingly fragile. Think of it as learning the "diplomacy" of the internet world! 🌐

Understanding Autonomous Systems and Inter-Domain Routing

Before we jump into BGP, let's understand what we're dealing with. Imagine the internet as a massive city made up of different neighborhoods. Each neighborhood has its own local government (routing protocol) that manages traffic within its boundaries. But what happens when someone from one neighborhood wants to visit another? That's where exterior routing comes in!

An Autonomous System (AS) is essentially one of these "neighborhoods" - a collection of networks under a single administrative control. Your internet service provider (ISP) operates an AS, Google runs multiple ASes, and even your university might have its own AS. Each AS is identified by a unique number called an ASN (Autonomous System Number). For example, Google's main AS is AS15169, while Cloudflare uses AS13335.

Within each AS, interior routing protocols like OSPF or RIP handle local traffic efficiently. But when data needs to travel between different ASes - say from your home network to Netflix's servers - we need exterior routing. This is where BGP (Border Gateway Protocol) becomes the hero of our story! πŸ¦Έβ€β™‚οΈ

The key difference between interior and exterior routing is like the difference between knowing how to navigate your hometown versus knowing how to plan a cross-country road trip. Interior protocols focus on finding the fastest path within a known area, while exterior protocols must consider political boundaries, policies, and business relationships between different network operators.

The Border Gateway Protocol (BGP) Deep Dive

BGP is often called the "protocol that runs the internet," and for good reason! It's the standardized exterior gateway protocol that enables autonomous systems to exchange routing information and make decisions about the best paths for data to travel across the global internet.

Think of BGP as the internet's postal system. When you send a letter, you don't need to know every single road between your house and the destination - you just need to know which post office to give it to, and that post office figures out the next step. Similarly, BGP routers (called BGP speakers) don't need to know every detail about distant networks; they just need to know which neighboring AS can best handle traffic destined for specific networks.

BGP operates on path vector principles, meaning it doesn't just advertise distance to destinations like some interior protocols do. Instead, it advertises the complete path (sequence of ASes) that traffic would take to reach a destination. This is crucial because it prevents routing loops - if an AS sees its own number in a path advertisement, it knows that route would create a loop and rejects it.

The protocol runs over TCP port 179, establishing reliable connections between BGP peers. This is different from many interior protocols that use UDP, but it makes sense because BGP needs to maintain consistent routing tables across the entire internet, and losing routing updates could be catastrophic! πŸ’₯

BGP Policies and Business Relationships

Here's where BGP gets really interesting - it's not just about finding the shortest path! BGP is heavily influenced by business relationships and routing policies. Unlike interior protocols that focus purely on technical metrics, BGP decisions are often driven by economics and politics.

There are three main types of business relationships between ASes:

Customer-Provider relationships are like paying for internet service. A smaller AS (customer) pays a larger AS (provider) for internet connectivity. The provider agrees to carry the customer's traffic to anywhere on the internet. For example, a local ISP might be a customer of a larger regional ISP.

Peer-to-Peer relationships are like mutual agreements between ASes of similar size. They agree to exchange traffic destined for each other's networks for free, but they don't provide transit to each other's customers. Think of major ISPs like Verizon and AT&T peering with each other.

Sibling relationships exist between ASes owned by the same organization, where they freely exchange all traffic.

These relationships directly influence routing decisions! An AS will prefer to send traffic through customers (because they get paid) rather than providers (where they have to pay). This creates a natural hierarchy in internet routing that doesn't always result in the shortest path, but does create a sustainable economic model for the internet. πŸ’°

Path Selection and Route Advertisement

BGP's path selection process is like a complex decision-making algorithm that considers multiple factors. When a BGP router receives multiple route advertisements for the same destination, it doesn't just pick the shortest one. Instead, it follows a specific decision process:

First, it prefers routes with the highest local preference - this is a value set by network administrators to implement their local policies. Then it considers the AS path length - shorter paths are generally preferred, but this can be overridden by policy. The origin type matters too - routes learned directly from the originating AS are preferred over those learned through other means.

The Multi-Exit Discriminator (MED) allows an AS to suggest which entry point neighbors should use when sending traffic. It's like having multiple doors to your house and putting up a sign saying "please use the front door." However, MEDs are only compared between routes from the same neighboring AS.

Route advertisement works through a careful process of filtering and modification. When an AS learns about a route, it doesn't automatically advertise it to all neighbors. Instead, it applies export policies based on business relationships. A route learned from a customer might be advertised to everyone (providers, peers, and other customers), but a route learned from a provider might only be advertised to customers.

This selective advertisement is crucial for internet stability. Without proper filtering, an AS could accidentally become a transit provider for traffic it's not equipped to handle, potentially causing network congestion or even outages! 🚨

Scalability Challenges and Internet Growth

As the internet has grown from a few thousand networks to over 100,000 autonomous systems today, BGP has faced enormous scalability challenges. The global BGP routing table now contains over 900,000 routes, and this number continues to grow exponentially!

One major challenge is routing table size. Every BGP router needs to store and process information about all reachable networks on the internet. This requires significant memory and processing power, especially for routers at major internet exchange points that handle traffic from hundreds of ASes.

Convergence time is another critical issue. When a network failure occurs somewhere on the internet, BGP needs to find alternative paths and update routing tables globally. This process can take several minutes, during which some traffic might be lost or take suboptimal paths. For comparison, interior routing protocols typically converge in seconds!

Route flapping occurs when a network connection becomes unstable, causing routes to be repeatedly advertised and withdrawn. This can create a cascade effect, forcing BGP routers worldwide to constantly recalculate paths. To combat this, BGP implements route dampening - temporarily suppressing routes that change too frequently.

The internet's growth has also led to IPv4 address exhaustion, forcing more aggressive address aggregation and the gradual adoption of IPv6. BGP must handle both address families simultaneously, adding complexity to an already challenging protocol.

Despite these challenges, BGP has proven remarkably resilient. The internet continues to function even as it grows by thousands of new networks each year, testament to BGP's robust design and the careful management by network operators worldwide! 🌍

Conclusion

Exterior routing with BGP is the backbone that enables our globally connected internet. We've explored how autonomous systems use BGP to exchange routing information while respecting business relationships and policies. The protocol's path vector approach prevents loops while allowing for complex policy-based routing decisions. Although BGP faces significant scalability challenges as the internet grows, its flexibility and robustness have made it the foundation of inter-domain routing for decades. Understanding BGP gives you insight into both the technical and economic forces that shape how data flows across the internet every day!

Study Notes

β€’ Autonomous System (AS) - A collection of networks under single administrative control, identified by a unique ASN

β€’ BGP (Border Gateway Protocol) - The standardized exterior gateway protocol that enables routing between autonomous systems

β€’ Path Vector Protocol - BGP advertises complete AS paths to destinations, preventing routing loops

β€’ Business Relationships - Customer-provider, peer-to-peer, and sibling relationships influence routing decisions

β€’ Local Preference - Highest priority factor in BGP path selection, set by local policy

β€’ AS Path Length - Generally prefer shorter paths, but can be overridden by policy

β€’ Multi-Exit Discriminator (MED) - Suggests preferred entry points to neighboring ASes

β€’ Route Filtering - Selective advertisement based on business relationships and policies

β€’ Convergence Time - BGP can take minutes to converge after network changes

β€’ Route Dampening - Suppresses frequently changing routes to improve stability

β€’ Global Routing Table - Contains over 900,000 routes and continues growing

β€’ TCP Port 179 - BGP establishes reliable connections between peers

β€’ Export Policies - Rules determining which routes to advertise to which neighbors

Practice Quiz

5 questions to test your understanding

Exterior Routing β€” Computer Networks | A-Warded