Classful Vs Classless Addressing


Classful Address

The first addressing system to be implemented as part of the Internet Protocol was Classful Addressing. In the year 1981, the Classful addressing network architecture was first used on the Internet. The Classful addressing system was superseded by a Classless addressing scheme with the introduction of Classless Inter-Domain Routing (CIDR) in 1993.

  • The IP address comprises up of 32 bits and is split into four sections separated by dots: part 1, part 2, part 3, and part 4.

  • The IP address is made up of four parts, each of which is eight bits long (1 byte).

  • Further, the 4 parts of the IP address is divided into parts: a network ID and a Host ID.

Types of Classful Address

Class A, Class B, Class C, Class D, and Class E are the five varieties of Classful addresses. In IPv4, this classification is known as Classful addressing or IP address classes.

  • The first three classes, Class A, B, and C, are used for "public addressing", in which communication is always one-to-one between source and destination. It implies that when data is transmitted from a source, it will only be sent to a single network host.

  • The reserved categories include Class D and Class E, with Class D being utilized for multicast and Class E being saved for future usage exclusively.

  • In IPv4, the Network ID is the first part of Class A, B, and C, while the Host ID is the remaining second portion.

  • The Host ID always indicates the number of hosts or nodes in a certain network, whereas the Network ID always identifies the network in a specific place.

  • In Class A, B, and C, the address space is split into a certain number of IP address blocks. It also specifies the maximum number of hosts in a network.

Network and Host part in Classful Addressing

The first octet or byte of an IP address is part of the network ID (short for Net-ID), while the next three octets or three bytes are part of the host ID in Class A. (in short, host-ID).

  • The network ID takes up the first two octets or two bytes in Class B, whereas the host ID takes up the remaining two octets or two bytes.

  • In Class C, the first three octets or bytes are dedicated to the network ID, while the last octet or byte is dedicated to the host ID.

Classless Addressing

Classless Inter-Domain Routing (CIDR) is another name for classless addressing. This addressing type aids in the more efficient allocation of IP addresses. This technique assigns a block of IP addresses based on specified conditions when the user demands a specific amount of IP addresses. This block is known as a "CIDR block", and it contains the necessary number of IP addresses.

When allocating a block, classless addressing is concerned with the following three rules.

  • Rule 1 − The CIDR block's IP addresses must all be contiguous.

  • Rule 2 − The block size must be a power of two to be attractive. Furthermore, the block's size is equal to the number of IP addresses in the block.

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

For example, assume the classless address is 192.168.1.35/27.

  • The network component has a bit count of 27, whereas the host portion has a bit count of 5. (32-27)

  • The binary representation of the address is: (00100011 . 11000000 . 10101000 . 00000001).

  • (11000000.10101000.00000001.00100000) is the first IP address (assigns 0 to all host bits), that is, 192.168.1.32

  • (11000000.10101000.00000001.00111111) is the most recent IP address (assigns 1 to all host bits), that is, 192.168.1.63

  • The IP address range is 192.168.1.32 to 192.168.1.63.

Difference Between Classful and Classless Addressing

  • Classful addressing is a technique of allocating IP addresses that divides them into five categories. Classless addressing is a technique of allocating IP addresses that is intended to replace classful addressing in order to reduce IP address depletion.

  • The utility of classful and classless addressing is another distinction. Addressing without a class is more practical and helpful than addressing with a class.

  • The network ID and host ID change based on the classes in classful addressing. In classless addressing, however, there is no distinction between network ID and host ID. As a result, another distinction between classful and classless addressing may be made.

Conclusion

There are two forms of IP addressing: classful and classless. The primary distinction between classful and classless addressing is that classless addressing provides for more efficient allocation of IP addresses than classful addressing. In a nutshell, classless addressing avoids the problem of IP address exhaustion that can arise with classful addressing.

Updated on: 31-Oct-2023

42K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements