Loading...
Loading...
00:00:00

Classful Addressing

Classful addressing is a method of assigning IP addresses to devices on a network in which IP addresses are divided into fixed classes based on their first octet. The class of an IP address determines the network and host portions of the address, as well as the maximum number of networks and hosts that can be created within that class. The classful addressing system has been largely replaced by classless addressing, which is more flexible and efficient, but it is still important to understand how classful addressing works.

In classful addressing, the first octet of the IP address is used to determine the class of the address. The five classes are:

  • Class A: Addresses with a first octet in the range 1-126.
  • Class B: Addresses with a first octet in the range 128-191.
  • Class C: Addresses with a first octet in the range 192-223.
  • Class D: Addresses with a first octet in the range 224-239. These addresses are reserved for multicast traffic.
  • Class E: Addresses with a first octet in the range 240-255. These addresses are reserved for experimental use.

The number of bits used for the network portion and the host portion of the address is determined by the class of the address. The network portion of the address is always the first one, two, or three octets, depending on the class of the address, while the host portion is the remaining octets. The rules for determining the network and host portions of the address for each class are as follows:

  • Class A addresses have the first bit set to 0. The remaining 7 bits in the first octet represent the network portion of the address, while the remaining 24 bits represent the host portion. This allows for a maximum of 126 networks and over 16 million hosts per network.

  • Class B addresses have the first two bits set to 10. The remaining 14 bits in the first two octets represent the network portion of the address, while the remaining 16 bits represent the host portion. This allows for a maximum of 16,384 networks and over 65,000 hosts per network.

  • Class C addresses have the first three bits set to 110. The remaining 21 bits in the first three octets represent the network portion of the address, while the remaining 8 bits represent the host portion. This allows for a maximum of over 2 million networks and 254 hosts per network.

  • Class D addresses have the first four bits set to 1110. These addresses are reserved for multicast traffic and cannot be assigned to individual hosts or networks.

  • Class E addresses have the first four bits set to 1111. These addresses are reserved for experimental use and cannot be assigned to individual hosts or networks.

While classful addressing has some advantages, such as simplicity and consistency, it also has several disadvantages. One major drawback is that it is inflexible, as the number of networks and hosts that can be created within each class is fixed. This can lead to wasted IP addresses in networks that require fewer hosts than the maximum allowed by their class. Additionally, classful addressing does not support variable-length subnet masking (VLSM), which is an important feature in modern networks. For these reasons, classful addressing has largely been replaced by classless addressing, which allows for more efficient use of IP addresses and greater flexibility in network design.

The rules for assigning Host ID and Network ID vary based on the type of addressing scheme used in the network. In classful addressing, the rules for assigning host ID and network ID are as follows:

  1. Class A Addressing: In class A addressing, the first octet is used for the network ID, and the remaining three octets are used for the host ID. The first bit of the first octet is always set to 0, indicating that this is a class A address. The remaining 7 bits are used to represent the network ID. Therefore, the range of valid class A network IDs is from 0 to 127.0.0.0 The range of valid host IDs is from 1 to 16,777,214. In class A addressing, the first octet ranges from 1 to 126, with the value 127 being reserved for loopback testing.

  2. Class B Addressing: In class B addressing, the first two octets are used for the network ID, and the remaining two octets are used for the host ID. The first two bits of the first octet are always set to 10, indicating that this is a class B address. The remaining 14 bits are used to represent the network ID. Therefore, the range of valid class B network IDs is from 128.0.0.0 to 191.255.255.255 The range of valid host IDs is from 1 to 65,534.

  3. Class C Addressing: In class C addressing, the first three octets are used for the network ID, and the remaining one octet is used for the host ID. The first three bits of the first octet are always set to 110, indicating that this is a class C address. The remaining 21 bits are used to represent the network ID. Therefore, the range of valid class C network IDs is from 192.0.0.0 to 223.255.255. The range of valid host IDs is from 1 to 254.

  4. Class D Addressing: In class D addressing, the first four bits of the first octet are always set to 1110, indicating that this is a class D address. Class D addressing is used for multicast addresses, which are used for delivering data to a group of hosts. The remaining 28 bits are used to represent the multicast group ID. Class D addressing ranges from 224.0.0.0 to 239.255.255.255.

  5. Class E Addressing: In class E addressing, the first four bits of the first octet are always set to 1111, indicating that this is a class E address. Class E addressing is reserved for experimental purposes and is not used for normal network addressing.

These rules apply to the original classful addressing scheme, which has largely been replaced by the more flexible and efficient classless addressing scheme. In classless addressing, the boundaries between the network ID and the host ID are not fixed, and the network ID can be of any length. The host ID can also be of any length, depending on the size of the network.