IPv4 : Different Classes and Address

ipv4-different-classes

IPv4 (Internet Protocol version 4), is the 4th version of Internet Protocol. We have a large number of addresses in IPv4. In this article, we will discuss various classes defined in IPv4.

ipv4-different-classes
IPv4 Classes

History of IPv4

At the beginning of the IPv4 design, the complete address was divided into two parts. The first part was known as a Network identifier and the rest of the part was known as a host identifier. But, they were quickly found to be inadequate.

ICANN is responsible for assigning IP Addresses.

In 1981, according to the most significant octet, IPv4 addresses were defined in five different classes. These classes are A, B, C, D, and E.

IPv4 Different Classes

However, in IPv4 we have 4,294,967,296 unique addresses. However, some of these addresses are not used for communication purposes.  Also, one complete octet from Classes A, B, and C is used for Private IP addresses. Know more about Public and Private IP addresses. Below is the table which categorizes different addresses in different network classes.

Source NAT (SNAT)Destination NAT (DNAT)
SNAT stands for Source NAT.DNAT stands for Destination NAT.
Here, Private IP address is converted into Public IP.Here, Public IP is converted into Private IP.
It is used by a client which is inside our private network and want to access the Internet. It is used when someone from public network wants to access a Server inside the DMZ.
SNAT is performed after the routing decision.DNAT is performed before the routing decision.
SNAT, can allow one or more than one hosts of private network to get connect to public hosts.DNAT, allows connection of any host on the public network to a particular host on the private network.

Now, we will discuss each network class in detail.

Class A

The range of the first octet of class A addresses is from 0 to 127. Thus, in the binary system, the first bit of the first octet is set to zero. So, in the binary system it will be :

00000001 – 01111111
  1      –    127

However, the addresses from 0.0.0.0 to 0.255.255.255 are not usable in communication. Also, the addresses from 127.0.0.0 to 127.255.255.255 are reserved for loopback purposes. So, the range of usable IP addresses of class A is from 1.0.0.0 to 126.255.255.255.

The default subnet mask of the Class A network is 255.0.0.0. So, there will be a maximum of 16,777,216 hosts that can be connected in a single network. The total number of different networks will be 126. The Binary representation of Networks and Hosts will be :

0NNNNNNN:HHHHHHHH:HHHHHHHH:HHHHHHHH

Class B

The range of the Class B address is from 128.0.0.0 to 191.255.255.255. So, the first two bits of the first octet are always set to 10. The binary representation of the first octet will be:

10000000  – 10111111
  128   –    191

The default subnet mask of the class B address is 255.255.0.0. The Binary representation of Class B Networks and Hosts will be :

10NNNNNN:NNNNNNNN:HHHHHHHH:HHHHHHHH

Class C

The range of Class C addresses is from 192.0.0.0 to 223.255.255.255. So, the first three bits of the first octet are always set to 110. The binary representation of the first octet will be:

11000000  – 11011111
  192   –    223

The default subnet mask of the class B address is 255.255.255.0. The Binary representation of Class C Networks and Hosts will be :

110NNNNN:NNNNNNNN:NNNNNNNN:HHHHHHHH

Class D

The range of Class D addresses is from 224.0.0.0 to 239.255.255.255. So, the first four-bit of the first octet is always set to 1110. The binary representation of the first octet will be:

11100000  – 11101111
  224   –    239

Note: The IP addresses of IPv4 Class D are used for multicasting purposes only. These IP addresses do not directly participate in computer networking. So, class D does not have any subnet mask.

Class E

Class E is reserved for Research or study purposes. So, this class does not participate in the computer network. Like class D, this class also does not have any subnet mask. The range of addresses of this class starts from 240.0.0.0 to 255.255.255.0.

Summary

In this article, we discussed various classes of IPv4. We also discussed some different addresses of different IP classes and their range. Subnet Mask is used in Classes A, B, and C but not in Classes D and E. We also discuss the binary representation of different network classes.

You May Also Like

About the Author: Vikash Kaushik

Leave a Reply

Your email address will not be published. Required fields are marked *

Share via
Copy link