Modern computing devices are generally connected to the Internet. This vast data source is accessible thanks to a broad range of protocols and communication standards. The IP address underpins them all. An IP address is a digital address for a computing device that allows it to communicate over network connections. Critically, it provides communication between networks, which has allowed the Internet to form a vast mesh of interconnected networks.
In the same way, a letter needs to have an address on the envelope to be delivered to the right place, a network packet needs a destination IP address to be delivered to the correct device. The Internet and its precursor the ARPANET are based on an address structure called IPv4, or Internet Protocol version 4. Though this is now being superseded by IPv6.
The Original Addressing Scheme – IPv4
IPv4 is the standard address scheme of most of the Internet and has been since its inception. IPv4 addresses are defined with 32 binary bits. To make them human readable, they are often displayed in a format called dotted-quad, or dot-decimal notation. An example IPv4 address would be 192.168.0.2.
The human-readable format of IPv4 above is said to have four octets because each of the sections separated by dots has 8 bits. Each octet can have a value between 0 and 255. This means that there are a total of 232 or 4,294,967,296 possible IPv4 addresses. This may sound like a lot and was presumed to be so in the early days of the Internet. In reality though, the Internet has seen colossal uptake, and there are now many more devices than there are IP addresses.
Address Space Exhaustion
In the early days of the Internet, the PC wasn’t a thing. It was assumed that networks would only be found at large organisations as they were the only ones that could afford computers. To follow that line of thought, large blocks of IP addresses were assigned to organisations that asked for them.
The PC changed all of that and brought computers into the home. This change meant that there were now many smaller networks instead of a few large networks. This meant that the method for allocating IP addresses had to change. Classful networking was a way to break the large networks into smaller chunks. This was a more efficient use of address space but still had an issue with small-to-medium-sized organisations needing to get an intermediate network allocation that was generally vastly more than was required.
A decade later, classful networking was replaced with CIDR or Classless Inter-Domain Routing. This allowed much more precise control over the size of the networks allocated and is used to this day. It works by defining a network with a second address called a subnet mask. The subnet mask has the same structure. But every binary bit that represents the network address is set to 1 and every binary bit that can be used to denote hosts in that network is set to 0.
Still, the popularity of the Internet continued to threaten to completely exhaust the address space. While a few more tricks were implemented such as private address spaces and NAT. The real solution is a transition to IPv6.
The Successor – IPv6
IPv6 addresses look quite different to IPv4 addresses. An example IPv6 address may look like this fe80:0db8:0000:0000:0000:8a2e:0370:7334. The full address is now made up of 128 bits rather than 32. This offers 340,282,366,920,938,463,463,374,607,431,768,211,456 or 340 trillion trillion trillion unique IPv6 addresses, more than enough to be safe from address space exhaustion like IPv4.
Unlike IPv4 which has decimal numbers separated by periods, IPv6 uses hexadecimal and colons. In some cases, you may see the address compressed to look shorter. For the convenience of reading and writing, the largest continuous block of zeros can be omitted, leaving the colons on either side. This reduces the address to fe80:0db8::8a2e:0370:7334.
IPv6 had a long road to standardisation, first having a draft standard published in 1998, and finally being standardised in 2017. In that time frame, there was minimal uptake, despite the stability of the draft standard and the increasing urgency of IPv4 address space exhaustion.
As of 2022, the IPv4 address space has been completely exhausted, and no new addresses can be allocated. Thankfully there has now been an increase in IPv6 support on servers, user devices, and middleboxes. Google provides daily stats for the amount of traffic it sees that uses IPv6. As of the time of writing, this sits at around 40% and has been steadily rising since 2017.
One of the tricks used to hold off address space exhaustion was to treat certain groups of addresses differently. Some addresses were reserved for future use, and some were reserved for use as a loopback address. The most important ranges though were the private address ranges. These address ranges: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.1/16 were designated as confidential. Any network can use these address ranges internally.
The critical factor here was that these private addresses can only be used for local network communication, they can’t be used across networks. This means that internal devices don’t need to use the rare and dwindling supply of public IPv4 addresses. Of course that makes communicating outside the network more complicated, but not impossible thanks to NAT.
NAT, or Network Address Translation, and associated PAT (Port Address Translation) is a protocol that allows a router to have a single public IP address and then cleverly convert any outgoing traffic to use its own public IP address. The router needs to keep track of which communication came from which device so that it can return the response to the correct address, but the system worked excellently.
With private address spaces, NAT, and PAT internal networks went from using one public IP address for each device to using one public address total.
IPv6 also contains similar reserved address spaces for internal networks. Any IPv6 address starting with “fe80” is a private “link local” address.
An IP address is used to identify a computer device on – and allow it to communicate over – a computer network. IPv4 addresses are standard but are being replaced by the longer IPv6 addresses because IPv4 ran out of possible addresses to assign to new internet-connected devices.
Some unique address ranges are private IP addresses. Private addresses can be used on any network, but can’t be used to communicate between networks directly. IP addresses in a network are typically assigned by a router using DHCP or Dynamic Host Control Protocol.