In communication it is necessary to assign source and destination. Without these two parameters we cannot say who will communicate with whom. In case of computer networking the source and destination assigned using IP address. IP address is the logical address of a host, so that it has identification in a network. How does this IP address work!

192.168.1.1/24

172.16.1.1/16

10.10.10.1/24

These above are the IP addresses looks like. What are the common things in these IP addresses!

1. It has four decimal numbers.
2. It has three dots in those four numbers
3. At the end of the IP address we mentioned a digit after “/”, which is known as prefix.

Each decimal here is called octet. Each of them is a combination of 8 bits. Like in case of the first IP address the binary form is 11000000.10101000.00000001.00000001. From this binary we can learn that any usable IP address cannot be an all 0s neither all 1s.

Similar way we can find the rest of the binaries.

Now let’s talk about the prefix. Prefix is the basic component that defines a network. The number that represents the prefix means that these numbers of bits are being used in network part. The network part cannot be used in host part. So let’s calculate how many hosts we can support using this number.

First we know that subnet mask is a 32 bit combination in 4 different octets. Each octet contains a combination of 1s and 0s. When we see the prefix is 24 then we need to subtract 24 from 32.

32-24=8

Now let’s work on some simple binary to decimal conversion.

28 =256

If we start from 0 then the 255 is the last number on this series.

Now two IPs will be used for two different reasons. One is for broadcast address which is 255 and another for network address which is 0.

So in case of 192.168.1.1/24 IP address the network address is 192.168.1.0 and broadcast address is 192.167.1.255. The usable IP in this series is 253. That means we can put this IPs into 253 hosts in this network.

If we change the prefix of the network then usable IP address of the network changes. So the prefix actually defines the network size.

One last thing about IP address is that the first octet of the IP address cannot be 127. Because 127 is reserved for loopback address and the IP is 127.0.0.1. Also another important issue is if all the octets are 0 and looks like 0.0.0.0/0 then this is the IP which means every kind of network in the world.

So I believe that this discussion could give us a minimum idea about IP address.