IP Address Classes

In the previous lesson, we learn that It is not easy to identify the network and the host portion of any dotted decimal IP address for the reason that the IP addresses are not actually four numbers. They actually consist of 32 different numbers or 32 bits. We learn that an IP address classes used to define the network and host portions. IPv4 addresses were grouped into five separate classes that are Class A, B, C, D, and E. Chart illustrate all important figures of IP address classes. 

Class A 

This network is 8-bit network prefix. The most significant bit of class A network is set to 0, this most significant bit is also called high order bit(HOB). This class contains a 7-bit network number and a 24-bit host number. Figure illustrate Class A, address bit distribution.

IP Address Classes

If the first bit (most significant bit) of the first octet of an IP address is a binary 0, the address is a Class A address.  With that first bit being a 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 -127  in the first octet is a Class A address. These two numbers, 0 and 127, are reserved and cannot be used as a network address. 0 and 127 will be explained later in this article.

Class A network can accommodate very large networks, so only the first octet is used to represent the network number. The other three octets or 24 bits are used to represent the host portion of the network. Each network of this class supports a maximum of 16,777,214 (2 24 -2) hosts per network. The two is subtracted because the lowest and highest addresses are reserved for the special purpose. The lowest address is 24, 0s in host portion and the highest address is 24, 1s in host portion.

Each network requires a network identification number that is used to refer to the entire range of hosts when building routing tables. The address that contains all 0s in the host portion is used as the network identification number. So address that has all 0s in host portion cannot be used with the individual host. 10.0.0.0 is a Class A Address. If we see the host portion which contains all 0s, so it is a network identification. Also, every network requires a broadcast address that can be used to send a message to each host on a network. This address contains all 1s on the host portion. For example, a broadcast address for network 10.0.0.0 would be 10.255.255.255.

As we learn that only the first octet is used as a network number, and it contains a value between 0 and 127; in which 0 and 127 are reserved, so 126 Class A networks exist. Each of the 126 Class A network has almost 17 million host addresses that make up 50 % of the entire IPv4 address space.

0.0.0.0 address is reserved for default route, the default route will be explained later. 127.0.0.1 address is reserved for the local loopback address, which is why Class A network range is from 1 – 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 a company. Class A network provide a huge global network with those many hosts, the hosts in such a network could not function as members of the same logical group.

Network administrators require smaller logical groupings to control broadcasts, apply policies, and troubleshoot problems. This can be possible by applying subnet mask which allows subnetting. A subnetting breaks a large block of addresses into smaller groups called subnetworks. Subnetting avoids a waste of IP address and it’s also helpful for better efficiency.Default subnet mask for class A IP address is 255.0.0.0. Private IP address range for class A is 10.0.0.0 to 10.255.255.255.

Class B 

Most significant bit or high order bit of class B addresses are starts with a binary 10 in the first 2 bits of the first octet. So, the lowest number of class B address is 10000000, decimal 128 and the highest number is 10111111, decimal 191. In the other words, class B IP address range in the first octet is from 128 – 191. Any address that starts with this range is class B IP address.

Class B network can accommodate medium size networks. So, the first two octets are used to represent the network, and the other two octets represent the host portion of the address. Class B has 16384 (214) Network addresses and 65534 (216-2) Host addresses. Remember that two, the lowest and highest values, which are reserved for special purposes. So, each Class B network can support up to 65,534 hosts. As you can see,  that it is much smaller than the networks of Class A. Just like Class A networks, Class B addresses are also subnetted to improve network efficiency. The figure illustrates 32 bits distribution of Class B network.

IP Address Classes

 As we can see in the above figure that the first 2 bits of a Class B address are always 10, So 14 bits are left in the network portion of the address, resulting in 214 or 16,384 Class B networks. The first octet of a Class B address has 64 possibilities that are from 128 to 191. The second octet has 256 possibilities, that are from 0 to 255. That give 16,384 networks. We can simply multiply 64 with 256 that will total possible network in class B.

Default subnet mask for class B IP addresses is 255.255.0.0. Class B addresses are also a private IP address range. Which is from 172.16.0.0 to 172.31.255.255

Class C

