What is "IP"?

Learn about IP addresses and their classes and types.


The Internet Protocol’s fourth version IPv4 was developed in the 1980s and it was designed to use 32 bits of data to define an IP address (for example, As we can see in, there are 4 fields separated by dots, and each field of these 4 occupies 8 bits of data:

8 bits * 4 fields = 32 bits.

Now, let’s think a bit about what 32 bits entail. It tells us the maximum number of IP addresses that can be generated: 2324,294,967,2962^{32} ≈ 4,294,967,296. That’s almost 4.3 billion, all of which have been allocated!

In the summer of 2011, the Internet Assigned Numbers Authority (IANA) allocated the last IPv4 address space. Does that mean we can’t connect other devices to the internet anymore? Not at all. Since then, the internet has grown a lot. Here’s a graph that predicts the growth of the Internet in terms of connected devices:

Note: There is a difference between an IP being allocated and being used. There might be some IPs that are allocated but not used. Such IPs are wasted.

IANA has provided all of its available IP addresses to internet service providers (ISP) around the world. However, not all of these IP addresses are being used.

In 2016, it was estimated that the total number of devices connected to the Internet is around 20 billion, which far exceeds the total number of possible IPv4 addresses.

Due to this situation, measures have been taken to slow IPv4 addressing allocation by using techniques such as network address translation (NAT) and the introduction of public and private IPs. We’ll also look at IPv6 as a solution to the aforementioned problem.

IPv4 classes

Each of the 4 IP address fields can have any value between 0 and 255.

Note: There are 8 bits per field, so we can have 28=2562^8 = 256 values.

IP addresses are divided into several classes:

IP Class

Start IP

End IP

Network Prefix


1 - 127


128 - 191


192 - 223


224 - 239


240 - 255

  • Classes A, B, and C are used on the Internet.
  • Class D is reserved for Multicast addresses.
  • Class E isn’t used currently.

Public IP vs Private IP

IPv4 addresses are of two types: public and private. Let’s discuss them.

Public IP

Public IP addresses, as their name suggests, are used to communicate (transit) over the public internet. Private IP addresses are used in local area networks (LANs), such as our home’s network or our school’s network.

Private IP

Private IP addresses can’t actually reach the Internet. For private IPs to be able to communicate over the Internet, a protocol such as NAT (Network Address Translation) was created to transform them into public IPs.

Listed in the table below are private IP address ranges:

IP Class

Start IP

IP End

Network Prefix




NOTE: The IP addresses not mentioned in the table above are public

We can have multiple LANs that have private IP addresses (networks A and S) and still use public IP addresses for the rest of the networks.

These private IP addresses improve our network’s security, making it harder for potential attackers to enter it (with the help of NAT).