How the Internet works

Routing, chapter 17 of 36

Securing the Routing System

Origin validation checks one AS number, the last one, and its own RFC calls it protection against misconfiguration.

border1 is about to put our SYN onto the peering LAN toward 203.0.113.20, because an UPDATE from that address said that 192.0.2.0/24 lies behind AS64505. Nothing in that message proved it. Had some other network announced 192.0.2.0/25 and 192.0.2.128/25 that evening, and had the announcement reached AS64500, border1 would have sent the SYN to the longer prefixes without asking whose they were.

25 octets
the DER payload of AS64505's ROA, before a CMS signature wraps it
67.2%
of routed IPv4 space RPKI Valid on 12 November 2026, against 15.9 percent in April 2019
201 of 777
IPv4 ASes tested without NAT that let spoofed sources out, in the year to 13 November 2026

Who may originate 192.0.2.0/24

One announcement checked against AS64505's ROA as RFC 6811 defines it. Pick a hijack or compose one, loosen the maxLength, and see where border1 would send the SYN to 192.0.2.80 with and without ROV filtering.

Why does border1 believe AS64505 at all?

The BGP specification tells border1 how to parse an UPDATE and how to rank routes. No rule asks whether AS64505 holds 192.0.2.0/24. Sandra Murphy's analysis of 2006 names the gap: "no mechanism has been specified within BGP to validate the authority of an AS to announce NLRI information" (RFC 4272, Section 3).

For decades the protection was operator practice. A provider filters what its customers may announce, usually with lists generated from the routing registries. Because BGP compares routes only for the same prefix, a false /25 and the true /24 both reach the FIB, and longest match sends the lower half of the block to the /25.

What goes wrong when routers believe everything?

On 25 April 1997 a border router of AS 7007 received about 23,000 routes over a session without an inbound filter. It de-aggregated them into more-specifics and stripped their AS paths. More specific than the genuine routes and one AS long, they won wherever they arrived.

On 24 February 2008 Pakistan Telecom (AS17557) announced 208.65.153.0/24 inside YouTube's 208.65.152.0/22. PCCW Global passed it on and withdrew it after more than two hours [RIPENCC2008]. In June 2019 a BGP optimizer split Cloudflare's 104.20.0.0/20 into two /21s that Verizon accepted. AT&T, which also dropped RPKI-invalid routes, kept them out [Levy2019]. They were Invalid, because Cloudflare had signed a maximum length of 20 [Strickx2019].

How does border1 turn ROAs into a verdict?

The validator hands it Validated ROA Payloads: prefix, maximum length, origin AS. A VRP covers a route whose prefix equals or lies inside its own, and matches it if the route is also no longer than the maximum length and has the same origin. Matched is Valid, covered but never matched is Invalid, and uncovered is NotFound (RFC 6811, Section 2).

The verdict is only a label. An Invalid route kept at low preference protects nothing, because longest match still forwards to it (RFC 7115, Section 5). So AS64500 drops Invalid routes from eBGP neighbors.

What does maxLength give away?

Origin validation checks only the last AS. If AS64511 announces 192.0.2.0/24 with the path 64511 64505, every validator calls it Valid, though its longer AS_PATH limits how far it spreads. Had AS64505 signed a maxLength of 25, the same forged path for 192.0.2.0/25 would be Valid, have no genuine competitor, and win by longest match wherever it propagated. RFC 9319, Section 3 calls this the forged-origin sub-prefix hijack.

In June 2017, 12 percent of the prefixes in ROAs carried a maxLength above their length, and 84 percent of those authorized sub-prefixes that the legitimate AS did not announce (RFC 9319, Section 4). The advice is minimal ROAs.

How much of the Internet validates?

Most routed address space now has a ROA, and most users still sit behind networks that do not act on it. A ROA protects a prefix only where routers drop Invalid routes. APNIC estimates that share from the user's side with an object reachable only through an RPKI-invalid route. In the week to 11 November 2026, 31.4 percent of sampled users worldwide could not fetch it, 51.5 percent in Europe [APNIC2026].

Enforcement hands power to whoever controls a ROA. On 3 January 2024 someone logged into Orange EspaƱa's RIPE NCC account with the password "ripeadmin" and published ROAs that made its routes Invalid [Madory2024].

Who checks the source address of our SYN?

bng1 does. Route validation says nothing about the source a packet claims. After the SYN floods of 1996, Paul Ferguson and Daniel Senie wrote what became BCP 38: a router that connects a customer network forwards only packets whose source lies in that customer's prefixes (RFC 2827, Section 3). bng1 knows the addresses it gave out, so our SYN from 198.51.100.77 passes.

