The IP address belonging to Class D range from 224.0.0.0 to 239.255.255.255. Class D is reserved for multicasting. Also, this class doesn't have any subnet mask. The IP address belonging to Class E has the first four bits of the first octet set as 1111. The remaining bits are the host bits. IP Address Class A, B and C Network and Host Capacities In the preceding topics I introduced the concepts of IP address classes and showed how the classes related to ranges of IP addresses. Of the five classes, D and E are dedicated to special purposes, so I will leave those alone for now.

What are the classes of IPV4? How to identify an IP class from a given IP address?

IP addressing is the most popular way to identify a device on the network. The address has 32 bits which can be broken into four octets(1 octet=8 bit). These octets provide an addressing method through which we can accommodate large and small networks. Accordingly, there are 5 classes of the network about which we will study in this blog. So, let's get started.

IPv4

IP version 4 is 32 bits long. The maximum value of a number that can be formed by using 32 bits is 2³². So, the maximum number of IPv4 addresses is 4,294,967,296 addresses i.e. 2³² addresses. It consists of four octets each of which can contain one to three digits ranging from 0 to 255 separated by a single dot(.). Here, each number is the decimal representation(base-10) for an 8 digit binary number(base-2).

Example of an IPv4 address: 63.171.234.171

Classes of IPv4

  1. Class A
  2. Class B
  3. Class C
  4. Class D
  5. Class E
The order of the bits in the first octet of the IP address decides the class of the IP address.

Some bits of the IP address represents the network and the remaining bits represent the host. The IP address can be further be divided into two parts:

Network ID: It identifies which network you are on. The number of networks in any class is given by the formula:

Number of Networks= 2^networkBits

Classes of ip address

Host ID: It identifies your machine on the network. The number of hosts in any class is given by the formula:

Number of Hosts= 2^hostBits-2.

Here, 2 IP addresses are subtracted because

  1. Host ID in which all the bits are set to 0 is not assigned because this represents the network ID.
  2. Host ID in which are the bits are set to 1 is reserved for Direct Broadcast Address(for sending the data from one network to all the other hosts in another network).

Class A

The IP address belonging to Class A uses only the first octet to identify the network and the last three octets are used to identify the host.

  1. The Network ID has 8 bits.
  2. The Host ID has 24 bits.

Youtube supportharshu tricks. The first bit of the first octet is always set to 0.

The default subnet mask for Class A IP address is 255.0.0.0. Subnet masks are used to tell hosts on the network which part is the network address and which part is the host address of an IP address.

How does the subnet mask do this?

Suppose you have an IP address as

10.20.15.3 = 00001010.00010100.00001111.00000011

and the mask as,

255.0.0.0 = 11111111.00000000.00000000.00000000

The IP address bits that have corresponding mask bits as 1 represents the network ID and the address bits that have corresponding mask bits as set to 0 represent the host ID.

10.20.15.1 = 00001010.00010100.00001111.00000001

255.0.0.0 = 11111111.00000000.00000000.00000000

by comparing corresponding bits of address bits and mask bits we get,

netid = 00001010 = 10

hostid = 00010100.00001111.00000011 = 20.15.3

Class A has:

  • Network ID =2⁷-2 = 126 (Here 2 address is subtracted because 0.0.0.0 and 127.x.x.x are special address. 127.x.x.x is reserved for localhost )
  • Host ID = 2²⁴-2 = 16,777,214
The IP address belonging to Class A range from 1.a.a.a to 126.a.a.a.(where a ranges from 0 to 255)

Class B

The IP address belonging to Class B uses the first two octets to identify the network and the last two octets are used to identify the host.

  1. The Network ID has 14 bits.
  2. The Host ID has 16 bits.

The first two bit of the first octet is always set to 10.

The subnet mask for class B is 255.255.0.0.

So, class B has:

  • Network IDs = 2¹⁴ = 16384 network ID
  • Host IDs = 2¹⁶ = 65534 host address
The IP address belonging to Class B range from 128.0.a.a to 191.255.a.a.(where a ranges from 0 to 255)

Class C

The IP address belonging to Class C uses the first three octets to identify the network and the last octet is used to identify the host.

  1. The Network ID has 21 bits.
  2. The Host ID has 8 bits.

The first two bit of the first octet is always set to 110.

The subnet mask for class B is 255.255.255.0.

