Classes of IP address

Classes of IP address

What is the IP address?

The IP address is a set of the numeric number assigned to every device that is connected to the internet. The IP addresses are used to send and receive data packets. It works as a physical address of homes, like if you want to send something to someone’s home, then you send it to their home address, similarly, IP address also works. There are two versions of IP address, IPv4 and IPv3. IPv4 are 32-bit long and IPv6 are 128-bit long. In IPv4 4,294,967,296 (232) unique IP address can be created and in IPv6 allows 3.4 x 1038 (2128) unique IP addresses. Basically, IP addresses are binary numbers but it expressed in decimal and hexadecimal so that human can read it easily.

How does IP address works

When you go online you access the network that is connected to the internet or allows you to access the internet.

IP is a connectionless protocol that is datagram-oriented., so each packet must contain the source IP address, destination IP address, and other data in the header to be successfully delivered. Upper-level protocol handle the error corrections.

Classes of IP address

There are two types of IP versions which is IPv4 and IPv6. IPv4 addresses are made up of two parts, the first number in the IP address specify the network and the second number specify the specific host. A subnet mask defines which part of an address is a network and which part addresses a particular host. The IPv4 address space was split into five classes before variable length subnet masks approved networks to be configured. So, basically, there are five classes in the IPv4 version.

Class A

In the class A network, the first eight bits of IP address or the first set of the number is the network part of the address and the remaining section set of numbers are host section of IP address. The IP addresses starting from 1.x.x.x to 126.x.x.x is the class A IP address. The default subnet mask for Class A IP address is 255.0.0.0 which means there can be 126 networks and 16777214 hosts.

Class A IP address example 2.134.213.2

Class B

The IP address of class B has set their first bit set to 1 and the second bit set to 0. The IP addresses starting from 128.0.x.x to 191.255.x.x is the class B IP address. The default subnet mask for Class B is 255.255.x.x which means there can be 16384 network and 65534 addresses.

Class B IP address example 135.58.24.17

Class C

In Class C IP address the first and second bits are set to 1, and the third bit is set to 0 which means the first 24 bits of the address the network address and the remaining the host address. The IP addresses starting from 192.0.0.x to 223.255.255.x are class C IP addresses and default subnet mask for Class C is 255.255.255.x. Class C have 2097152 Network addresses and 254 Host addresses.

Class C IP address example 201.110.213.28

Class D

Unlike above-mentioned classes of IP addresses class D IP address is not used for “normal” networking operations, it is used for multicasting application. Class D addresses have their first, seconds and third bits set to “1” and their fourth bit set to “0”.The IP address of class D from 224.0.0.0 to 239.255.255.255 and doesn’t have any subnet mask.

Class D IP address example 227.21.6.173

Class E

The IP addresses of class E are allocated for experimental purposes only for R&D or Study. Class E IP address has the first four network address bits as 1. IP addresses of class E ranges from 240.0.0.0 to 255.255.255.254 and like class D it also doesn’t have subnet mask.

Class E IP address example 243.164.89.28