Menu

The Internet

IPv4 and IPv6

IP addresses come in two versions: IPv4 and IPv6. Both identify a device so that data can be addressed and routed, but they store the address in different ways.

IPv4 addresses

An IPv4 address is 32 bits long. It is written as four 8-bit numbers separated by dots, and each number must be from 0 to 255. For example, 172.20.14.9 has four parts: 172, 20, 14 and 9. Each part is one byte, so four bytes make 32 bits. The dotted format is only how people read it; the network actually sends the 32 bits.

IPv6 addresses

An IPv6 address is 128 bits long. It is written in hexadecimal, using digits 0-9 and letters a-f, usually as eight groups of up to four hexadecimal digits separated by colons. For example, a73f:0b21:9c4d:00e8:5f6a:1307:bb92:4c0d is an IPv6 address. You can tell the two versions apart because IPv4 uses dots and decimal numbers, while IPv6 uses colons and hexadecimal. Hexadecimal keeps a long address compact, and 128 bits provides far more unique addresses than IPv4.

An IPv4 address as four 8-bit numbers, 172, 20, 14 and 9, shown in binary, and an IPv6 address as eight 16-bit hexadecimal groups separated by colons.

Why IPv6 was developed

IPv4 has only 32 bits, so only about 4.3 billion different addresses are possible. That seemed plenty when IPv4 was designed, but there are now far more devices online. IPv6 was developed because the number of available IPv4 addresses is limited. Its much larger address space means far more devices can each have a unique address.

Practise this