IPv4 has been the standard Internet addressing scheme since the first version was deployed on the ARPANET in 1983. IPv4’s successor, IPv6 was standardized in 2017 but still faces slow uptake, despite draft versions being public since 1998. The move to IPv6 is seen as urgent as the available IPv4 address space has been exhausted.
IPv4 uses a 32-bit address space which allows for a total of 2^32 IP addresses, that’s 4,294,967,296 possible unique addresses.
IPv4 addresses are typically shown in the dotted-quad notation which consists of four binary octets, in decimal format, each separated by a full stop. For example, 184.108.40.206 is 10101100.01000011.01000101.11000011 in binary. Because of this design, each octet can only be between 0 and 255.
IPv4 address exhaustion
Early on the structure of networks in IPv4 was split into classes, primarily A, B, and C. A class A network used the first octet to define the network, with all other bits being assignable to hosts, this allows for 128 possible networks, each with more than 16 million hosts. A class B network used the first two octets as a network address and the last two as host addresses, allowing for more than 16 thousand networks of more than 65 thousand hosts. Finally, class C networks used the first three octets for the network address, and the last octet for host addresses, allowing for more than 2 million networks of up to 256 hosts.
Originally, if a company required IP addresses, they could request a class C network from a regional provider, if they didn’t need all of that space, they still got it, if they needed more, they were given a class B network. A few companies were even assigned class A networks, including Apple, Ford, the US Postal Service, AT&T, and Comcast. The US Department of Defense is assigned 13 class A networks.
Over time it was determined that such an approach would quickly lead to the address scheme running out of addresses to be assigned. A new procedure called CIDR, or Classless Inter-Domain Routing was created that allowed blocks of IP address of arbitrary sizes to be allocated. This staved off the eventual address pool exhaustion.
Another tool to reduce IP address usage was to specify private IP address ranges that could be used internally but couldn’t be used on the internet. This approach allowed for all internal networks to use the same addressing schemes with only a small sacrifice to the usable address space. The most common private network range is likely the one you have on your home network. It starts from, 192.168.0.0 and goes to 192.168.255.255.
This technique meant that the internet gateway such as your home router now is the only device in your network with a public IP address. Your router translates all incoming traffic and works out which host it should be sent to in your network through two processes called NAT and PAT. NAT is Network Address Translation, and PAT is Port Address Translation, combined they’re used by the router to allow your devices to open services to the internet while not directly having a public IP address.
Despite all possible efforts to stave off IPv4 address exhaustion, all regional registrars have now exhausted their supply of unallocated IPv4 addresses, with the last unallocated address being allocated on the 25th of November 2019. All 4,294,967,296 IP addresses have been assigned. Regional registrars can only reallocate IP addresses that are returned to them. The move to IPv6 is now critical to ensure that every device that needs an address can get one. IPv6 uses a much longer addressing scheme, that provides an essentially inexhaustible supply of IP addresses.