Classful and Classless IP Addressing – Exclusive Details

Classful Addressing

The IETF published the first major addressing scheme in September 1981 in RFC 790. The IP addressing scheme was 32 bits long and had three classes, A, B, and C, corresponding to 8-bit, 16-bit, and 24-bit prefixes. No other prefix lengths were allowed then, and there was no concept of nesting a group of 24-bit prefixes, such as within a 16-bit prefix.

Class D and E addresses were also defined, but neither of these two address classes was normally used. Class D addresses are reserved for multicasting, and Class E addresses are reserved for experimental and future use. The easiest way to distinguish between different address classes is to use the first decimal number in the IP address. Classful networks use the classful subnet mask according to the leading bits in the first block of the IP address. The figure below illustrates the key information of the Classful address scheme.

classful

Class A (0.0.0.0 to 127.255.255.255)

The default subnet mask for this class is 255.0.0.0 or /8. This class supports an extremely large network with more than 16 million hosts. The first octet’s high-order bits of Class A addresses are zero, so the remaining 7 bits create 128 possible Class A networks. 0.0.0.0 is used for the default router, and the 127.0.0.0 network is reserved for local loop testing. So, the remaining network is from 1 – 126 total 126 networks.

Class B (128.0.0.0 – 191.255.255.255)

The default subnet mask for the class b network is 255.255.0.0 or /16. Class b network support supports large networks with up to 65,000 host addresses. The high-order bits for the class b network are 10 in the first octet, and the remaining bits of the first 2 octets create over 16,000 networks. The network 169.254.0.0 is a special network for link-local addresses, also known as Automatic Private IP Addressing (APIPA).

Class C (192.0.0.0 – 223.255.255.255)

The default subnet mask for a Class C network is 255.255.255.0 or /24. Class C supports small networks with a maximum of 254 hosts. The first three bits of the octet indicate the high-order bit of the class. The remaining bits of the first three octets indicate the network and the fourth indicates host addresses in this class. The high-order bit is 110. A Class C address has over 2 million possible networks.

Class D (224.0.0.0 – 239.255.255.255)

The first four bits of the first octet in Class D IP addresses are high-order bits (HOB); the first four bits are 1110. The range of Class D addresses starts from 224.0.0.0 to 239.255.255.255. Class D is reserved for multicasting. In multicast communication, data is destined for multiple hosts, not for a particular host. The class has no subnet defined.

Class E (240.0.0.0 – 255.255.255.254)

The first five bits of the first octet are reserved HOB for Class E address. The HOB for Class E is 11111. The address range is 240.0.0.0 to 255.255.255.254. This class is reserved for experimental purposes only, such as R&D and study. Class E is also not equipped with a subnet mask like Class D.

Public IP Addresses

A public IP address range is defined for network devices, hosts, and servers like web servers and email servers to allow direct access to the Internet. Any server device using public IP addresses directly accessible from the Internet. A public IP address is globally unique and can only be assigned once to any device worldwide. Every device accessing the internet is using a unique IP address. Public IP addresses are also required for any publicly accessible network hardware, such as servers hosting websites. Public addresses are globally routed between different ISPs and routers. However, some addresses are not routable on the Internet. These addresses are called private addresses.

Private IP addresses

Private IPv4 addresses were introduced in 1990 because of reduced IPv4 addresses. The Private addresses are not unique and can be used repeatedly for internal networks. The computers at home, tablets, smartphones, network printers, and the computers within organizations are generally assigned private IP addresses. A computer with a private IP address can see and access the local network through its private IP address.

The computer and devices with a private IP address cannot directly access and communicate via the private IP address; however, using the router’s public IP addresses, the devices outside a private network can communicate. The NAT allows direct access to a local device assigned a private IP address. The range of private IP addresses is defined for all three classes.

10.0.0.0 /8 or 10.0.0.0 to 10.255.255.255

172.16.0.0 /12 or 172.16.0.0 to 172.31.255.255

192.168.0.0 /16 or 192.168.0.0 to 192.168.255.255

Classless Addressing

Classful addressing divides an IP address into the Network and Host portions along octet boundaries. It uses a fixed subnet mask, which is /8, /16 and /24, but classless addresses use a variable number of bits for the network and host portions of the address. The subnet mask is not fixed for a classless addressing system.

The classful addressing system assigned 50% of IPv4 addresses to Class A networks, 25% of IPv4 addresses to Class B, 12.5% of IPv4 addresses to Class C, and the remaining 12.5 % Shared to both Class D and E. The classful addressing plan wastes the most IP addresses, decreasing the availability of IPv4 addresses. For example, an organization with a network with more than 254 hosts would need a class B network with more than 65,000 addresses, wasting 64,700 IP addresses.

IETF introduced classless addressing to overcome the waste of IP addresses in 1993. There is no IP address class in a classless addressing system, but the addresses are still granted in blocks. In a classless addressing system, when an organization or individuals need connectivity to the Internet, it also grants a block or range of addresses according to the needs of the organization and individuals. For example, an individual requires only two addresses, and an organization is given thousands of addresses based on the number of its requirements.