Compared
IPv4 vs IPv6
IPv4 addresses are 32 bits, written as four numbers; IPv6 addresses are 128 bits, written in hex. Beyond size, IPv6 has no broadcast and no ARP, devices can build their own addresses, and routers never fragment. The two do not talk to each other: most networks run both.
Side by side
| IPv4 | IPv6 | |
|---|---|---|
| Address size | 32 bits | 128 bits |
| Written as | Four decimal numbers: 10.0.1.10 | Eight hex groups, one run of zeros shortened to :: (fd00:0:1::2) |
| A network's prefix | Any length; /24 is common | Almost always a /64 |
| Finding a neighbour's MAC | ARP, a broadcast | Neighbour discovery, ICMPv6 to a multicast address |
| Broadcast | Yes | None: multicast instead |
| Getting an address | By hand or from DHCP | By hand, built by the device from the router's prefix (SLAAC), or from DHCPv6 |
| Private range | 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 | fd00::/8, unique local addresses |
| Fragmentation | Routers on the path may fragment | Only the sender fragments; routers never do |
| Header | 20 bytes at least, with options | 40 bytes, fixed |
| DNS record | A | AAAA |
Each one explained
- IP address
- A device's address across networks: 32 bits, written as four numbers like 10.0.1.10.
- IPv6
- The 128-bit Internet Protocol: a /64 prefix for the network, 64 bits for the card.
- Neighbour discovery
- IPv6's replacement for ARP, and more: ICMPv6 messages to find neighbours and routers.
- SLAAC
- Devices build their own IPv6 address from the prefix a router advertises.
- Dual stack
- Running IPv4 and IPv6 side by side; each connection picks one.
See the difference on real machines
Each lab is a small network of real Linux machines in your browser.
- IP addresses: what the four numbers mean
- IPv6 explained: a network that sets itself up
- IPv6 addressing: read, shorten and split any address
- IPv6 dual stack: run both and see which one wins
Open IP addresses: what the four numbers mean