IP Subnetting and Variable Length Subnet Masks (VLSMs)
It’s time to jump into how to design and implement VLSM networks. First, let’s take a look at a classful network, and then redesign the IP address scheme to work with VLSM. Check out Figure 3.2. It has a network with 14 subnets running only classful addressing.
Fourteen subnets with no VLSM applied
The mask of 255.255.255.240 (/28) provides 14 subnets, each with 14 hosts. All hosts and router interfaces use the same subnet mask.
Lab D S0/1 _
Lab E S0/1 _
Lab F S0/1 _
To figure out how many networks you have, you need to count the router interfaces in Figure 3.2. It’s OK if you don’t understand the difference between the F0/0, F0/1, S0/0, etc., in the figure, because you’ll learn about those in the next chapter. For now, just understand that the F0/0 is a FastEthernet LAN interface and the S0/0 is a WAN connection. Each interface is its own subnet or network. The WAN links between two routers are one subnet, and each router must have a valid host address on that configured subnet for the two routers to be able to com- municate with each other.
The only IP subnet option for the network design in Figure 3.2 is to use the 255.255.255.240 mask, because this will give us 16 subnets, each with 14 hosts. In Figure 3.2, the circled numbers are the subnets assigned to the network that’s connected to the router interface.
But the WAN links are point-to-point, and use only two IP addresses. So we’re basically wasting 12 valid host addresses per WAN link! Let’s take a look at Figure 3.3.
Remember, we can use different size masks on each interface. If we do that, we get 2 hosts per WAN interface and 14 hosts per LAN interface—nice! It makes a huge difference—not only can we get more hosts on a LAN, we still have room to add more WANs and LANs on the same network.
In Figure 3.3, each LAN has a /28 or 255.255.255.240 mask, which provides each LAN with 14 hosts, but each WAN used the /30 or 255.255.255.252 mask. Are you wondering why the sub- nets are listed as they are? Why the WAN links are subnets 4, 8, 12, 16, and 20, and the LANs start at subnet 32, and work in blocks of 16 up to subnet 160? Good—glad you’re thinking about that! You’re on the right track. The rest of the section will explain how all this came to be.