Access lists need maintenance by hand, so BCP 84 describes filters that read the FIB. Strict RPF can drop legitimate packets where routing is asymmetric. Loose RPF only checks that some route exists, and BCP 84 calls the name "a misnomer in a sense" (RFC 3704, Section 2.4).

RIR trust anchorAS64505 routerAS64505 CAborder1published ROAvalidator in AS64500 certifiessignsRRDP or rsyncRTRUPDATE
From the book: From the trust anchor to border1: who signs, who fetches, who decides

The book keeps asking

This chapter has 5,738 words and 14 questions. These 8 are answered only in the book and the audiobook.

  • Is every bad route a hijack?
  • Who can say which AS may originate 192.0.2.0/24?
  • What does AS64505's ROA contain?
  • How do the validated payloads reach border1?
  • Why did BGPsec stay on paper?
  • Can a BGP session know that it carries a leak?
  • What will ASPA add?
  • How does border1 protect its own sessions?

Open the sources

  • RFC 6480 An Infrastructure to Support Secure Internet Routing 2012, Informational
  • RFC 9582 A Profile for Route Origin Authorizations (ROAs) 2024, Proposed Standard
  • RFC 6811 BGP Prefix Origin Validation 2013, Proposed Standard
  • RFC 8210 The Resource Public Key Infrastructure (RPKI) to Router Protocol, Version 1 2017, Proposed Standard
  • RFC 7908 Problem Definition and Classification of BGP Route Leaks 2016, Informational
  • RFC 9234 Route Leak Prevention and Detection Using Roles in UPDATE and OPEN Messages 2022, Proposed Standard
  • RFC 8205 BGPsec Protocol Specification 2017, Proposed Standard
  • RFC 2827 Network Ingress Filtering: Defeating Denial of Service Attacks which employ IP Source Address Spoofing 2000, Best Current Practice, BCP 38

All 63 documents this chapter cites, each with a link to its publisher and a copy kept here.

Routing, chapter 18 of 36

MPLS and Segment Routing

Routing, chapter 19 of 36

Anycast and CDNs

Transport, chapter 20 of 36

UDP: Eight Bytes of Header

Transport, chapter 21 of 36

TCP: The Connection

Transport, chapter 22 of 36

Congestion Control: From Collapse to BBR

Transport, chapter 23 of 36

Beyond TCP: SCTP, DCCP, and Multipath

Names and Trust, chapter 24 of 36

DNS: The Namespace and the Wire Format

Names and Trust, chapter 25 of 36

Resolvers, DNSSEC, and Encrypted DNS

Names and Trust, chapter 26 of 36

TLS 1.3: The Handshake

Names and Trust, chapter 27 of 36

Certificates and the Web PKI

Applications, chapter 28 of 36

HTTP: Semantics and HTTP/1.1

Applications, chapter 29 of 36

HTTP/2: Multiplexing over One Connection

Applications, chapter 30 of 36

QUIC: A Transport in Userspace

Applications, chapter 31 of 36

HTTP/3: The Web on QUIC

Applications, chapter 32 of 36

Mail: SMTP and Forty Years of Patches

Applications, chapter 33 of 36

Time, Shells, and Files: NTP, SSH, Telnet, and FTP

The Whole Path, chapter 34 of 36

Measuring and Debugging the Path

The Whole Path, chapter 35 of 36

The Whole Journey, Byte by Byte

The Whole Path, chapter 36 of 36

Ossification and What Comes Next

You have reached the server. The book goes further.

Everything on this site is a short version. Follow the Packet is the long one: 36 chapters and about 280,000 words, with every protocol fact traced to the section of the standard that defines it, every byte dump built by a script you can run, and a directory of more than a thousand cited documents. It comes as a printable book and as an audiobook.

Hear how chapter 1 opens. 70 seconds, narrated by a synthetic voice.

Get the book or the audiobook Read the start of chapter 1 Browse every source

Cover of Follow the Packet: How the Internet Works, Layer by Layer, from ARPANET to QUIC, by Wolfgang Kerschbaumer

The signup uses double opt-in. Every message includes an unsubscribe link.

Published by Sysinit Press. The public addresses, AS numbers and names of the scenario come from ranges reserved for documentation, and the home network uses private addresses, so the site describes no real network. RFC texts are copied unchanged from the RFC Editor.