So, class C has:

  • Network IDs = 2²¹= 2097152
  • Host IDs = 2⁸= 254
The IP address belonging to Class C range from 192.0.0.a to 223.255.255.a.(where a ranges from 0 to 255)

Class D

The IP address belonging to Class D has the first four bits of the first octet set as 1110. The remaining bits are the host bits.

The IP address belonging to Class D range from 224.0.0.0 to 239.255.255.255.

Which Class Of Ip Address Your System Have Failed

Class D is reserved for multicasting. Also, this class doesn't have any subnet mask.

Class E

The IP address belonging to Class E has the first four bits of the first octet set as 1111. The remaining bits are the host bits.

The IP address belonging to Class D range from 240.0.0.0 to 255.255.255.254.

This class is reserved for future use, research and development purposes. It also doesn't have any subnet mask.

How to identify the IP class from a given IP address?

So, using the above knowledge given an IP address you can identify the class of the IP address.

You can do it by looking at the first octet of the IP address. Convert the dotted-decimal IP address to its binary equivalent.

  • If it begins with 0, then it’s a Class A network.
  • If it begins with 10, then it’s a Class B network.
  • If it begins with 110, then it’s a Class C network.
  • If it begins with 1110, then it’s a Class D network.
  • If it begins with 1111, then it’s a Class E network.

Alternatively, you can learn the range of IP addresses of each class.

That’s it for this blog. Hope you learned something new today.

Do share this blog with your friends to spread the knowledge. Visit our YouTube channel for more content. You can read more blogs from here.

Keep Learning :)

Team AfterAcademy!

  • IPv4 Tutorial
  • IPv4 Useful Resources
  • Selected Reading

There are a few reserved IPv4 address spaces which cannot be used on the internet. These addresses serve special purpose and cannot be routed outside the Local Area Network.

Private IP Addresses

Every class of IP, (A, B & C) has some addresses reserved as Private IP addresses. These IPs can be used within a network, campus, company and are private to it. These addresses cannot be routed on the Internet, so packets containing these private addresses are dropped by the Routers.

In order to communicate with the outside world, these IP addresses must have to be translated to some public IP addresses using NAT process, or Web Proxy server can be used.

The sole purpose to create a separate range of private addresses is to control assignment of already-limited IPv4 address pool. By using a private address range within LAN, the requirement of IPv4 addresses has globally decreased significantly. It has also helped delaying the IPv4 address exhaustion.

IP class, while using private address range, can be chosen as per the size and requirement of the organization. Larger organizations may choose class A private IP address range where smaller organizations may opt for class C. These IP addresses can be further sub-netted and assigned to departments within an organization.

Loopback IP Addresses

The IP address range 127.0.0.0 – 127.255.255.255 is reserved for loopback, i.e. a Host’s self-address, also known as localhost address. This loopback IP address is managed entirely by and within the operating system. Loopback addresses, enable the Server and Client processes on a single system to communicate with each other. When a process creates a packet with destination address as loopback address, the operating system loops it back to itself without having any interference of NIC.

Data sent on loopback is forwarded by the operating system to a virtual network interface within operating system. This address is mostly used for testing purposes like client-server architecture on a single machine. Other than that, if a host machine can successfully ping 127.0.0.1 or any IP from loopback range, implies that the TCP/IP software stack on the machine is successfully loaded and working.

Link-local Addresses

In case a host is not able to acquire an IP address from the DHCP server and it has not been assigned any IP address manually, the host can assign itself an IP address from a range of reserved Link-local addresses. Link local address ranges from 169.254.0.0 -- 169.254.255.255.

Classes Of Ip Address

Assume a network segment where all systems are configured to acquire IP addresses from a DHCP server connected to the same network segment. If the DHCP server is not available, no host on the segment will be able to communicate to any other. Windows (98 or later), and Mac OS (8.0 or later) supports this functionality of self-configuration of Link-local IP address. In absence of DHCP server, every host machine randomly chooses an IP address from the above mentioned range and then checks to ascertain by means of ARP, if some other host also has not configured itself with the same IP address. Once all hosts are using link local addresses of same range, they can communicate with each other.

Which Class Of Ip Address Your System Have Been Replaced

These IP addresses cannot help system to communicate when they do not belong to the same physical or logical segment. These IPs are also not routable.

Coments are closed
Scroll to top