IPv4 vs IPv6
Kite Studio's router shows two kinds of address for Asha's laptop: the familiar 192.168.10.57, and something much longer, 2001:db8:4a:10::57. The first is IPv4, designed in an age when a few billion addresses sounded endless. The second is IPv6, built because the world ran out.
The rule
IPv4 is 32 bits in four decimals; IPv6 is 128 bits in eight hex groups.
IPv4 addresses are 32 bits, written as four numbers from 0 to 255 separated by dots: 192.168.10.57. Each number is one byte, called an octet. That gives , about 4.3 billion addresses — fewer than the number of phones, laptops and servers on earth. The shortage is why private addresses and NAT (the next two lessons) became universal.
IPv6 addresses are 128 bits, written as eight groups of four hex digits separated by colons. That gives , about addresses — enough to give every device its own public address with room to spare. Other differences worth knowing:
- IPv6 has no broadcast; it uses multicast to reach groups of hosts instead.
- Hosts can configure their own address from the router's advertised network prefix (SLAAC), with or without DHCPv6.
- The header is simpler and fixed at 40 bytes, and NAT is not normally needed.
- Most networks today run both side by side, called dual stack.
Writing IPv6 short. Long addresses are shortened with two rules:
- Drop leading zeros in any group:
0db8→db8,0000→0. - Replace one run of consecutive all-zero groups with
::. Only once per address, or it would be impossible to know how many zeros each::stands for.
2001:db8:: is a special prefix reserved for documentation, which is why the examples here use it.