IP address Classes- Exclusive Explanation
The IP address is an identifying number for network devices. It is similar to a home or business address supplying that specific physical location with a particular address—devices on a network differentiated from one another through IP addresses.
An IP address allows a device to communicate with other devices over an IP-based network, like the Internet. There are two primary standards for IP addresses: IPv4 and IPv6. In this article, I will discuss the IPv4 address. The IPv6 address will be discussed in later articles.
IPv4 Addressing
IPv4 is the fourth revision of IP and a widely used protocol for data communication over various networks. It is defined and specified in IETF publication RCF 791. A connectionless protocol provides logical connections between network devices and unique identification for each device.
Depending on the network type, we can configure the IPv4 addresses on the network devices manually or automatically. IPv4 uses 32-bit addresses for Ethernet communication in five IP address classes: A, B, C, D, and E.
Address Architecture
TCP/IP was introduced in the 1980s. At that time, the Internet used a two-level addressing scheme, which offered sufficient scalability. The 32-bit-long IPv4 address identifies a network and a host number, with 16 bits reserved for the network and 16 for host identification. The figure below illustrates the 32-bit address architecture in the 1980s.
The current IPv4 address is also 32-bit long and contains two portions: a network and host portions. The network portion identifies the host’s network, and the host portion shows the number of the host in the network. The host portion identifies the device or the host. The router uses the network portion of the IP addresses to make routing decisions and to facilitate communication between hosts that belong to different networks. Like routers and computers, humans can’t work with strings of 32 bits (1s and 0s).
Therefore, we express the 32-bit IP address in dotted-decimal notation, as we know that 32-bit addresses are further divided into four groups of eight, called octets. An octet ranges from 000000000 to 11111111. Each octet is converted to decimal and separated by decimal points or dots. The range of each octet in decimal is from 0 to 255.
For example, 10.10.10.1, 172.16.16.254 and 192.168.0.254 are IP addresses expressed in dotted decimal notations. If we can convert these addresses to binary. For example, the binary of the above addresses is 00001010. 00001010. 00001010.00000001, 10101100. 00010000.00010000. 11111110, 11000000. 10101000.00000000.11111110.
IP Address Classes
At the start of TCP/IP, the IP address classes define the network and host portions. IPv4 addresses are divided into five different IP address classes. The first few bits of the first octet determine the IP address class. These bits are known as high-order bits (HOB). Although the IP address classes can still be applied to IP addresses, networks today often ignore the class rules in favor of a classless IP scheme. The five IP address classes are A, B, C, D, and E.
Classes A, B, and C have different bit lengths for addressing the network host. Class D addresses are reserved for multicasting, while Class E addresses are reserved for future use. Depending on the address class, each of the four octets of an IP address represents the network portion of the host portion. The figure below illustrates the network and host portions of the respective Class A, B, C, and D addresses.
The first three IP address classes, A, B, and C, host addresses in any IP network. However, the Class D addresses are used for multicasting. Class E addresses are reserved for experiments in labs and medical equipment and are not shown in the above figure.
It is not easy to identify the network and host portions of any dotted-decimal IP address because IP addresses are not actually four numbers. They contain 32 different numbers or 32 bits (0 or 1s). The figure below illustrates all the important figures of IP address classes.
Class A
The most significant bit of the class A network is 0, also known as the high-order bit(HOB). The remaining seven bits in the first octet define the number of networks in class A addresses, and the three octets (24 bits) define the total number of IP addresses available in the class. The figure below illustrates Class A’s address bit distribution.
If the first bit of an IP address’s first octet is binary 0, the address is a Class A address. With the first bit being 0, the lowest number is 00000000 (decimal 0), and the highest number is 01111111 (decimal 127). Any address that starts with a value between 0 and 127 in the first octet is a Class A address. The numbers 0 and 127 are reserved and cannot be used as a network address.
Class A network can accommodate a very large number of hosts because only the first octet is reserved for the network number. The three octets, or 24 bits, are reserved for the host portion of the network. Each network of this class supports a maximum of 16,777,214 (2 24 -2) hosts per network. Figure two is subtracted because the first and last addresses are reserved as network IDs and broadcast IPs. The lowest address is 24, 0s in the host portion, and the highest is 24, 1s in the host portion.
The routing table uses network ID for the routing table. So, an address with all 0s in the host portion cannot be used with the individual host. For example, 10.0.0.0 is a Class A Address containing all 0s in the host portion. So it is network identification and cannot be configured on network hosts and devices.
Every network also requires a broadcast address, which can be used to send a message to each host on the network. This address has all 1s on the host portion. For example, a broadcast address for network 10.0.0.0 would be 10.255.255.255.
The total number of networks in Class A is 126. Each of the 126 Class A networks has almost 17 million host addresses, which make up 50 % of the entire IPv4 address space. The 0.0.0.0 address is also reserved for the default route. 127.0.0.0 is reserved for the local loopback address, which is why the Class A network range is from 1 to 126, and Class B addresses start from the address of 128.0.0.0.
A Class A network provides many possibilities for any organization or company. It is a huge global network with many hosts, and the hosts in such a network do not function as members of the same logical group.
Class A addresses creating a large broadcast domain, but network administrators need smaller logical groupings to control broadcasts, apply policies, and troubleshoot problems. This is possible by applying a subnet mask, which allows subnetting.
Subnetting breaks a large block of addresses into smaller groups called subnetworks. It avoids the waste of IP addresses and is also helpful for better efficiency. The default subnet mask for a class A IP address is 255.0.0.0. The private IP address range for class A is 10.0.0.0 to 10.255.255.255.
Class B
The high-order bit of class B addresses starts with a binary 10 in the first 2 bits of the first octet. So, the lowest number of class B addresses is 10000000 (decimal 128), and the highest is 10111111 (decimal 191). So, any IP address starts with a range between 128 – 191, and the first octet is a class B IP address. Class B network can provide addressing scheme to medium-size networks.
In Class B, the first two octets represent the network, and the other two represent the address’s host portion. So class B has 16384 (214) Network addresses and 65534 (216-2) Host addresses. So, each Class B network can support up to 65,534 hosts. The Class B network is much smaller than the networks of Class A. Just like Class A networks, we can subnet the Class B network to improve network efficiency. The figure below illustrates the 32-bit distribution of the Class B network.
The first octet of a Class B address has 64 possibilities ranging from 128 to 191. The second octet has 256 possibilities ranging from 0 to 255. That gives 16,384 networks. We can multiply 64 by 256 to get the total possible network in Class B. The default subnet mask for Class B IP addresses is 255.255.0.0. Class B addresses also have a private IP address range from 172.16.0.0 to 172.31.255.255.
Class C
The high-order bits of class C address are binary 110. So, the lowest number that starts with binary 110 is 11000000 (Decimal 192), and the highest number that begins with binary 110 is 11011111 (Decimal 223). So, the class C range is from 192 to 223 in the first octet.
Class C addresses were initially planned for a small network. The first three octets of a Class C address represent the network portion of the IP address, and the fourth octet represents the host portion. The figure below illustrates the distribution of Class C address bits.
As we learn, the first 3 bits of a Class C address are always 110, So 21 bits are left in the network portion of the address, which results in 221 or 2,097,152 Class C networks. Each network contains 254 (28 -2) hosts each. The first and last addresses are reserved for network identification and broadcasting. The default subnet mask for class C IP addresses is 255.255.255.0. Class C addresses are also a private IP address range starting from 192.168.0.0 to 192.168.255.255
Class D
The high-order bit of a Class D address is 1110 in the first octet. So, the lowest number starting with 1110 is binary 11100000 (Decimal 224), and the highest is 11101111 (Decimal 239). So, the range of Class D addresses is 224 to 239 in the first octet. Class D addresses are not used with individual hosts; they can be used with hosts called a host group or multicast group.
It is used when a single message requires sending to many selected recipients, known as multicast or multicasting. Multicast is different from broadcast. Every device on a logical network must process a broadcast, whereas only devices configured to listen for a Class D address receive a multicast.
Class E
The high-order bits of a class E IP address begin with 1111. The range of this class starts with 11110000 (decimal 240) and ends with 11111111 (decimal 255). So, the range of class E is from 240 to 255 in the first octet. Class E addresses are reserved for experimental purposes.