Classless Subnetting

Classful subnetting is based on the default Class A, B or C networks. The classful network uses only the 

default mask for its classes (A, B, C).

Class A: 0 – 127 with a mask of 255.0.0.0 or /8

Class B: 128 – 191 with a mask of 255.255.0.0 or /16

Class C: 192 – 223 with a mask of 255.255.255.0 or /24

Routers running a classful routing protocol do not include subnet mask information with routing updates, the router assumes either its own subnet mask or defaults to the classful subnet mask.

On the other hand, classless subnetting allows the use of variable length subnet masks or VLSM. The classless network uses a CUSTOM subnet mask obtained by adding EXTRA bits to the default class mask. Routers running a classless network included subnet mask information with its routing updates.

100.110.0.0/19

10.5.50.0/26

172.16.16.0/22

172.16.16.0/15

CIDR

Classless Inter-Domain Routing (CIDR) introduce prefix. Because with the classless approach you can go right and left at the 32bits string, so it is easy to use the number of the place value as Subnet Mask. The prefix is easier to set and reference instead of using the full subnet mask address.

Examples /24 Network Subnetting

The examples we have seen so far borrowed host bits from the common /8, /16, and /24 network prefixes. but, subnets can borrow bits from any host bit position to create other masks.

For example here, a /24 network address is commonly subnetted by longer prefix lengths by borrowing bits from the fourth octet. This provides the administrator with further flexibility when assigning network addresses to a smaller number of end devices. The figure below illustrates the /24 network in into smaller networks.

  • /25, 1-bit borrowing from the fourth octet creating 2 subnets containing  126 hosts each subnet.
  • /26, 2-bit borrowing from the fourth octet creating 4 subnets containing  62 hosts each subnet.
  • /27, 3-bit borrowing from the fourth octet creating 8 subnets containing  30 hosts each subnet.
  • /28, 4-bit borrowing from the fourth octet creating 16 subnets containing 14 hosts each subnet.
  • /29, 5-bit borrowing from the fourth octet creating 32 subnets containing 6 hosts each subnet.
  • /30, 6-bit borrowing from the fourth octet creating 64 subnets containing 2 hosts each subnet

Subnetting Formulas

Advertisement

To calculate the exact number of subnets that can be produced the bits borrowed from the host portion, use the formula (1) and for the number of host per network use formula number (2).

The “n” is the number of bits borrowed from host portion. This formula will produce the number of the possible network. The bits in network portion and borrowed bits must be one in the subnet mask.

The “h” is the number of bits remaining in the host portion. This formula will produce the number of usable host addresses for each sub-network. There are two subnet addresses that cannot be assigned to any host, the network address and the broadcast address, so we must subtract 2 for usable host addresses.