Fix-Length Subnet Masking

Fix-Length Subnet Masking is a #Subnetting technique utilises the default subnet mask of an Address Class#. All non-reserved address classes has a default subnet mask, shown in the following table:

ClassesDefault MaskNotation
A255.0.0.0/8
B255.255.0.0/16
C255.255.255.0/24

We can get the subnet bits if the give subnet mask is larger than the default. Remember, the total bits used for #IPv4 Address is 32 bits. We know that it is composed of 2 parts: network mask bits and host bits. Thus, the following formulae:

$$ \begin{align} TB &= BB + BL\\ BB &= \lg(n) \end{align} $$

Where:

  • \(TB\) is the total bits of IPv4 address, which is 32 bits
  • \(BB\) is the total bits borrowed
  • \(BL\) is the total bits left
  • \(n\) is the total number of hosts needed to be assigned

Note: If \(BB\) is of decimal, we should round it up to integer value.

Once we get \(BB\), we could get the total number of assignable subnet using the formula \(2^{BB}\) (notice the similarity to the calculation for the total number of network hosts) where \(n\) denoted the number of subnet bits. To find out which octet should we used, calculate how many times \(BL\) could be divided by 256 until there is a remainder, which is the magic number itself. We can identify the subnet by using the first address available in the subnet (similar to how we can identify a network). The last address of the subnet is used for broadcasting.

However, using such addressing scheme can result in a rather wasteful host allocation, and it is prone to traffic confusion due to the result of route summarisation. The solution for it is to adopt Variable-Length Subnet Masking (VLSM).

Links to this page
#networking