COMPUTER NETWORK AND SECURITY

Classful Address

 

In networking, Classful addressing refers to the traditional method of assigning IP addresses based on predefined classes. The concept of classful addressing was used in the early days of the Internet before the introduction of Classless Inter-Domain Routing (CIDR). The classes (Class A, Class B, and Class C) determined the size of the network and the number of hosts it could accommodate. Here's a brief overview of classful addressing:

  • Class A Addresses:
    • Range: 1.0.0.0 to 126.0.0.0
    • Default Subnet Mask: 255.0.0.0
    • Network Portion: The first octet (8 bits) represents the network, and the remaining three octets (24 bits) are for hosts.
    • Number of Networks: 128 (2^7)
    • Number of Hosts per Network: Approximately 16.7 million (2^24 - 2)
  • Class B Addresses:
    • Range: 128.0.0.0 to 191.255.0.0
    • Default Subnet Mask: 255.255.0.0
    • Network Portion: The first two octets (16 bits) represent the network, and the remaining two octets (16 bits) are for hosts.
    • Number of Networks: 16,384 (2^14)
    • Number of Hosts per Network: Approximately 65,534 (2^16 - 2)
  • Class C Addresses:
    • Range: 192.0.0.0 to 223.255.255.0
    • Default Subnet Mask: 255.255.255.0
    • Network Portion: The first three octets (24 bits) represent the network, and the last octet (8 bits) is for hosts.
    • Number of Networks: 2,097,152 (2^21)
    • Number of Hosts per Network: 254 (2^8 - 2)
  • Class D Addresses (Multicast):
    • Range: 224.0.0.0 to 239.255.255.255
    • These addresses are reserved for multicast groups, and they are not used for host addressing.
  • Class E Addresses (Experimental):
    • Range: 240.0.0.0 to 255.255.255.255
    • These addresses are reserved for experimental purposes and are not used for general networking.

Each class had a fixed default subnet mask, and the allocation of IP addresses was based on the class of the network. This classful addressing system had limitations, especially in terms of address space utilization. It led to IP address shortages and inefficient allocation of addresses.

The introduction of CIDR (Classless Inter-Domain Routing) allowed for more flexible allocation of IP addresses by allowing variable-length subnet masks. CIDR superseded classful addressing and became the prevailing addressing scheme on the Internet. In CIDR, the notation includes a prefix length (e.g., /24) to indicate the number of bits used for the network portion, providing a more granular and efficient method of addressing.

 

Problem with Classful Addressing

 

The classful addressing specified in RFCs 790 and 791 resulted in a tremendous waste of address space. In the early days of the Internet, organizations were assigned an entire classful network address from the A, B, or C class.

As illustrated in the figure:

  • Class A had 50% of the total address space. However, only 126 organizations could be assigned a class A network address. Ridiculously, each of these organizations could provide addresses for up to 16 million hosts. Very large organizations were allocated entire class A address blocks. Some companies and governmental organizations still have class A addresses. For example, General Electric owns 3.0.0.0/8, Apple Computer owns 17.0.0.0/8, and the U.S. Postal Service owns 56.0.0.0/8.
  • Class B had 25% of the total address space. Up to 16,384 organizations could be assigned a class B network address and each of these networks could support up to 65,534 hosts. Only the largest organizations and governments could ever hope to use all 65,000 addresses. Like class A networks, many IP addresses in the class B address space were wasted.
  • Class C had 12.5 % of the total address space. Many more organizations were able to get class C networks, but were limited in the total number of hosts that they could connect. In fact, in many cases, class C addresses were often too small for most midsize organizations.
  • Classes D and E are used for multicasting and reserved addresses.

The overall result was that the classful addressing was a very wasteful addressing scheme. A better network addressing solution had to be developed. For this reason, Classless Inter-Domain Routing (CIDR) was introduced in 1993.

Classless Addressing

 

Classless Inter-Domain Routing (CIDR) is a method of IP addressing that does not adhere to the traditional classful addressing system. Unlike classful addressing, where IP addresses were grouped into predefined classes (Class A, B, and C), CIDR allows for a more flexible allocation of IP addresses by using variable-length subnet masks. This approach provides greater efficiency in utilizing IP address space and allows for more precise control over routing.

Key features of CIDR and classless addressing:

  • Prefix Length Notation:
    • CIDR notation expresses IP addresses using a prefix length, denoted by "/X" where X is the number of bits used for the network portion of the address. For example, a CIDR notation of "/24" indicates that the first 24 bits represent the network, and the remaining bits are for hosts.
  • Variable-Length Subnet Masks (VLSM):
    • CIDR allows network administrators to use subnet masks of varying lengths within the same IP address space. This enables the creation of subnets with different sizes, optimizing address utilization.
  • Efficient Address Allocation:
    • With CIDR, networks can be allocated based on actual need, rather than being restricted to fixed block sizes defined by classful addressing. This results in more efficient use of IP addresses and helps to address the problem of IP address exhaustion.
  • Aggregation:
    • CIDR facilitates route aggregation, reducing the number of entries in routing tables. By summarizing IP address ranges into a single, aggregated route, CIDR helps to control the growth of routing tables in routers, leading to more scalable and efficient routing.
  • Subnetting Flexibility:
    • CIDR allows for the creation of subnets of different sizes within a given IP address range. This flexibility is beneficial in scenarios where some subnets may require more hosts than others.
  • Example:
    • In CIDR notation, an IP address range such as 192.168.1.0 to 192.168.1.255 with a subnet mask of 255.255.255.0 can be expressed as "192.168.1.0/24."
    • If a network needs more IP addresses, it could be subnetted further, such as "192.168.1.0/25" and "192.168.1.128/25," creating two subnets with 128 hosts each.

CIDR has become the standard addressing scheme for the Internet, and it has played a crucial role in extending the life of IPv4 by enabling more efficient use of the available address space.