Calculating subnets with VLSM
1.1.4 VLSM helps to manage IP addresses. This page will explain how to
use VLSM to set subnet masks that fit the link or segment requirements. A
subnet mask should satisfy the requirements of a LAN with one subnet mask and
the requirements of a point-to-point WAN with another.
The example in Figure shows a network that requires an address
scheme.
The example contains a Class B address of 172.16.0.0 and two LANs
that require at least 250 hosts each. If the routers use a classful routing
protocol, the WAN link must be a subnet of the same Class B network. Classful
routing protocols such as RIP v1, IGRP, and EGP do not support VLSM. Without
VLSM, the WAN link would need the same subnet mask as the LAN segments. A
24-bit mask of 255.255.255.0 can support 250 hosts.
The WAN link only needs two addresses, one for each router. That
means that 252 addresses would be wasted.
If VLSM was used, a 24-bit mask would still be applied on the LAN
segments for the 250 hosts. A 30-bit mask could be used for the WAN link
because only two host addresses are needed.
Figure shows where the subnet addresses can be
applied based on the number of host requirements. The WAN links use subnet
addresses with a prefix of /30. This prefix allows for only two host addresses
which is just enough for a point-to-point connection between a pair of routers.
In Figure , the subnet addresses used are generated
when the 172.16.32.0/20 subnet is divided into /26 subnets.
To calculate the subnet addresses used on the WAN links, further
subnet one of the unused /26 subnets. In this example, 172.16.33.0/26 is
further subnetted with a prefix of /30. This provides four more subnet bits and
therefore 16 (24) subnets for the WANs. Figure illustrates how to work through a VLSM
system.
VLSM can be used to subnet an already subnetted address. For
example, consider the subnet address 172.16.32.0/20 and a network that needs
ten host addresses. With this subnet address, there are 212 – 2, or
4094 host addresses, most of which will be wasted. With VLSM it is possible to
subnet 172.16.32.0/20 to create more network addresses with fewer hosts per
network. When 172.16.32.0/20 is subnetted to 172.16.32.0/26, there is a gain of
26, or 64 subnets. Each subnet can support 26 – 2, or 62
hosts.
Use the following steps to apply VLSM to 172.16.32.0/20:
- Write
172.16.32.0 in binary form.
- Draw a vertical
line between the 20th and 21st bits, as shown in
Figure . The original subnet boundary was /20.
- Draw a vertical
line between the 26th and 27th bits, as shown in
Figure . The original /20 subnet boundary is
extended six bits to the right, which becomes /26.
- Calculate the 64
subnet addresses with the bits between the two vertical lines, from lowest
to highest in value. The figure shows the first five subnets available.
It is important to remember that only unused subnets can be
further subnetted. If any address from a subnet is used, that subnet cannot be
further subnetted. In Figure , four subnet numbers are used on the LANs.
The unused 172.16.33.0/26 subnet is further subnetted for use on the WAN links.
The Lab Activity will help students calculate VLSM subnets.
The next page will describe route aggregation.
No comments:
Post a Comment