You are on page 1of 5

VLSM Subnetting Explained with Examples

Subnetting is the process of dividing a single large network in multiple small networks
known as subnets. There are two types of Subnetting; FLSM Subnetting and VLSM
Subnetting.

VLSM Subnetting
The biggest advantage of VLSM Subnetting is that, instead of forcing us to
use a fixed size for all segments, it allows us to choose the individual size
for each segment. This flexibility reduces the IP wastage. We can choose the
size of subnet which closely matches with our requirement. Let’s
understand it with an example.

VLSM Example
Do the VLSM Subnetting of following network.

In this network: -

 Development department has 74 computers.


 Production department has 52 computers.
 Administration department has 28 computers.
 All departments are connected with each other via wan links.
 Each wan link requires two IP addresses.
 The given address space is 192.168.1.0/24.

Before we perform VLSM Subnetting for this network, let’s understand how
VLSM Subnetting actually works.

Basic concepts of VLSM Subnetting


VLSM Subnetting is the extended version of FLSM Subnetting. If you know
how FLSM Subnetting works and how it is done, you already know the 90%
of VLSM Subnetting. In FLSM, all subnets use same block size, thus
Subnetting is required only one time. In VLSM, subnets use block size
based on requirement, thus Subnetting is required multiple times.

The concept of VLSM Subnetting is relatively simple.

 Select block size for each segment. Block size must be greater than or equal to the
actual requirement. Actual requirement is the sum of host addresses, network address
and broadcast address.
 Based on block size arrange all segments in descending order.
 Do FLSM Subnetting for the block size of the first segment.
 Assign first subnet from subnetted subnets to the first segment.
 If next segment has similar block size, assign next subnet to it.
 If next segment has lower block size, do FLSM Subnetting again for the block size of this
segment.
 From subnetted subnets exclude the occupied subnets. Occupied subnets are the
subnets which provide the addresses which are already assigned.
 From available subnets, assign the first available subnet to this segment.
 Repeat above steps till the last segment of the network.

REVISITING CLASSFUL SUBNETTING


 

Earlier, it was required to use the same subnet mask across the network. This was
called classful networking. With increase in complexity of networks and decrease in available
IP addresses it became obvious that classful networking causes waste valuable of IP
addresses. To understand how, consider Figure 2-1. The largest subnet requires 30 host
addresses. So across the network a mask of /27 is used, which gives 30 hosts per subnet. You
will notice that in every subnet except the subnet attached to RouterD, some host addresses will
remain unused. In particular, 28 host addresses are wasted for each link between the routers. In
total this network wastes 118 addresses and uses 92 addresses.

CLASSLESS SUBNETTING

To avoid wasting of IP addresses, classless networking was introduced by way of VLSM.


VLSM allows you to use different subnet masks across the network for the same class of
addresses. For example, a /30 subnet mask, which gives 2 host addresses per subnet, can be
used for point-to-point links between routers. Figure 2-2 shows how VLSM can be used to save
address space in the network shown in Figure 2-1.

            Figure 2-2 Classless Network with VLSM

 In Figure 2-2, notice the different masks used for each subnet. The first network with 13 hosts
is using a mask of /28, which gives 16 hosts addresses. The point-to-point links between the
routers are using a /30 mask which gives 2 host addresses. In total the network is still using 92
addresses but is wasting only 22 addresses. Now that you know the benefit of VLSM, take a
look at how you can use it in a network.

There are a few restrictions you need to consider when planning to use VLSM:

1. You need to use routing protocols that support classless routing such as Enhanced
Interior Gateway Routing Protocol (EIGRP), Open Shortest Path First (OSPF), Border
Gateway Protocol (BGP) or Routing Information Protocol (RIP) version 2. Classful
protocols such as RIPv1 cannot be used with VLSM. While routing protocols are covered
in detail in Chapter 4, you should understand that a routing protocol is classful because it
does not advertise the subnet mask along with the network address in its updates.
Hence, routers running these protocols, do not know the subnet mask and strictly follow
the class of the network. Classless protocols on the other hand advertise and
understand subnet masks.
2. You need to use fixed block sizes. You have come across these block sizes during
subnetting practice For example in Figure 2-2, for the networks connected to RouterB
and RouterC, a block size of 32 was used even though the total addresses required
were 21 in each subnet.

Table 2-9 Block Sizes for VLSM

Block Host addresses available


Size
128 126
64 62
32 30
16 14
8 6
4 2
 

When designing a network using VLSM, the following simple steps can help come up with an
appropriate addressing scheme:

1. Start by finding the largest subnet in your network. The number of host addresses
needed decides the size of the subnet.
2. Next assigning an appropriate mask to the largest subnet using the block sizes
mentioned in Table 2-9.
3. Note the subnet numbers remaining with the mask used in Step 2.
4. Take the next available subnet and subnet it further to accommodate your smaller
subnets.
5. Write down your new subnet numbers again.
6. Repeat step 4 and 5 for smaller segments.

Consider the example shown in Figure 2-2 and work through the above steps to see how the
network address and subnet mask was found for each segment:

1. The largest segment in Figure 2-2 is attached to RouterD. It requires 30 host addresses,
including the router interface (29 host addresses and 1 router interface). So we can use
a /27 mask which gives us exactly 30 host addresses. We assign 192.168.1.0/27 to that
subnet.
2. Our new subnets using /27 mask are 192.168.1.0/27, 192.168.1.32/27, 192.168.1.64/27,
192.168.1.96/27, 192.168.1.128/27 etc.
3. Next we look at the smaller subnets. The subnets attached to RouterB and RouterC
require 21 host addresses (20 host addresses and 1 router interface). The block size we
can use for them is 32. We already have subnets available with /27 mask, so we simply
assign them to these segments – 192.168.1.32/27 and 192.168.64/27.
4. Our next smaller segment is the one attached to RouterA. It requires 14 host address, so
a block size of 16 or a mask of /28 can be used. So we take the next available subnet,
192.168.1.96/27 and subnet it further using a /28 mask. This gives us 192.168.1.96/28
and 192.168.1.112/28. We assign the first of these to this segment – 192.168.1.96/28.
5. Finally we have the three point-to-point segments between the routers. Each requires 2
host addresses hence a block size of 4 and a mask of /30. We take our available subnet
– 192.168.1.112/28 and subnet it further using a mask of /30. This gives us
192.168.1.112/30, 192.168.1.116/30, 192.168.1.120/30 and 192.168.1.124/30.  We use
the first three for these segments – 192.168.1.112/30, 192.168.1.116/30 and
192.168.1.120/30.

You might also like