Learn subnetting visually
11 short lessons, from binary to IPv6. Change the inputs and watch every value update.
IPv6 basics
Expand and compress
Type any IPv6 address, short or long. The two shortening rules are applied one at a time.
- Full form2001:0db8:0000:0000:0008:0800:200c:417a
- Rule 1: drop leading zeros in each hextet2001:db8:0:0:8:800:200c:417a
- 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.
| Prefix | Typical use | LANs inside | Why |
|---|---|---|---|
| /48 | Typical site allocation | 65,536 /64s | 64 − 48 = 16 bits of subnet ID |
| /52 | Nibble boundary | 4,096 /64s | 12 bits |
| /56 | Common for small sites and homes | 256 /64s | 8 bits |
| /60 | Nibble boundary | 16 /64s | 4 bits |
| /64 | One LAN segment | 1 | Host part is the last 64 bits |
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.
Address types to recognize
The first few hex digits tell you what kind of address it is.
Internet-routable addresses. Today's global allocations start with 2 or 3.
Every IPv6 interface has one. Valid only on its own link; routers never forward it.
Private addressing for internal use, in practice fd00::/8. Not routed on the internet.
ff02::1 reaches all nodes on the link, ff02::2 all routers.
The IPv6 version of 127.0.0.1.
Means no address yet. Never assigned to an interface.