Network Control Plane

Routing Across the Internet

Wednesday, March 18, 2026

Discussion

Lesson Objectives

  1. Autonomous System and its role in network routing; understand boundaries and interior routing
  2. Intra-AS: OSPF’s use of LSAs for scalable routing
  3. Inter-AS: BGP as the primary protocol; exchanging routing information between different AS
  4. Different types of BGP peering relationships, eBGP and iBGP, and their significance in inter-AS communication.

Textbook Readings

  • \(5.3\) Intra-AS Routing in the Internet: OSPF (Open Shortest Path First)
  • \(5.4\) Routing Among the ISPs: BGP

Recap

Link State Routing

  • Routers flood LSAs
  • Global knowledge of network topology
  • Dijkstra’s algorithm to compute shortest paths

Distance Vector

  • Share information with neighbors only
  • Iterative updates!
  • Loops possible until convergence

Autonomous Systems (AS)

Why Autonomous Systems?

  • How big is the Internet? 🌍
  • What if every router shared full routing state? 🤯
  • Could we group certain routers?
  • And then share only reachability between groups?
  • Autonomous Systems (AS) to the rescue!

What is an AS?

  • A network (or set) under single administrative control 🏢
  • Clear borders at edge routers; has an AS number (ASN)
  • Goals: scalability, policy independence, fault containment
  • What is your current AS?
  • Which AS is the biggest? How many addresses does it cover?

Intra-AS vs Inter-AS Responsibilities

  • Intra-AS: pick efficient internal paths; optimize performance/availability
  • Inter-AS: exchange reachability & enforce policy/economics 💸
  • Different metrics, objectives, and protocols by design

Intra-AS Routing Protocols

Intra-AS Protocols

  • RIP (Distance Vector), OSPF (Link State), IS-IS (similar LS)
  • EIGRP (DV-based; historically proprietary)
  • OSPF is highly scalable, feature-rich

OSPF Core Mechanics

  • Flood link-state info (LSAs) to build a shared topology map
  • Run Dijkstra to compute shortest paths → forwarding table
  • Supports message authentication 🔐

OSPF Hierarchy & Areas

  • Area 0 (backbone) connects all other areas
  • Internal routers: entirely inside one area
  • ABR: between areas; summarizes & advertises to backbone
  • ASBR: connects to other ASes; injects external routes
  • Flooding stays within an area; summaries cross areas

Inter-AS Routing Protocols

What protocols exist?

  • EGP (Exterior Gateway Protocol)
  • IDRP (Inter-Domain Routing Protocol)
  • NIRA (Next Internet Routing Architecture)
  • RIFT (Routing in Fat Trees)
  • LISP (Locator/ID Separation Protocol)
  • BGP (Border Gateway Protocol)

Why BGP?

  • Path-vector: “Here I am, who I can reach, and how” 🧭
  • Prioritizes policy & business relationships over pure performance
  • The only inter-AS routing protocol in practice

BGP Basics

  • Peers exchange reachability info (prefixes) + attributes
  • Uses TCP (port 179) for reliable transport

Textbook 5.2

eBGP

  • Peers between different autonomous systems
  • Only advertises the single best path per prefix to neighbors
  • Path-vector: advertises prefixes (NLRI) with attributes (AS-PATH, NEXT-HOP)
  • Loop prevention: reject routes that contain your own ASN in AS-PATH
  • Policy-driven: import/export filters decide what to learn/advertise; avoid unintended transit
  • Edge learns from neighbors via eBGP, then distributes internally via iBGP

iBGP

  • distribute external routes internally
  • spread exits - reachability!
  • does not change AS-PATH

What exactly is being advertised?

  • Prefix (NLRI): destination network (CIDR)
  • AS-PATH: sequence of ASNs traversed to reach the prefix
  • NEXT-HOP: IP of the border router to reach the next AS

Textbook 5.2

Populating Forwarding Tables: Hot Potato

  • Exit the AS at the closest egress router 🥔🔥
  • Minimizes internal cost; may increase total path length
  • Chosen via attribute ordering + local policy (e.g., LOCAL_PREF, AS-PATH)

Textbook 5.2

Intra-AS vs Inter-AS

  • Policy: core in inter-AS; limited inside an AS
  • Scale: OSPF hierarchy within AS; BGP summarization between ASes
  • Performance: intra-AS optimizes metrics; inter-AS prioritizes policy

Review

OSPF LSAs always flood across the entire AS (all areas).

  1. True
  2. False

Which statement about iBGP is correct?

  1. It carries routes between different ASes
  2. It modifies AS-PATH to add the local AS
  3. It distributes external reachability within an AS
  4. It replaces OSPF for intra-AS forwarding

The main motivation for “hot potato” routing is to:

  1. Minimize end-to-end Internet latency
  2. Minimize internal AS cost to the nearest exit
  3. Satisfy legal requirements
  4. Evenly balance load across all links

Match the protocol model:

  1. OSPF — distance vector; BGP — link state
  2. OSPF — link state; BGP — path vector
  3. OSPF — flooding forbidden; BGP — flooding required
  4. OSPF — policy-based; BGP — performance-based

Why might an AS choose not to advertise a learned route to a neighbor?

  1. It breaks the TCP three-way handshake
  2. Privacy/trust/policy concerns or to avoid becoming transit
  3. iBGP forbids external advertisement
  4. OSPF area mismatch

Which BGP attribute tells a router where to send packets to reach the next AS?

  1. AS-PATH
  2. NEXT-HOP
  3. LOCAL_PREF
  4. MED

Key Takeaways

  • The Internet scales by grouping routers into ASes with local control
  • OSPF (intra-AS): link-state + Dijkstra; LSAs scoped by area; ABR/ASBR roles; Area 0 backbone
  • BGP (inter-AS): path-vector + policy; eBGP across ASes, iBGP inside an AS
  • Key attributes: AS-PATH and NEXT-HOP; selective advertisement is normal
  • Hot potato: exit at nearest egress to minimize internal cost—even if globally longer

Can BGP be hijacked?

  • What went wrong?
  • Was it accidental or malicious?
  • What was the intended effect?
  • What was the impact? Who suffered?
  • Who benefited?