Variable Length Subnet Mask (VLSM)

Hello Hanson

Remember that network devices see the IP address as a series of 32 bits. They don’t see decimal, they don’t see octets. Just a stream of bits. Now the subnet mask is used to separate that train of 32 bits into two sections: the network section and the host section. In order to get a subnet of 512 addresses, the host section must have enough bits to represent 512 addresses. How many bits is that? The answer is 9. (2^9 = 512).

Therefore, out of the 32 bits in the IP address, the host section must be 9 bits, which means the network section must be 23 bits. So the subnet mask is composed of 23 ones, which mark the network section, and 9 zeros which mark the host section. So it’s something like this:

11111111111111111111111000000000

Let’s put in the dots where they would go in the IP address and we get:

11111111.11111111.11111110.00000000

Now if we convert it to decimal we get

255.255.254.0

Now if we’re starting with 172.16.0.0 255.255.254.0, we have to keep in mind what range this refers to. This network address and subnet mask combination refer to an IP address range of 172.16.0.0 to 172.16.1.255 (remember, 512 addresses.) The very next available IP address to continue the subnetting procedure is 172.16.2.0, and that is why we continue with that one.

I hope this has been helpful!

Laz