Files
ferrix/slides/sections/01-addresses.md
T
Rayhaan JaufeerallyandClaude Fable 5.1 9d6996c6c1 slides: no step-by-step reveals; UPDATE example is 2a0d:d740::/48 at SwissIX
- Removed every fragment and stepped code highlight: a slide now shows
  everything at once. Two code blocks keep a static highlight on one line.
- Dropped "What stands between you and an outage".
- The UPDATE walked through in section 3 is now 2a0d:d740::/48 as AS210036
  announces it to the SwissIX route servers: next hop 2001:7f8:24::c9
  (pr01's port on the peering LAN), AS path 210036, MED 0 and 210036:10:2,
  matching what pr01's export filter puts on routes to peers. Encoded with
  the packet crate and parsed back to the identical message; the slide
  generator asserted every quoted number, including the next hop, against
  the bytes. Adds a MULTI_EXIT_DISC slide to the walkthrough.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-20 21:48:12 +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.