IPv4 Classful Network Exclusive Explanation

A classful network is a network addressing architecture used in networks since 1981. RFC 790 and 791, released in 1981, describe how IPv4 network addresses were primarily allocated based on a classification system. The authors of IPv4 addresses set up three classes of network addresses: class A, B, and C for different network sizes.

Classful network addresses are defined with a specific format for the high-order bits (HOB). High-order bits (HOB) are the most significant bits in a 32-bit address. Classful network addresses remained in use until the introduction of Classless Inter-Domain Routing in 1993. The method divides the IP address space for IPv4 into five address classes based on the leading four address bits.

Class A Network

The high-order bit for Class A addresses is 0. Large organizations use this class. The address range starts from 0.0.0.0 to 127.255.255.255. The 0.0.0.0 address is reserved for default routing, and the 127.0.0.0 address is reserved for loopback testing.

Class B Network

The high-order bits for Class B Network addresses are 10. Medium-to-large organizations use this class. The range of Class B addresses is 128.0.0.0 to 191.255.255.255.

Class C Network

The High Order Bit for Class C Network addresses is 110. Small-to-medium organizations use this class. The address range starts from 192.0.0.0 to 223.255.255.255.

Class D Network

The High Order Bits for Class D addresses are 1110. This class is used for multicasting. Multicasting is a technique for finding a group of hosts that are part of a multicast group. The Range starts from 224.0.0.0 to 239.255.255.255.

Class E Network

The High Order Bits for Class E addresses are 1111. Class E address is also Reserved for experimental and future use. The range starts from 240.0.0.0 to 255.255.255.255. The address 255.255.255.255 is reserved for switch broadcasting.

High Order Bit (HOB)

The most significant bit (MSB), also known as the high–order bit, is the bit position in a binary number having the greatest value. It is the left-most bit due to the convention in positional notation of writing more significant digits further to the left. The table below illustrates the High-Order bit.

Classful Network Subnet Masks

The RFC 790 also define the default subnet mask for each network class.

Class A Address Subnet Mask

The classful network of class A used the first octet to identify the network portion of the address. The default subnet mask of Class A is 255.0.0.0. The first bit of Class A address from 0.0.0.0 to 127.0.0.0 is always 0; only 7 bits were left in the first octet. So, this made 2 to the 7th power or 128 networks. However, two networks, 0.0.0.0 and 127.0.0.0, are reserved for default route and loopback testing.

So, the actual number of networks for Class A is 126 (1-126) networks. The remaining 24 bits use the host in the host portion, so each class A address had the potential for over 16 million individual host addresses. The host portion must be 0, and the network portion must be 1s in the subnet mask. The figure below illustrates the Class A address default subnet mask.

Class B Address Subnet Mask

The Classful Class B networks used the first two octets to identify the network portion of the network address. The first two bits of the first octet, 10, define the network class, so 14 bits in the first two octets define the number of networks. The number of the network in a class B network is 2 the power of 14th, meaning 16,384 class B network addresses.

The 3rd and 4th octet is for the host, so each class B classful network address contains 16 bits in the host portion, meaning the number of hosts per subnetwork of Class B is 2, the power of 16th, the resulting host per classful network is 65536. The figure below illustrates the subnet mask of the Class B Address.

Class C Address Subnet Mask

The class “C” Classful networks used the first three octets to identify the network portion of the network address. The first three bits, 110, recognized the network class, and the remaining 21 bits for assigning networks for over 2 million class C networks. So, for each class C network, only 8 bits stay in the host portion. The 8 bits mean 254 possible host addresses in each Class C network. The figure below illustrates the Class C network subnet mask.

Classful Routing Protocol

The specific default subnet masks to each class made routing update messages smaller because the Classful routing protocol does not include the subnet mask information in their updates. So, the receiving router applies the default mask based on the value of the first octet or, more accurately, the first three bits of the address, which identifies the class.  Routing protocols, such as RIPv1, only need to transmit the network address of known routes.

It does not need the subnet mask in the routing update. The receiving router examines only the value of the first octet as the network address and determines the subnet mask or applies its ingress interface mask for subnetted routes.

Classful Network Addressing Waste

Classful network addresses waste a vast amount of address space. At the beginning of the Internet, organizations were assigned an entire classful network address from the A, B, or C class, resulting in IP address waste. So, allocating IP addresses in classful network addressing is very inefficient.

Class A addresses had 50% of the total IP addresses. However, it has only 126 networks, so it can be assigned to 126 organizations. The class A network uses 24 bits in the host portion, so we can calculate the IP address of each network, which is 224-2 = 16777214 addresses.

Classless addresses reduce this waste of gigantic IP addresses, but some companies and governmental organizations still have class A addresses. For example, General Electric has 3.0.0.0/8, Apple owns 17.0.0.0/8, and the U.S. Postal Service owns the 56.0.0.0/8 network.

Class B had 25% of the total address space. It has 16,384 networks, so 16384 organizations can get and use class B network addresses. A network uses 24 bits in the host portion, so we can calculate the IP address of each network, which is 216-2 = 65534 host addresses.

Class C had 12.5 % of the total address space. A network uses 8 bits in the host portion, so we can calculate the IP address of each network which is  28-2 = 54 host addresses. A small organization can get and use class C networks, but the total number of hosts is often limited in the class C networks. Classes D and E are used for multicasting and reserved addresses. It had 12.5 % of the address space. The pie chart illustrates the address space in different classes.

classful network addresses

The chart below illustrates the total network, host per network and maximum hosts in Class A, B, and C.

classful network addresses