IPv6 Address LabThe network layer after IPv4

128 bits, written in eight groups

IPv4 has about 4.3 billion addresses and they ran out. IPv6 has 2 to the power 128. Type an address below to expand it, shorten it and see what kind it is.

Network prefix, first 64 bitsInterface identifier, last 64 bits
Short formFull form
Type

Build the 40-byte header

The IPv6 header has a fixed size and no checksum. Change a field and the bytes change.

Version, class, flow, length, next header, hop limit (8 bytes)Source (16 bytes)Destination (16 bytes)

IPv4 against IPv6

FeatureIPv4IPv6
Address size32 bits128 bits
Header20 bytes plus options, 12 fields40 bytes fixed, 8 fields
Header checksumYes, recomputed at every hopNone: link layer and transport already check
FragmentationRouters may fragmentOnly the sender fragments (path MTU discovery)
OptionsIn the headerExtension headers chained by Next header
Address configurationDHCP or by handStateless autoconfiguration (SLAAC) or DHCPv6
Finding neighboursARPNeighbour Discovery (ICMPv6)
BroadcastYesNo: multicast instead

IPv4

IPv6

Each square metre

IPv6 addresses for every square metre of the Earth’s surface (510 million square kilometres)

Getting from IPv4 to IPv6

Dual stack

Hosts and routers run both protocols side by side and pick IPv6 when the other end has it.

Tunneling

An IPv6 packet rides inside an IPv4 packet (protocol 41, called 6in4) across IPv4-only networks. The tunneling page shows the same wrapping with real bytes.

Translation

A gateway (NAT64) converts between IPv6 and IPv4 headers so IPv6-only hosts can reach IPv4-only servers.

What a real machine looks like

Output of python3 lab.py --internet on the author’s laptop, addresses hidden. Run it on your own machine to see yours.

1. IPv6 addresses on this machine (interface, type, address, prefix length)
   lo         loopback (::1)                                             ::1/128
   wlo1       link-local (fe80::/10), valid on this link only            fe80::[hidden]/64
   tailscale0 unique local (fc00::/7), private                           fd7a:115c:[hidden]/128
   tailscale0 link-local (fe80::/10), valid on this link only            fe80::[hidden]/64
   br-d74921045334 link-local (fe80::/10), valid on this link only            fe80::[hidden]/64

2. What the types mean
   link-local: every IPv6 interface has one, it never leaves the link (replaces ARP-style local talk).
   global unicast: a public address; the part after the first 64 bits is the interface identifier.
   this machine has a global IPv6 address: no

3. Loopback test (connect to ::1)
   server received: hello over IPv6 from ::1

4. One real IPv6 connection to the Internet (Google Public DNS, TCP port 53)
   could not connect: Network is unreachable (no working IPv6 route)

Reading it: the laptop has a link-local address on each interface and a private Tailscale address, but no global address, and a connection to a public IPv6 server failed with no route. Its current network does not offer IPv6, so this machine is not yet reachable over IPv6 even though its software supports it.