Classful Vs Classless Addressing

Classful addressing is the original IP addressing scheme introduced in 1981 as part of the Internet Protocol. It divides IP addresses into predefined classes based on the first few bits of the address. This system was later replaced by Classless Inter-Domain Routing (CIDR) in 1993 due to inefficient IP address utilization.

An IP address consists of 32 bits divided into four 8-bit sections (octets) separated by dots. Each IP address is further divided into two parts: a Network ID that identifies the network and a Host ID that identifies the specific device within that network.

Classful Address Classes

Classful addressing defines five classes: Class A, B, C, D, and E. The first three classes are used for unicast communication, while Classes D and E serve special purposes.

  • Class A − First octet for Network ID, remaining three octets for Host ID. Supports large networks with millions of hosts.

  • Class B − First two octets for Network ID, last two octets for Host ID. Suitable for medium-sized networks.

  • Class C − First three octets for Network ID, last octet for Host ID. Designed for small networks with up to 254 hosts.

  • Class D − Reserved for multicast addressing.

  • Class E − Reserved for experimental purposes.

Classful Addressing Structure Class A Net Host Class B Net Host Class C Net Host 8 16 24 32 16 32 24 32 Network and Host portions in different classes

Classless Addressing (CIDR)

Classless Inter-Domain Routing (CIDR) was introduced to address the limitations of classful addressing. Instead of fixed class boundaries, CIDR uses a variable-length subnet mask to create more flexible and efficient IP address allocation.

CIDR notation uses the format IP_address/prefix_length, where the prefix length indicates how many bits are used for the network portion. For example, 192.168.1.35/27 means the first 27 bits represent the network, and the remaining 5 bits represent the host.

CIDR Block Allocation Rules

  • Rule 1 − All IP addresses in a CIDR block must be contiguous.

  • Rule 2 − Block size must be a power of 2 (2, 4, 8, 16, 32, etc.).

  • Rule 3 − The first IP address must be divisible by the block size.

CIDR Example

For the address 192.168.1.35/27:

  • Network bits: 27, Host bits: 5 (32-27)

  • Block size: 2^5 = 32 addresses

  • First IP: 192.168.1.32 (host bits = 00000)

  • Last IP: 192.168.1.63 (host bits = 11111)

Classful vs Classless Addressing

Feature Classful Addressing Classless Addressing (CIDR)
Structure Fixed classes (A, B, C, D, E) Variable-length subnet masks
Efficiency Leads to address wastage Efficient address utilization
Flexibility Limited to predefined sizes Custom block sizes based on needs
Notation Class-based (e.g., Class C) Slash notation (e.g., /24)

Conclusion

Classful addressing provided the foundation for early Internet growth but suffered from inefficient IP address allocation. Classless addressing (CIDR) revolutionized IP addressing by allowing flexible, variable-length subnet masks that significantly reduce address wastage and support more efficient network design.

Updated on: 2026-03-16T23:36:12+05:30

53K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements