IPv4 and IPv6 – what is the difference and where are they used?

IPv4 and IPv6 – what is the difference and where are they used?

IPv4 and IPv6 are two ways of writing an IP address and of letting devices find each other on the internet. Both do the same job. They differ in length, in how many addresses exist, and in which one a connection happens to use.

What IPv4 is

IPv4 is the older form and still the most widely used. An address is four numbers from 0 to 255, separated by dots.

  • Example: 143.4.233.22
  • There are about 4.3 billion possible addresses.

Not all of those can be given to devices. Some are reserved for local networks (192.168.x.x, 10.x.x.x), some for documentation, and some for the network’s own work. Fewer public addresses remain than there are devices in the world. That is why one home router or mobile operator often shares a single public IPv4 address among many devices.

IPv4 was specified in 1981 in RFC 791.

What IPv6 is

IPv6 is the newer form. An address is eight groups of hexadecimal characters, separated by colons. Empty groups can be shortened in the written form.

  • Example: 2001:1620:28:1:b6f:8bca:93:a116
  • There are so many addresses that each device can have its own public one. Sharing an address is no longer required for that reason.

IPv6 exists because IPv4 addresses ran out. In the 1990s it was already clear that 4.3 billion addresses would not be enough as the internet grew. The first IPv6 specification was published in 1998. The current one is RFC 8200, from 2017.

Wider use came only after the IPv4 pools at the regional registries were exhausted. The global adoption day, World IPv6 Launch, was 6 June 2012: large networks and services left IPv6 switched on that day, rather than treating it as a trial. An overview of the protocol is in the Wikipedia article on IPv6.

Where each one is used

IPv4 is used on almost every network, because older devices, some business networks and some servers speak only that.

  • The inside of a home router uses a private IPv4 address, for example 192.168.1.24.
  • A website with no IPv6 opens over IPv4.
  • An older printer, camera or industrial controller that has no IPv6 support.

IPv6 is used where the network and the service both support it. Mobile networks often prefer it. Newer home connections receive an IPv6 prefix on the router, and devices build their own address from that prefix.

  • A phone opens a modern website over IPv6 when both the network and the site allow it.
  • Some mobile networks are IPv6-only on the device side. An IPv4 service is then reached through the operator’s translation.
  • A server that should be reachable directly, without a shared IPv4 address, publishes an IPv6 address.

When both are in use at once

This is the ordinary case, not an exception. It is called a dual stack: the device or the network has both addresses, and the browser picks the one that fits a given connection.

  • A new laptop on home Wi-Fi receives a private IPv4 address from the router and an IPv6 address as well. A website on the internet may see the IPv6 address, while an old network disk at home answers only over IPv4.
  • An office keeps IPv4 for old devices and adds IPv6 for new services. The firewall and the VPN list both.
  • A website that has both an IPv4 and an IPv6 record opens over whichever one the visitor can use. When both work, the browser usually prefers IPv6 and falls back to IPv4 if that fails.

Opening one page still uses one connection. That is why a single website shows one address at a time, even when the device has the other address as well.

Back to the blog