The IP address belonging to Class D range from 188.8.131.52 to 184.108.40.206. 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.
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.
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: 220.127.116.11
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
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
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.
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:
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)
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.
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:
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)
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.
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:
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)
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 18.104.22.168 to 22.214.171.124.
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.
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.
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.
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 :)
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.
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.
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.
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.
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.
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.