IP stands for Internet Protocol. An IP address is a numeric value assigned to a computer or networking device so that it can communicate with other computers or devices in the network.
There are 2 types of IP address currently in use today. They are:
- IPv4 (Internet Protocol version 4)
- IPv6 (Internet Protocol version 6)
IPv4 address consists of 32 bits and is represented by dotted decimal format. These 32 bits are divided into 4 parts separated by dots (.) and each part consists of 8 bits. In binary number system, a bit can be either 0 or 1.
Example of an IPv4 address (in Binary format): 11000000.10101000.00000000.00000001
We can represent the above address in decimal format as below. Here, we have converted each group of 8 bits in decimal format. A group of 8 bits is also called one byte or one octate. In decimal number system, the numbers can be anything starting from 0 to 9.
11000000 is converted to decimal as 192, 10101000 is converted to 168 and so on. The same IP address is represented in dotted decimal format as 192.168.0.1
So one octate can start from 00000000(decimal= 0) up to 11111111(decimal=255).
How many IPv4 addresses can we have out of 32 bits?
Let’s say we have only one bit, then we can represent this by either 0 or 1. So, totally 2 numbers can be formed from one bit.
Now, let’s consider we have 2 bits, then we can represent this by 00, 01, 11, 10. So, totally 4 numbers can be formed from 2 bit.
So, if we have x number of bits, then we can represent or create 2x unique numbers. So, if we take all the 32 bits, then 232 = 4294967296 (nearly 4.3 billion of IP addresses).
Classes of IP address:
These 4.3 billion of IP addresses are divided into 5 classes based on the value in the first octate of IP address. They are:
Class A range: 220.127.116.11- 18.104.22.168
Class B range: 22.214.171.124- 126.96.36.199
Class C range: 192.0.0.0- 188.8.131.52
Class D range: 184.108.40.206- 220.127.116.11
Class E range: 240.0.0.0- 255.255.255.254
Note: The range (0.0.0.0 – 0.255.255.255) is reserved. The range (127.0.0.0- 127.255.255.255) is used for loopback and diagnostic functions.
Class A, B and C address are unicast IP addresses and can be assigned to a computer or a device.
Class D is used for multicasting. These IPs can’t be assigned to a device.
Class E is reserved for experimental and research purpose.