Tutorial 9: Internet Routing in Practice Expanded
Learning Objectives
- Describe the Internet's hierarchical ISP structure (Tier-1, Tier-2, Tier-3) and their roles.
- Explain the concepts of peering, transit, and settlement-free interconnect.
- Analyze the role and operation of Internet Exchange Points (IXPs) in peering.
- Evaluate multi-homing strategies and their impact on routing and fault tolerance.
- Understand route aggregation, de-aggregation, and their implications for routing table growth.
- Examine real-world routing policies and how BGP attributes enforce them.
- Describe the function of route servers at IXPs.
- Apply BGP communities and attributes for traffic engineering.
- Analyze case studies of ISP and cloud provider routing architectures.
- Identify current challenges in Internet routing: table growth, convergence, and security.
Overview
While the previous tutorials covered the theoretical aspects of BGP and hierarchical routing, this tutorial focuses on the practical realities of Internet routing. The Internet is a complex ecosystem of thousands of Autonomous Systems (ASes) with diverse business relationships: customer-provider, peering, and transit. These relationships determine how routes are propagated and how traffic flows. Internet Exchange Points (IXPs) are critical for efficient peering. Multi-homing, route aggregation, and policy-based traffic engineering are everyday practices for network operators. This tutorial explores these topics in depth, using real-world examples and case studies to illustrate how the Internet's routing system operates in practice. We will also examine current challenges such as the growing size of the global routing table, convergence delays, and security issues.
Detailed Technical and Theoretical Content
1. The Internet's Hierarchical ISP Structure
The Internet's AS-level topology is often described as a hierarchy:
- Tier-1 ISPs: These are global backbone providers that have no upstream providers (they do not purchase transit). They peer with each other to exchange traffic. Examples: AT&T, Level 3, NTT, Deutsche Telekom. They form a dense peering mesh.
- Tier-2 ISPs: These are regional or national providers that purchase transit from Tier-1 ISPs and may also peer with other Tier-2 ISPs. They may also have their own customers (Tier-3 or enterprises).
- Tier-3 ISPs: These are local access providers that purchase transit from Tier-2 or Tier-1 ISPs. They typically serve end-users and small businesses.
This hierarchy allows the Internet to scale; most routing information is aggregated and propagated upward.
2. Peering, Transit, and Settlement-Free Exchange
AS relationships are governed by economic agreements:
- Transit: An AS pays another AS to carry its traffic to the rest of the Internet. The provider announces all routes to the customer and forwards traffic for the customer.
- Peering: Two ASes agree to exchange traffic between their customers (and themselves) without payment (settlement-free). They do not carry transit traffic for third parties. Peering reduces costs and improves performance.
- Customer-provider: The customer pays the provider; the provider announces the customer's routes.
These relationships are enforced by BGP policies: routes from a customer are usually advertised to all peers and providers; routes from a peer are only advertised to customers (not to other peers or providers) to avoid providing free transit.
3. Internet Exchange Points (IXPs) – Architecture and Operation
An IXP is a physical infrastructure (often a Layer 2 switch fabric) where multiple ASes meet to exchange traffic. At an IXP, each participant has a router connected to the exchange fabric, typically via a VLAN. They can establish BGP sessions (eBGP) with each other. IXPs reduce the need for transit, improving latency and cost. Popular IXPs include AMS-IX, DE-CIX, LINX. Many IXPs use route servers to facilitate peering: participants establish BGP sessions with the route server, which then reflects routes to other participants, reducing the number of BGP sessions required.
4. Multi-homing Strategies and BGP Load Balancing
An AS may connect to multiple upstream providers (multi-homing) for redundancy and performance. Multi-homing requires the AS to have its own ASN and PI (Provider Independent) address space (or use provider-aggregatable address space with careful configuration). With BGP, the AS can:
- Outbound load balancing: Use LOCAL-PREF to prefer one provider for certain destinations, or use BGP attributes to influence path selection.
- Inbound load balancing: Use AS-PATH prepending, MED, or communities to influence which provider is used to enter the AS.
- Failover: If one provider fails, BGP withdraws routes, and traffic automatically shifts to the other.
Multi-homing also introduces challenges: the AS must ensure that its announced prefixes are reachable from both providers, and it must handle asymmetric routing.
5. Route Aggregation and De-aggregation in Practice
Route aggregation (CIDR) is essential to keep the global BGP table manageable. However, operators often de-aggregate prefixes (announce more specific routes) for traffic engineering purposes, to attract traffic to specific entry points or to load balance. This practice contributes to the growth of the BGP table. The trade-off between aggregation and fine-grained control is a constant challenge.
6. Real-World Routing Policies and Their Implementation
Operators use BGP policies to enforce business agreements and optimize performance. Common policies include:
- Prefer customer routes over peer routes, and peer routes over provider routes: This is the typical "valley-free" routing.
- Manipulate LOCAL-PREF: Set higher LOCAL-PREF for routes from preferred providers or for specific prefixes.
- Filtering: Ingress filtering to reject invalid prefixes (e.g., using IRR or RPKI).
- Route tagging with communities: Use communities to signal to other ASes (e.g., do not advertise to peers, or set specific LOCAL-PREF).
7. Route Servers at IXPs
At an IXP, a route server is a BGP speaker that does not forward data but facilitates peering. It allows participants to exchange routes without having to establish a separate BGP session with every other participant. The route server operates under policies set by the IXP, often limiting announcements to certain prefixes. This greatly reduces the number of BGP sessions needed at large IXPs.
8. Traffic Engineering with BGP Communities and Attributes
BGP communities are widely used for traffic engineering. Examples:
- Prepend community: Tell a provider to prepend its AS to routes (to make them less preferred).
- MED community: Set MED values to influence inbound path selection.
- Filtering communities: Request that a provider does not advertise a route to certain peers.
Many ISPs publish their community policies so customers can influence routing.
9. Case Studies: Tier-1, Tier-2, and Cloud Provider Routing
- Tier-1 ISP: They maintain a full BGP table and have peering relationships with most other Tier-1s. They use BGP to manage traffic across their global backbone, often using MPLS in their core.
- Tier-2 ISP: They buy transit from Tier-1s and peer at IXPs. They may use BGP communities to influence how their upstream providers handle their routes.
- Cloud Provider (e.g., AWS, Azure): They have multiple data centers and BGP routing to announce their IP prefixes. They use BGP for traffic engineering, e.g., to direct users to the closest data center (using GEO-based routing with BGP anycast). They also use BGP communities to signal routing preferences.
10. Challenges: Routing Table Growth, Convergence, and Security
Current challenges in Internet routing:
- Table growth: The global BGP table exceeds 1 million prefixes. This strains router memory and CPU.
- Convergence: BGP convergence is slow (minutes) because of hold-down timers and the need to propagate updates across multiple ASes. This causes temporary black holes during failures.
- Security: Prefix hijacking and route leaks remain issues despite RPKI deployment.
- De-aggregation: Operators de-aggregate for traffic engineering, which worsens table growth.
Figure 1: Typical AS relationship and routing policy
Customer announces routes to Provider
Provider announces routes to all other providers and peers
Provider does NOT announce peer routes to other peers (valley-free)
Quiz
Answer each question; check your understanding by revealing the answer.
Question 1: What is a Tier-1 ISP?
Show Answer
A Tier-1 ISP is a provider that does not purchase transit from any other provider; it peers with other Tier-1s to reach the entire Internet.
Question 2: What is the difference between peering and transit?
Show Answer
Peering is a mutual exchange of traffic between two ASes without payment; transit is a paid service where one AS carries traffic for another.
Question 3: What is an Internet Exchange Point (IXP)?
Show Answer
An IXP is a physical infrastructure where multiple ASes connect to exchange traffic, typically via layer-2 switching.
Question 4: What is multi-homing?
Show Answer
Connecting an AS to multiple upstream providers for redundancy and performance.
Question 5: What is route aggregation (CIDR) and why is it important?
Show Answer
Route aggregation combines multiple prefixes into a single advertisement to reduce the size of the global routing table.
Question 6: What is AS-PATH prepending used for?
Show Answer
It is used to make a route appear longer (less preferred) to influence inbound traffic.
Question 7: In the ISP hierarchy, which type of ISP typically has no upstream providers?
Show Answer
Tier-1 ISPs.
Question 8: What is a route server at an IXP?
Show Answer
A route server facilitates BGP peering between many participants by reflecting routes, reducing the number of BGP sessions.
Question 9: How does an AS typically treat routes learned from a customer versus a peer?
Show Answer
Routes from customers are usually advertised to peers and providers; routes from peers are only advertised to customers (not to other peers or providers).
Question 10: What is the valley-free routing principle?
Show Answer
Paths should not go from provider to customer to provider (i.e., do not provide transit for peers).
Question 11: What is the primary benefit of peering at an IXP?
Show Answer
Reduces transit costs and latency by exchanging traffic directly.
Question 12: How can an AS influence inbound traffic?
Show Answer
By using AS-PATH prepending, MED, or communities to make routes less or more preferred.
Question 13: What is the main cause of BGP table growth?
Show Answer
De-aggregation for traffic engineering, multi-homing, and the growth of the Internet.
Question 14: How does route aggregation help with routing table size?
Show Answer
It reduces the number of entries by representing multiple subnets with a single prefix.
Question 15: What is a community in BGP?
Show Answer
A 32-bit tag that can be attached to routes to signal policies, e.g., to set LOCAL-PREF or filter routes.
Question 16: Why might an AS de-aggregate its prefixes?
Show Answer
To perform traffic engineering, such as attracting traffic to a specific entry point.
Question 17: What is the typical BGP convergence time on the Internet?
Show Answer
It can take several minutes due to hold-down timers and propagation delays.
Question 18: What is a common policy for a Tier-2 ISP regarding its upstream providers?
Show Answer
It may set LOCAL-PREF to prefer one provider for outbound traffic, and use prepending to influence inbound.
Question 19: What is the role of the IRR (Internet Routing Registry) in routing?
Show Answer
It is a database used to document routing policies and filters, helping to prevent misconfigurations.
Question 20: What is BGP route flap damping and why is it used?
Show Answer
It suppresses routes that flap frequently to reduce instability and CPU load.
Question 21: What is the relationship between a Tier-1 ISP and a Tier-2 ISP?
Show Answer
The Tier-2 typically purchases transit from the Tier-1.
Question 22: How does an IXP route server differ from a traditional router?
Show Answer
It only reflects BGP routes and does not forward data traffic.
Question 23: Why is RPKI important in practice?
Show Answer
It provides cryptographic validation of the origin AS of a prefix, preventing hijacking.
Question 24: What is the impact of de-aggregation on the BGP table?
Show Answer
It increases the number of prefixes, causing table growth and higher resource usage.
Question 25: How do cloud providers use BGP for global load balancing?
Show Answer
They announce the same IP prefix from multiple locations and use BGP attributes (e.g., AS-PATH prepending) to steer traffic to the nearest or best-performing data center.
Exercises
Work through these problems; sample solutions are hidden.
Exercise 1: Draw a simple topology showing a Tier-1 ISP, two Tier-2 ISPs, and three Tier-3 ISPs. Indicate peering and transit relationships with arrows.
Show Sample Solution
Tier-1 (T1) peers with another Tier-1 (not shown). T1 provides transit to Tier-2A and Tier-2B. Tier-2A and Tier-2B peer with each other. Tier-3A and Tier-3B buy transit from Tier-2A; Tier-3C buys transit from Tier-2B. Arrows: T1 -> Tier-2A/B (transit), Tier-2A <-> Tier-2B (peering), Tier-2A -> Tier-3A/B (transit), Tier-2B -> Tier-3C (transit).
Exercise 2: An enterprise AS has two upstream providers: ISP-A and ISP-B. It wants to use ISP-A as primary for outbound traffic. How can it achieve this using BGP attributes?
Show Sample Solution
Set LOCAL-PREF higher for routes received from ISP-A (e.g., 200) than for those from ISP-B (e.g., 100). This makes ISP-A the preferred path for all outbound traffic.
Exercise 3: Explain why a route server at an IXP does not need to forward data packets.
Show Sample Solution
The route server only exchanges BGP routing information; the actual data traffic is forwarded directly between the routers of the participating ASes over the IXP fabric (switches). The route server is not in the data path.
Exercise 4: An AS wants to attract inbound traffic from ISP-A but not from ISP-B. How can it achieve this using AS-PATH prepending?
Show Sample Solution
It can prepend its own AS number multiple times to routes announced to ISP-B, making the AS-PATH longer (less preferred). For ISP-A, it announces the normal path. Thus, ISP-A will be preferred.
Exercise 5: What is the effect of route aggregation on the routing table of an upstream provider? Provide an example.
Show Sample Solution
Aggregation reduces the number of prefixes the upstream provider must store. Example: If an AS announces 10.1.0.0/24, 10.1.1.0/24, and 10.1.2.0/24 separately, the upstream sees three routes. If they aggregate to 10.1.0.0/22, the upstream sees only one route.
Exercise 6: Compare the cost and performance trade-offs between using transit and peering.
Show Sample Solution
Peering is usually free (settlement-free) and provides lower latency and direct connectivity. Transit costs money and may introduce extra hops. Peering is beneficial when two ASes have a large volume of traffic between them.
Exercise 7: What is the role of BGP communities in a multi-homed AS? Provide a specific example of a community used to request prepending.
Show Sample Solution
Communities allow the AS to signal to its upstream providers. For example, a community 12345:1 might instruct the provider to prepend its AS once; 12345:2 might prepend twice. This helps the AS influence inbound traffic without manual configuration.
Exercise 8: Explain how an IXP can reduce the number of BGP sessions needed for a participant with 100 peers.
Show Sample Solution
Without a route server, the participant would need 100 separate eBGP sessions (one per peer). With a route server, the participant only needs one session to the route server, which then reflects routes to all other participants, reducing sessions to O(1) per participant.
Exercise 9: What is the valley-free routing violation and what can happen if an AS violates it?
Show Sample Solution
A violation occurs when an AS advertises a route from a peer to another peer (or provider), providing free transit. This can lead to financial loss (free transit) and possible routing loops. It is usually prevented by strict inbound and outbound filtering.
Exercise 10: A cloud provider wants to announce the same IP prefix (e.g., 198.51.100.0/24) from two data centers: one in New York and one in San Francisco. How can they use BGP to steer users to the closest data center?
Show Sample Solution
They can use BGP anycast: announce the same prefix from both locations. However, to influence routing, they can use AS-PATH prepending or MED to make one location appear more or less preferred. For proximity, they can manipulate the IGP metric to the NEXT-HOP, which influences BGP decision on the local router, but more commonly they rely on the natural propagation of the AS-PATH: the shorter path wins. They could also use BGP communities to signal to upstream providers. However, they often rely on the fact that the Internet will automatically route to the closest (in terms of BGP path length) location.
Exercise 11: How does route flap damping affect convergence? What are the downsides?
Show Sample Solution
Damping suppresses flapping routes, preventing instability. However, it can also suppress legitimate routes for too long, causing reachability issues. It has been disabled by many ISPs due to these side effects.
Exercise 12: Compare the routing policies of a Tier-1 ISP versus a small enterprise AS.
Show Sample Solution
A Tier-1 ISP peers with many other Tier-1s and buys no transit; its policies are complex, focusing on minimizing cost and maintaining peering relationships. A small enterprise AS typically buys transit from one or two providers and may have simple policies: prefer one provider for outbound, use prepending for inbound.
Homework Assignments
These questions require deeper thought and research. Write comprehensive answers.
Homework 1: Research the peering policies of a major Tier-1 ISP (e.g., AT&T, NTT). Explain what prefixes they announce, how they decide to peer, and what their BGP community offerings are.
Show Answer Outline
Discuss typical Tier-1 peering policies: they often have open peering policies at IXPs, require a minimum amount of traffic, and may have geographical restrictions. They announce their full customer prefixes. Communities include prepend options, no-export, etc.
Homework 2: Explain in detail the process of route propagation from a stub AS to the global BGP table. How does aggregation at each level reduce the number of prefixes?
Show Answer Outline
Stub AS announces its prefixes to its provider(s). Providers may aggregate prefixes from multiple customers. Tier-2 providers aggregate further and announce to Tier-1. The global table contains mostly aggregated prefixes, but de-aggregation for TE adds specifics.
Homework 3: Compare and contrast the use of route servers at IXPs with the use of route reflectors in iBGP. What are the similarities and differences?
Show Answer Outline
Both reduce the number of BGP sessions. Route reflectors are used within an AS (iBGP) to reduce full mesh; route servers are used at IXPs between different ASes to facilitate eBGP peering. Both reflect routes, but route servers are not in the data path and have different policy scopes.
Homework 4: Analyze the impact of de-aggregation on the growth of the global BGP table. Provide statistics and discuss the trade-offs between traffic engineering and table size.
Show Answer Outline
De-aggregation increases the number of prefixes (e.g., from /24 to /25 or /26). This causes memory and CPU pressure on routers. Operators de-aggregate to control inbound traffic, but the cost is increased table size. Some efforts like BGP table growth monitoring and filtering are used.
Homework 5: Design a BGP policy for a multi-homed enterprise that wants to use two providers (P1 and P2) and also peer with a content delivery network (CDN) at an IXP. Specify the attributes and filtering rules for outbound and inbound traffic.
Show Answer Outline
Set LOCAL-PREF: P1 = 200 (primary), P2 = 100 (backup), CDN peer = 150. For inbound, prepend P2's AS to make it less preferred. Use communities to signal to P1 and P2 to limit advertisement. Ensure that routes learned from CDN peer are not advertised to P1/P2 (valley-free).
Homework 6: Explain the concept of "BGP anycast" and provide two use cases (e.g., DNS, CDN). How does it work in terms of routing?
Show Answer Outline
Anycast announces the same IP prefix from multiple locations. The Internet routes traffic to the nearest (in BGP terms) location. Use cases: DNS root servers, CDN edge nodes. Traffic is load-balanced geographically.
Homework 7: Discuss the security challenges in Internet routing and how RPKI and BGPsec address them. What are the limitations of these solutions?
Show Answer Outline
Challenges: prefix hijacking, route leaks. RPKI provides origin validation, but not path validation. BGPsec provides path validation but is computationally heavy and not widely deployed. Limitations: adoption rate, cost, and complexity.
Homework 8: Investigate the role of the IRR (Internet Routing Registry) and how operators use it for route filtering. Provide an example of an IRR entry.
Show Answer Outline
IRR databases contain routing policies (e.g., aut-num, route objects). Operators use them to build filters; e.g., an ISP may accept only routes that match the IRR records of their customers. Example: a route object specifies the AS and prefix.
Homework 9: Compare the routing architectures of a traditional Tier-2 ISP with a large cloud provider (e.g., AWS). What are the main differences in scale, policy, and traffic engineering?
Show Answer Outline
Tier-2 ISP focuses on providing connectivity to customers, uses BGP for transit and peering. Cloud provider has massive internal networks, uses BGP for VPC routing, anycast for services, and relies on SDN for internal traffic. Policy differs: cloud provider may prefer to keep traffic within its backbone.
Homework 10: Explain the concept of "route reflector clients" in iBGP and how they differ from non-clients. How does a route reflector handle routes from clients vs non-clients?
Show Answer Outline
Clients are iBGP peers that only peer with the route reflector. Non-clients are full iBGP peers. The RR reflects routes from clients to all other clients and non-clients; routes from non-clients are reflected to clients but not to other non-clients (to avoid loops).
Homework 11: Analyze the BGP convergence process after a link failure between two Tier-1 ISPs. What factors affect the convergence time and how can it be improved?
Show Answer Outline
Failure detection via BGP hold timer (often 180s). Then updates propagate. Factors: hold timer, MRAI (Minimum Route Advertisement Interval), path exploration. Improvements: BFD for fast detection, lowering timers, using BGP fast convergence features (like BGP Pic).
Homework 12: Research the concept of "BGP communities" and how they are used for traffic engineering in practice. Provide at least three examples of well-known communities used by major ISPs.
Show Answer Outline
Examples:
- NTT communities: prepend once (xxxx:1), prepend twice (xxxx:2), no-export (xxxx:7).
- Level 3 communities: set LOCAL-PREF (e.g., 3356:200 for high preference).
- Cogent communities: for prepending and filtering.
Discuss usage.
Summary
This tutorial provided a practical view of Internet routing, covering the ISP hierarchy, peering and transit, IXPs, multi-homing, route aggregation, and real-world policies. We examined how BGP attributes and communities are used for traffic engineering, and explored case studies of different network types. We also discussed current challenges such as routing table growth, convergence, and security. Understanding these practical aspects is essential for network operators and engineers who manage Internet-connected networks. The next tutorial will delve into Software-Defined Networking and OpenFlow, which represent a paradigm shift in control-plane architecture.