How the Internet works

Routing, chapter 16 of 36

Peering, Transit, and the Money

Which way a packet goes between networks is settled before it arrives, by contracts and the filters written from them.

border1 hands our SYN to a switch that belongs neither to AS64500 nor to AS64505, and the switch passes it on without changing a byte. Neither network bills the other for this frame. Had the exchange been down, the same SYN would have gone through AS64510 and counted toward a transit bill that AS64500 pays per Mbit/s, sampled every five minutes.

79,908
ASes in the IPv4 routing system on 12 November 2026, where RFC 1930 counted under 600
95th
percentile of a month of five-minute samples: the usual way transit is billed, per Mbit/s
34.28 Tbit/s
peak of one exchange, IX.br São Paulo, in 30-minute averages, week to 12 November 2026

Who pays whom, and which path is allowed

Our three networks plus AS64502 and AS64503, added for the figure. Pick a source and a destination, then let AS64505 prepend or take the exchange link down, and watch who pays.

What exactly is an autonomous system?

In 1982 Eric Rosen of BBN described autonomous systems whose internal routing would be "a private matter" (RFC 827). By 1996 the definition had moved from routers to policy: an AS is a connected group of prefixes with a "SINGLE and CLEARLY DEFINED routing policy" (RFC 1930, Section 3). A site with one provider needs no AS of its own.

RFC 1930 counted "a little under 600" ASes in the routing table and expected IDRP to replace BGP. On 12 November 2026 the CIDR Report counted 79,908 ASes in the IPv4 routing system [CIDRReport2026], all of them still carried by BGP-4.

Who pays whom?

A customer pays a provider for transit, and the provider carries its traffic to every destination it knows. Two peers carry traffic only between their own networks and their customers, and in the settlement-free case neither pays. Lixin Gao modeled these relationships in 2001, and AT&T's records confirmed as much as 99.1 percent of her inferences about its neighbors [Gao2001].

Transit is metered. The usual method samples the port every five minutes for a month, discards the highest 5 percent, and bills the 95th percentile at a price per Mbit/s [ReddyvariRaja2014].

Which routes may a network pass on?

An AS announces its own and its customers' routes to everyone, because traffic toward a customer is traffic the customer pays for. Routes from providers and peers usually go to customers only. Every path therefore climbs zero or more times, crosses at most one peering link, and descends. Gao called such paths valley-free [Gao2001].

Had AS64500 announced its peer route to AS64510, the path 64510 64500 64505 would contain a valley, and AS64500 would carry traffic from its provider to its peer and pay the provider for the privilege. RFC 7908, Section 3.4 calls this a type 4 route leak.

What makes a network tier 1?

No RFC defines the term. In use, a tier-1 network reaches every destination through its customers and settlement-free peers and buys transit from nobody, so all of them must peer with each other. CAIDA's dataset of 1 November 2026 infers a clique of 18 ASes. AS6939 has 8,084 inferred peers against 81 for AS3356, yet it is not in the clique, and CAIDA infers two providers for it [ASRank2026].

Why talk to a route server instead of each peer?

An open peering policy at an exchange with n routers means up to n(n-1)/2 BGP sessions (RFC 7948, Section 2), or 499,500 at 1,000 routers. With a route server, each member opens one session and receives the routes of everybody else.

The route server forwards no traffic and "is therefore not a router" (RFC 7947, Section 1). It passes the NEXT_HOP on unchanged, so traffic still flows directly between members. At AMS-IX on 13 November 2026, rs1 held 813 established IPv4 sessions [AMSIX2026].

Why do networks stop peering?

In the documented disputes, the sides disagreed about who should pay for the traffic. In October 2005 AS3356 of Level 3 and AS174 of Cogent stopped reaching each other. Level 3 said that Cogent sent "far more traffic" than it received [Choksi2005]. On 28 October the two kept the exchange settlement-free under a modified agreement [Cogent2005].

The latest dispute went to court. A Meta subsidiary declared that it would keep using more than 20 private interconnects with Telekom free of charge, as settlement-free peering. On 10 February 2026 the Oberlandesgericht Düsseldorf confirmed more than 30 million euros for Telekom [OLGDuesseldorf2026]. That judgment may not be final.

How do you drop a flood before it arrives?

If an attack on 192.0.2.80 fills AS64505's ports at the exchange, AS64505 can announce 192.0.2.80/32 with the BLACKHOLE community and ask its neighbors to drop that traffic before it reaches the congested links. RFC 7999 defines BLACKHOLE as 65535:666, encoded 0xFFFF029A, and calls 666 a value "commonly associated with BGP blackholing" (RFC 7999, Section 5).

The attacked address goes offline, and the links stay usable for everything else. Of 49 exchanges with a blackholing service that Giotsas and colleagues identified, 47 used 65535:666 [Giotsas2017].

border1, AS64500.10IXP fabric203.0.113.0/25AS64505 router.20rs1 and rs2, AS64496.1 and .2SYNSYNBGP with members
From the book: The peering LAN: data goes member to member; the route servers only talk BGP

The book keeps asking

This chapter has 5,723 words and 13 questions. These 6 are answered only in the book and the audiobook.

  • What is an Internet exchange, physically?
  • What does our SYN look like on the peering LAN?
  • How do two networks agree to peer?
  • How does AS64500 know what AS64505 may announce?
  • What else should a border router refuse?
  • How does a network steer traffic that others send to it?

Open the sources

  • RFC 1930 Guidelines for creation, selection, and registration of an Autonomous System (AS) 1996, Best Current Practice, BCP 6
  • [Gao2001] On Inferring Autonomous System Relationships in the Internet. IEEE/ACM Transactions on Networking 9(6), pp. 733-745, December 2001 2001, paid; a course copy is free at the URL given
  • RFC 7947 Internet Exchange BGP Route Server 2016, Proposed Standard
  • RFC 7948 Internet Exchange BGP Route Server Operations 2016, Informational
  • RFC 2622 Routing Policy Specification Language (RPSL) 1999, Proposed Standard
  • RFC 7454 BGP Operations and Security 2015, Best Current Practice, BCP 194
  • RFC 1998 An Application of the BGP Community Attribute in Multi-home Routing 1996, Informational
  • RFC 7999 BLACKHOLE Community 2016, Informational

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

Routing, chapter 17 of 36

Securing the Routing System

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.