Files
ferrix/slides/sections/01-addresses.md
T
Rayhaan JaufeerallyandClaude Fable 5.1 1399cbd39f slides: "Hands-on BGP", restructured into five sections
- Title is now "Hands-on BGP"; the AS-path diagram is gone from the cover.
- Sections: IPv6 addresses and prefixes; where AS numbers and prefixes
  come from (IANA, RIRs, the RIPE database, IRR vs RPKI); BGP and the
  bytes of an UPDATE; IP transit vs Internet exchanges (the peering LAN as
  an Ethernet segment, route servers); the lab (ferrix, pr01.rue, SwissIX,
  NL-ix, France-IX, DE-CIX, transit).
- The UPDATE walked through in section 3 is a real 94-byte capture from
  ferrix for 2a0d:d741:1::/48. Vertical slides light up one part at a
  time with its decode; the generator asserted every quoted number
  against the capture. Session counts come from the tracked bird.conf,
  the route6 object from the RPSL file, SwissIX's LAN from PeeringDB.
- New components: focusable bytes, decode table, prefix bits, and SVG
  diagrams drawn in the theme's colours.
- Opening index.html straight from disk used to give a title and empty
  panels, because browsers block the module and the section files there.
  The page now explains that, and also reports a failed reveal.js load.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-20 21:41:31 +02:00

2.5 KiB

IP addresses and prefixes

Notes: Section 1. IPv6 only: the whole lab is IPv6, and the ideas carry over to IPv4 unchanged (32 bits, dotted decimal, /24 where we say /48).


An IPv6 address is 128 bits

2a0d:d741:0001:0000:0000:0000:0000:0001     eight groups of 16 bits, in hex
2a0d:d741:1:0:0:0:0:1                       drop leading zeros in a group
2a0d:d741:1::1                              one run of zero groups becomes ::

:: may appear once, or the address would be ambiguous.

Notes: Ask: why only once? Because 2a0d::1::1 could put the zeros in several places.


A prefix is a range of addresses

2a0d:d741:1::/48

2a0d:d741:0001xxxx:xxxx:xxxx:xxxx:xxxx

The first 48 bits are fixed. The other 80 are yours.

Notes: 2^80 addresses in one student prefix. About 1.2 million billion billion. The /n is a count of leading bits, nothing more.


Prefixes nest

Prefix Who Holds
2a0d:d740::/29 the network we borrow from 524,288 /48s
2a0d:d741::/40 this lab 256 /48s
2a0d:d741:<n>::/48 you 65,536 /64s
…/64 one LAN the hosts on it

<n> is your student number, written in hex.

Notes: Student 10 is 2a0d:d741:a::/48, student 16 is 2a0d:d741:10::/48. A /40 holds exactly 256 /48s, which caps the class size at 255.


The most specific route wins

2a0d:d740::/29     via  AS210036           the aggregate
2a0d:d741::/40     via  AS210036           the lab
2a0d:d741:1::/48   via  AS210036 AS…       student 1   <-- chosen for 2a0d:d741:1::1

Routers forward on the longest matching prefix, before anything else is compared.

Notes: This is the single most important forwarding rule for today. It is also why a hijacker announces a more specific prefix: it wins everywhere it is accepted, no matter how good the legitimate route is.


How small can a prefix be?

IPv6: up to /48
IPv4: up to /24
anything longer: filtered by almost everyone

Not a protocol rule. A convention, so the global table stays finite.

Notes: Which is why the lab hands out /48s: the smallest thing the Internet at large will carry. The global IPv6 table is around 230k routes, IPv4 around 1M.