The high order bits for class C address are binary 110. So, the lowest number that starts with binary 110 is 11000000, which decimal is 192. The highest number that starts with binary 110 is 11011111, which decimal is 223. So IPv4 address the range of class C 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 IP address. The last octet represents the host number. The figure illustrates class C address bits distribution.

IP Address Classes

As we learn that 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 containing a 254 (28 -2) hosts each. The two is reserved for network identification and broadcasting. Address with all-0s and all 1s in the host portion are subtracted, therefore only 254 hosts may be addressed on a Class C network.

Default subnet mask for class C IP addresses is 255.255.255.0. Class C addresses are also a private IP address range. Which is 192.168.0.0 to 192.168.255.255

Class D

A Class D address begins with binary 1110 in the first octet. So, the lowest number is binary 11100000 which decimal is 224 and the highest number is 11101111 which decimal is 239. So the range of class D addresses is from 224-239 in the first octet.Class D addresses are not used to address any individual host. Instead of individual host, each Class D address can be used to with a group of hosts called a host group. That group of host called multicast group.

When a single message is sent to several selected recipients that are called a multicast or multicasting. Class D addresses are also called multicast addresses which are used to send a message to a group of several. A multicast is different from a 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 first octet of class E IP address begins with 1111, the range of this class is starting with 11110000, decimal 240 and end 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 and should not be used to address hosts or multicast groups.

 

IPv4 Addressing

IPv4 is the fourth revision of the IP and a widely used protocol for data communication over different kinds of networks. IPv4 is defined and specified in IETF publication RCF 791. It is used in packet-switched link layer in the OSI model. A connectionless protocol provides the logical connection between network devices and providing identification for each device. There are many ways to configure IPv4 addresses on the network devices – including manual and automatic configurations – depending on the network type.IPv4 uses 32-bit addresses for Ethernet communication in five classes, which is A, B, C, D and E. Classes. 

Address Architecture of the Internet

While TCP/IP was introduced in the 1980s, at that time internet uses a two-level addressing scheme. At the time, this scheme offered sufficient scalability. The 32-bit-long IPv4 address identifies a network number and a host number, Figure- illustrate the 32-bit address in the 1980s.

Currently, the IPv4 address has also 32 bit and it also contains two portions, network portion, and host portion. Network portion identifies the network of the host and host portion show the number of the host in the network. Host portion is used to identify the device or the host. The router uses the network portion of the address to make routing decisions and to facilitate communication between hosts that belong to different networks.

Like routers and computer, humans can’t work with strings of 32,  1s and 0s. Therefore, 32-bit IP addresses are written using dotted-decimal notation. Each 32-bit address is divided into four groups of eight, called octets. An octet is ranging from 000000000 to 11111111. Each octet is converted to decimal and then separated by decimal points or dots. The range of each octet in decimal is from 0 to 255.  

A 32-bit IP address:

11101101010111011000001000010101

  • The four octets of the 32-bit address
  • 11101101 01011101 10000010 00010101
  • Decimal of each octet:

237 93 130 21

  • The address was written in dotted decimal notation:

237.93.130.21

Classes of IP Address

It is very difficult to identify the network portion and host portion of any dotted decimal IP address because that IP addresses are not actually four numbers. They actually consist of 32 different numbers or 32 bits.

In the early days of TCP/IP, a class of IP address was used to define the network and host portions. IPv4 addresses were grouped into five separate classes. This was done according to the value of the first few bits in the first octet of the address. These bits are called high order bits(HOB). Although the class system can still be applied to IP addresses, networks today often ignore the rules of class in favor of a classless IP scheme.

In a class system, IP addresses can be grouped into five different classes:

  • A
  • B
  • C
  • D
  • E

Where A, B, and C have a different bit length for addressing the network host. Class D addresses are reserved for multicasting, while Class E addresses are reserved for future use.

Each of the four octets of an IP address represents the network portion or the host portion, depending on the address class. The network and host portions of the respective Class A, B, C, and D addresses are shown in Figure 2

The first three classes A, B, and C are used to address actual hosts on IP networks. Class D addresses are used for multicasting. Class E addresses are reserved for experimentation in labs and medical equipment and are not shown in Figure 2.

Note – If you think your friends would find this useful, Please share it with them I’d really appreciate it.