AQA 7517, section 4.9.4.5
There are currently two standards of IP address in use: IPv4 and IPv6.
IPv4
- 32 bits long.
- Written in dotted decimal: four numbers from 0 to 255, such as
192.168.1.25. - The number of possible addresses is
IPv4 was designed in the 1980s, when 4.3 billion addresses seemed more than enough.
IPv6
-
128 bits long.
-
Written as eight groups of four hexadecimal digits, separated by colons, for example
2001:0db8:85a3:0000:0000:8a2e:0370:7334. -
The number of possible addresses is
That's enough for every device on Earth to have many addresses of its own, and then some.
Shortening an IPv6 address
To make IPv6 addresses easier to write:
- Leading zeros in a group can be dropped:
0db8becomesdb8, and0000becomes0. - One run of groups that are all zeros can be replaced by
::(only once per address).
So 2001:0db8:85a3:0000:0000:8a2e:0370:7334 becomes 2001:db8:85a3::8a2e:370:7334.
Why was IPv6 introduced?
The main reason is the exhaustion of IPv4 addresses.
- The number of Internet-connected devices has grown enormously: computers, phones, tablets, smart TVs, watches, cars, sensors, and the whole Internet of Things. There are many more devices than the 4.3 billion IPv4 addresses.
- The regional registries have run out of new IPv4 blocks to allocate.
- Workarounds such as NAT and private addresses (4.9.4.8) have delayed the problem but they add complexity, and break the simple idea of every device having its own address.
IPv6 solves this with a vastly larger address space. It also brings improvements:
- Every device can have its own unique public address, so NAT is not needed.
- Simpler header and more efficient routing.
- Automatic configuration, so devices can set up their own addresses.
- Security (IPsec) built in as a standard feature.
Comparison
| IPv4 | IPv6 | |
|---|---|---|
| Length | 32 bits | 128 bits |
| Notation | Dotted decimal | Hexadecimal, colon-separated |
| Number of addresses | About 4.3 billion | About |
| Example | 192.168.1.25 |
2001:db8::1 |
| NAT needed? | Often | No |
| Status | Still widely used | Growing adoption |
The two run side by side during the long transition, and many networks support both.
Worked example
Task: calculate how many times more addresses IPv6 has than IPv4.
IPv6 has about times as many addresses. Put another way, each of the 4.3 billion IPv4 addresses could be replaced by a block of about IPv6 addresses.
Exam tip: IPv6 gives enough addresses for every device to have its own unique (public) address. Just saying "there are more addresses" doesn't get the mark. Quantify it: IPv4 uses 32 bits ( addresses) and IPv6 uses 128 bits ( addresses).
Check yourself
How many bits are in an IPv4 address and in an IPv6 address?
IPv4 has 32 bits and IPv6 has 128 bits.
Why was IPv6 introduced?
IPv4 addresses were running out, because there are far more Internet-connected devices than the roughly 4.3 billion IPv4 addresses. IPv6 has a vastly bigger address space.
How is an IPv6 address written?
As eight groups of four hexadecimal digits separated by colons.