Visual lab

Learn subnetting visually

11 short lessons, from binary to IPv6. Change the inputs and watch every value update.

Lesson 11 of 11Intermediate

IPv6 basics

Why IPv6?
IPv4 has about 4.3 billion addresses, and they ran out. IPv6 addresses are 128 bits, written as eight groups of four hex digits called hextets, like 2001:db8::1.

Expand and compress

Type any IPv6 address, short or long. The two shortening rules are applied one at a time.

8 hextets of 16 bits each
2001
bits 1–16
0db8
bits 17–32
0000
bits 33–48
0000
bits 49–64
0008
bits 65–80
0800
bits 81–96
200c
bits 97–112
417a
bits 113–128
  1. Full form
    2001:0db8:0000:0000:0008:0800:200c:417a
  2. Rule 1: drop leading zeros in each hextet
    2001:db8:0:0:8:800:200c:417a
  3. Rule 2: replace the longest run of zero hextets with :: (hextets 3–4)
    2001:db8::8:800:200c:417a

:: may appear only once, or nobody could tell how many zeros each one hides. When two zero runs tie, the first one is compressed. A single zero hextet is written as 0, not ::. Lowercase is the standard form (RFC 5952).

Subnetting IPv6

IPv6 subnetting is about counting subnets, not hosts. A LAN is a /64: the last 64 bits identify the interface.

PrefixTypical useLANs insideWhy
/48Typical site allocation65,536 /64s64 − 48 = 16 bits of subnet ID
/52Nibble boundary4,096 /64s12 bits
/56Common for small sites and homes256 /64s8 bits
/60Nibble boundary16 /64s4 bits
/64One LAN segment1Host part is the last 64 bits
Example: site 2001:db8:abcd::/48, one hex digit = 4 bits
2001:db8:abcd:0000::/64

The fourth hextet is the 16-bit subnet ID. Each prefix on a multiple of 4 (a nibble boundary: /52, /56, /60) ends exactly at one hex digit, so subnets read cleanly: 2001:db8:abcd:1200::/56 holds 2001:db8:abcd:1200::/64 to 2001:db8:abcd:12ff::/64.

2001:db8::/32 is reserved for documentation (RFC 3849), which is why examples use it.

No broadcast in IPv6
IPv6 has no broadcast address. Messages for many hosts use multicast instead, and Neighbor Discovery (which replaces ARP) sends to multicast groups so only the interested hosts process them.

Address types to recognize

The first few hex digits tell you what kind of address it is.

2000::/3Global unicast

Internet-routable addresses. Today's global allocations start with 2 or 3.

fe80::/10Link-local

Every IPv6 interface has one. Valid only on its own link; routers never forward it.

fc00::/7Unique local

Private addressing for internal use, in practice fd00::/8. Not routed on the internet.

ff00::/8Multicast

ff02::1 reaches all nodes on the link, ff02::2 all routers.

::1/128Loopback

The IPv6 version of 127.0.0.1.

::/128Unspecified

Means no address yet. Never assigned to an interface.

Next steps
This is an introduction. SLAAC, DHCPv6 and dual-stack design build on these ideas.
Lesson 11 of 11
All lessons done