What is a fixed-length subnet mask (FLSM)?
A fixed-length subnet mask (FLSM) refers to a type of enterprise or provider networking where a block of IP addresses is divided into multiple subnets of equal length, i.e. an equal number of IP addresses. FLSM streamlines packet routing within the subnets of a proprietary network.
A subnet can be a geographically defined local area network (LAN). Alternatively, it may define security boundaries, departmental boundaries, multicast zones or hardware security parameters. One benefit is to create locally significant subnet identification addresses
Subnetting means dividing a network into multiple smaller subnetworks by using a subnetting mask. In FLSM, the number of IP addresses is the same in each subnet. Another way of saying this is that the same number of IP addresses are allocated to each subnet. Therefore, the subnet mask used will be the same for all the subnets.
This differentiates FLSM from variable-length subnet mask (VLSM) or classless subnetting, where each subnet has different lengths, and includes different hosts and networks. VLSM may be considered the more modern and more efficient approach to subnetting.
In FLSM, once a packet arrives at an organization's main gateway with its network number, it is routed to its ultimate destination using a subnet number. The FLSM is usually a string of binary digits shown over the subnet number, telling the router which parts of the subnet number to look at.
A binary "1" over a particular digit in the subnet number says, "Pay attention to this digit." A "0" says, "Ignore this digit."
FLSM is also known as classful subnetting or traditional subnetting.
Benefits and drawbacks of FLSM
When it was first introduced, FLSM was simply known as "subnetting." Its biggest benefit is that it validates the idea of borrowing bits from an IP address host field to create locally-significant subnet identification addresses.
The use of FLSM saves a router the task of having to handle an entire IP address, because the router deals only with the digits selected by the mask. Further, it divides the address space into an adequate number of subnets and can therefore meet the needs of large LANs.
In IP classes of IPv4 addresses, there are fixed subnets with a fixed number of hosts and networks. For example, a class C IP address has a 24-bit network part and an 8-bit host part. Similarly, Class A addresses have an 8-bit network part and a 24-bit host part.
What this means is that in this method of subnet masking, subnets are rarely filled to capacity. This results in the inefficient use of IP address space, and a significant waste of unused addresses.
To overcome these challenges, a VLSM is better. In networks with many unassigned IP addresses, VLSM uses IP address space more efficiently, and thus prevents waste.
Fixed-length subnet mask examples
Let's look at a couple of FLSM examples.
FLSM topology example 1
Consider a topology that requires five subnets, and FLSM with the address 184.108.40.206/23. In this case, three bits can be borrowed from the third octet and two bits from the last octet of the host portion to meet the requirement of five subnets. Borrowing these three bits creates eight subnets, and also leaves six host bits and 62 usable hosts per subnet.
Although this system divides the address space to create the desired number of subnets and satisfies the host requirements of even large LANs, it results in a major waste of unused addresses. It also reduces the total number of available subnets, and thus limits the network's growth.
FLSM topology example 2
Suppose IPv4 Prefix 100.100.0.0/24 is to be divided into two subnets: Subnet 1 and Subnet 2. Here, the subnet mask is /24, which means that the first 24 bits are network bits, while the remaining eight are host bits.
To divide this network, some bits will have to be borrowed from the host part of the IP address. This number will be determined based on the subnets required -- in this case, two. After borrowing this address, the network part will be 25 bits, and the host will be seven bits.
For the two new subnets, the subnet mask will be /25. And the subnets will have addresses:
- Subnet 1: 100.100.0.0/25
- Subnet 2: 100.100.0.128/25