What is a Variable Length Subnet Mask (VLSM)

What is a Variable Length Subnet Mask (VLSM)

Limitations of fixed-length subnetting

 Subnetting, which divides networks, is inflexible in large networks. With simple subnet division, all the divided subnets have an equal size, so you end up assigning more IP addresses than necessary.

 For example, in the network shown below, consider dividing the "192.168.1.0/24" network into subnets and assigning subnets.

The required number of subnets is 6.

 28-host network ・・・ 1
 10-host network ・・・ 1
 24-host network ・・・ 1
 Between routers ・・・ 3

 The subnet with the most hosts is the subnet with 28 hosts. Including the IP addresses of the router interfaces, 29 IP addresses are required.

Therefore, 5 bits or more are required for the host part.

In other words, you need to divide by "/27" to meet the required number of subnets and still have the required number of hosts.

 However, with a simple subnet division, only subnets of the same size can be created evenly, resulting in wasted IP allocation.

For example, between routers you only need two IP addresses to assign to the router's interfaces.

 The number of hosts per subnet is 2 5 -2=30 IP addresses, so 28 IP addresses are wasted. This is the limit of fixed-length subnetting.

VLSM (Variable Length Subnet Mask) allows efficient use of address space.

What is a variable length subnet mask (VLSM)?

 VLSM is simply subnetting of subnets. Subdivide the subdivided subnets. With VLSM, addresses can be assigned in a hierarchical fashion, so subnets can be aggregated and handled.

 Being able to aggregate subnets allows routers to reduce the size of their routing tables, thus reducing the CPU and memory load of routing lookups.

 In addition, since multiple subnet mask lengths can be used, the address space can be effectively utilized. For example, as explained in "Limit of fixed-length subnet division" above, in the network configuration shown below, 28 IP addresses between routers are wasted.

Therefore, if you assign IP addresses with VLSM, you can assign them as follows, for example.

 The last subnet "192.168.1.224/27" obtained by dividing "192.168.1.0/24" into eight sub-nets is further divided into eight sub-nets and allocated between routers.

You can leave 4 subnets on your LAN for future expansion and 5 subnets on your WAN connection (between routers) for future expansion.

The example of division here is just one example, and any subnet can be divided as long as the IP address ranges do not overlap.

You can also use different prefixes for each.

 Network of 28 hosts ・・・ "/27"
 Network of 14 hosts ・・・ "/27"
 * 15 IP addresses are required if router interfaces are added
 Network of 10 hosts ・・・ "/28"
 Between routers   ・・・・ "/30"