What the Internet Protocol is for
Every device that communicates over the internet needs a way to be identified, and every chunk of data needs a way to say where it is going. The Internet Protocol, or IP, provides both. It defines the format of a packet’s header, including the sender’s address and the destination address, and the rule that each router along the path should forward the packet toward that destination.
IP is deliberately simple. It does not guarantee delivery, order or speed; it provides best-effort forwarding. Higher-level protocols add reliability where needed. The overall flow, from breaking data into packets to reassembling it, is covered in the discussion of how the internet works, so this article focuses on addressing.
IPv4 addresses
The version that spread across the world is IPv4. An IPv4 address is a 32-bit number, usually written as four numbers from 0 to 255 separated by dots, such as 192.0.2.1 (a range reserved for examples in documentation). Because 32 bits give 2 to the power of 32 possible values, the total is 4,294,967,296, a little under 4.3 billion addresses.
That number sounded enormous when the system was designed in an era when only a small number of computers were connected. Not all of the addresses are usable as ordinary public ones, since some blocks are reserved for special purposes, such as private networks, testing and multicasting, which reduces the usable pool somewhat.
Why the pool ran short
Several things happened. The internet grew far beyond its early scale. Each person began to own several connected devices, including phones, laptops, televisions and, increasingly, items from the internet of things. And in the early years, large blocks of addresses were handed out generously to organizations, in sizes that later looked wasteful.
By the early 2010s, the central registry had allocated its remaining blocks of IPv4 addresses to the regional registries that distribute them, and by the following years the regional registries themselves began running out of freely available addresses. Exact dates differ by region. After that, getting new IPv4 addresses meant mostly obtaining them from those already holding them, and a trading market has developed in which addresses are bought and leased.
NAT: stretching the supply
The internet did not stop working because the supply ran short, largely thanks to a workaround called network address translation, or NAT. With NAT, many devices on a private network share one public address. Your home router is a common example: each device inside gets a private address that is only meaningful on the local network, and the router translates between those and the single public address your provider assigned. Mobile providers often go further and place many customers behind shared addresses.
This arrangement is why a household full of smart home devices can sit behind one provider-assigned address. NAT works well for ordinary browsing, where your device starts the conversation. It is less convenient when something outside needs to reach a device inside, as with hosting a server, some games or certain calling services, which then need extra configuration or relay services. NAT also adds complexity to the network and makes it harder to attribute activity to a single device by address alone. It is not a security feature in itself, though many people treat it as one. A properly configured firewall provides the protection.
IPv6: a much larger space
IPv6 was designed in the 1990s as the successor. Its addresses are 128 bits long, which gives 2 to the power of 128 possible values, roughly 3.4 followed by 38 zeros, or about 3.4 times 10 to the 38th. It is hard to picture a number that large, and the point is not that every address will be used. The point is that the shortage should not return, and that addresses can be allocated in a structured, less wasteful way.
An IPv6 address is written as eight groups of four hexadecimal digits separated by colons, and long runs of zeros can be shortened with a double colon. The documentation range, for instance, begins with 2001:db8. Hexadecimal uses the digits 0 to 9 and the letters a to f, which is more compact than writing out the bits.
What else IPv6 changes
Besides size, IPv6 includes some design changes.
- Simpler header processing in routers, with optional features moved out of the main header.
- Automatic configuration, so a device can often build its own address from information announced on the local network.
- End-to-end connectivity, because with plentiful addresses, every device can in principle have its own public address, reducing the need for NAT.
- Security support: IPv6 was designed to support IPsec, a framework for authenticating and encrypting traffic, though in practice it is optional and it is no replacement for the usual protections such as message encryption in applications.
IPv6 does not by itself make a connection faster or more private, which is a common misconception. In some cases it is slightly faster because it avoids NAT, in others the difference is negligible.
Living with two protocols
IPv4 and IPv6 are not directly compatible. A device that speaks only IPv4 cannot talk to one that speaks only IPv6 without a translation mechanism. The practical answer has been to run both side by side, called dual-stack, and to use tunnels and translators in some places. Many networks and websites now support IPv6, and traffic shares differ widely between countries and providers, but IPv4 is still very much in use and will likely remain so for years. Predicting when, or whether, IPv4 will be fully retired would be guesswork.
How you can find out
Many operating systems and home routers show whether they have an IPv6 address. Most people never need to touch the setting; devices pick the better path automatically. Online tools exist that report which protocol a connection is using. Home users rarely need to change anything, but those running their own network equipment or servers should check what their provider supports.
Names and addresses
People generally do not type either kind of address. The Domain Name System turns names into addresses behind the scenes, which is one reason the transition has been quiet from an ordinary user’s point of view. When a site is reachable by both versions, the system can offer both and the device chooses.
The takeaway
IP gives the internet its basic labeling and forwarding scheme. IPv4’s limited space was stretched by NAT and by recycling, and IPv6 exists to provide room for growth, including a future with vastly more connected devices. The change is gradual rather than sudden, and the two will coexist for some time.