What's an IP address?

How are they allocated?

Are we running out?

Every device on the Internet has an address. An IP address is like a P.O. box. It’s located within a post office (the network) and directs incoming and outgoing messages to a person (the host). Hosts, like computers or printers, are part of a group of devices that communicate with one another.

You may have seen IP addresses before: 4 numbers separated by dots. Each number represents 8 bits, or binary digits:

0
s and
1
s.

19216800
127 +
126 +
025 +
024 +
023 +
022 +
021 +
020 = 192
127 +
026 +
125 +
024 +
123 +
022 +
021 +
020 = 168
027 +
026 +
025 +
024 +
023 +
022 +
021 +
020 = 0
027 +
026 +
025 +
024 +
023 +
022 +
021 +
020 = 0

In theory, we have 232=4,294,967,2962^{32} = 4,294,967,296 IP addresses — over 4 billion. But there are already over 4.66 billion people in the world who use the Internet, and many of them have multiple devices. As you might guess, we’re using up all the IP addresses — at least for this protocol, known as IPv4.

In practice, certain ranges of IP addresses are reserved. The example used above,

192.168.0.0
, is a private, or unroutable, IP address. Many devices in a home, for example, each have a private address but are all under one public address. Your computer also understands
127.0.0.1
, or localhost, to mean its own IP address.

Classful Networking

From 1981 to 1993, IP addresses were divided into five classes. Each began with different bits and could support different size networks.

Class A

With 16 million possible hosts on each network, Class A is used for massive networks: ISPs, Internet backbone.

0

Network
(7 bits)

Host
(24 bits)

Class B

Medium-sized networks (large companies, universities), 65,000 hosts

1

0

Network
(14 bits)

Host
(16 bits)

Class C

Small companies and organizations, 254 hosts

1

1

0

Network
(21 bits)

Host
(8 bits)

Class D

Reserved for multicast: one-to-many or many-to-many communication, data sent to group of destinations simultaneously

1

1

1

0

Host
(28 bits)

Class E

Reserved for future use or research and development

1

1

1

1

Host
(28 bits)

Many organizations needed more IPs than Class C could provide, but didn’t use nearly as many as Class B offered. This become a problem especially during the dot com boom, as droves of people and companies went online.

The creators of the Internet anticipated the IP shortage. They developed network address translation (NAT), where multiple private addresses are placed under one public address. In 1993, they developed Classless Inter-Domain Routing (CIDR, pronounced cider), a less wasteful and more flexible system than the previous class-based one.


Classless Inter-Domain Routing (CIDR)

In CIDR notation, IP addresses are followed by a slash and a number, which tells you how many bits at the beginning represent the network. The largest blocks of IPs given to organizations are

/8
(“slash eight”). The first 8 bits represent the network, leaving 24 bits for the host. 224 means over 16 million hosts.

1831255255/

Network
(12 bits)

Host
(20 bits)


What the Internet looked like, October 2007

Map

Globally, an organization called the Internet Assigned Numbers Authority (IANA) manages the IP address space. Five regional Internet registries (RIRs) assign addresses to local Internet registries, such as Internet service providers (ISPs), in their territories.

From the Center for Applied Internet Data Analysis: “Each pixel in the full-size image represents a single /24 network containing up to 256 hosts. The color of each pixel corresponds to the Regional Internet Registries where the address space is listed.”

Owners include various registries, the US Department of Defense, and corporate entities. Some ranges are also reserved.



The present and future of IPs

Many of the early pioneers of the Internet, such as universities, received huge chunks of IP addresses. Recently, as we’ve neared IP exhaustion, some organizations have sold their excess IPs. In 2017, MIT sold 8 million coveted IP addresses to Amazon for $200 million.

As of 2019, all IPv4 addresses have been allocated. A quarter of the Internet has slowly migrated to a new protocol called IPv6. There are 21282^{128} IPv6 addresses, or 340 trillion trillion trillion. Here’s what an IPv6 address look like:

2001:0db8:85a3::8a2e:0370:7334
.


Summary

  • IP addresses are unique numbers that allow devices to communicate with others on the Internet. Each number in an IPv4 address represents 8 bits, or binary digits.
  • IP addresses contain a network and host. Originally, there were five classes of addresses, with different leading bits and network sizes. Class A allowed for the largest networks, followed by classes B and C.
  • We’ve anticipated exhaustion of IP addresses. NAT, which puts multiple private IPs behind one public IP, has helped delay that.
  • So has CIDR. In CIDR notation, the number after the slash following an IP address indicates how many leading bits are used to determine the network. Registries can give out, for example,
    /29
    blocks if that’s all an organization needs.
  • As of 2019, all IPv4 addresses have been allocated — reserved, given to companies, held by the US Department of Defense and regional registries, or otherwise.
  • We’re slowly migrating over to IPv6!