Studying Into The Keyboard - VLSM
VLSM, or Variable Length Subnet Masks is a by-product of the advanced routing concepts of such routing protocols as IS-IS, OSPF, EIGRP and RIP version 2, called Classless Inter-Domain Routing (or CIDR, Cider, get it?). At its most simlistic VLSM allows you to take an already subnetted network, and subnet one or more of the subnets further, creating out of them yet more networks. It was developed, like all forms of subnetting, in response to the shrinking address space in the IEEE private network specifications. If you subnetted your network, in order to create seperate router links you would need to use one subnet per point-to-point link. That’s two addresses used out of potentially hundreds or thousands of addresses in that one subnet. A massive waste of addresses.
VLSM, therefore, allows you to specify one subnet for all of your router links and, upon subnetting it, instead of having hundreds of addresses wasted, you can have hundreds of extra networks, each with only the requisite two addresses. Lets run through an example (the actual point of this post, since I literally am studying into my keyboard. One of the best ways to learn somthing is to teach it to someone else, so that’s what I’m doing). Sit back, ladies and gentlemen, and prepare to be amazed, astounded, and bored to death! Binary, ho!
We start with the Class A private address: 10.0.0.0
It has the default subnet mask of: 255.0.0.0
We require 102 networks, one of which will be dedicated to point-to-point router links
As far as our subnetting is concerned the first octet doesn’t exist, since we can’t change it. Since we can’t change it we don’t worry about it. After that point, everything becomes binary:
255.00000000.00000000.00000000
What, boys and girls, is the subnetting formula? That’s right. 2n-2. Two to the power of an unknown and variable number, mnus two, will give us the number of useable networks. So, we need 102 of the little buggers? Well, we can’t do that purely in binary, so we have to go as close as we can, without getting under it. So we work with place-values. 1, 2, 4, 8, 16, so on, so forth. The closest we can get is 128. @8-2 gives us 128-2, or 126. Good. This fits, so we can work with it. We’re borrowing 8 bits for the root subnet. our subnet mask now looks like:
255.11111111.00000000.00000000
Or
255.255.0.0
If we draw an imaginary line down the seperator between the network portion and the host portion we get:
11111111.11111111|00000000.00000000
So, working from this, we start creating our subnets. Best practice states that, if you have ot have one network purely to be further subnetted for router links, you make it the final network, giving you all that extra room before it to logically scale the network with minimum fuss. So, if we do the first, say, 10 networks, including network address and broadcast, we get the following diagram:
10.00000001|00000000.00000000 First Network
10.00000001|11111111.11111111 First Broadcast
10.00000010|00000000.00000000 Second Network
10.00000010|11111111.11111111 Second Broadcast
10.00000011|00000000.00000000 Third Network
10.00000011|11111111.11111111 Third Broadcast
10.00000100|00000000.00000000 Fourth Network
10.00000100|11111111.11111111 Fourth Broadcast
10.00000101|00000000.00000000 Fifth Network
10.00000101|11111111.11111111 Fifth Broadcast
10.00000110|00000000.00000000 Sixth Network
10.00000110|11111111.11111111 Sixth Broadcast
10.00000111|00000000.00000000 Seventh Network
10.00000111|11111111.11111111 Seventh Broadcast
10.00001000|00000000.00000000 Eighth Network
10.00001000|11111111.11111111 Eighth Broadcast
10.00001001|00000000.00000000 Nineth Network
10.00001001|11111111.11111111 Nineth Broadcast
10.00001010|00000000.00000000 Tenth Network
10.00001010|11111111.11111111 Tenth Broadcast
...
10.11111110|00000000.00000000 Final Network
10.11111110|11111111.11111111 Final Broadcast
Okay. So, our big subnets are worked out, all fine ‘n’ dandy. That’s just plain old subnetting thus far. Now we come to the VLSM. We take our final subnet up there, and subnet it again. We stop thinking, now, of the number of networks we need. Now we think of the number of hosts per subnet. We need 2 hosts per subnet. In order to achieve this we need to borrow 2 bits, as 22 - 2 = 4 - 2 = 2. In order to achieve this we allocate the remainder of the bits, 30 in total, to networks, giving us the subnet mask of:
255.11111111.11111111.11111100
Or
255.255.255.252
Taking this, and acting as if our final subnet there was our root network, we get this (I’ll only do a couple):
10.254.00000000.000001|00
10.254.00000000.000001|11
10.254.00000000.000010|00
10.254.00000000.000010|11
Giving us router links on the networks 10.254.0.4, 10.254.0.8, 10.254.0.12, etc, etc. See the pattern? Going up by 4s. It makes things easier, believe me. That’s all there is to VLSM. It’s exactly like regular subnetting, just using a different address for your root network. Simple, once you know how.