VLSM and Subnetting Practice.

On the last article, we mostly talked about Subnetting theory, however, subnetting is one of those topics which you don’t really understand until you practice, practice and… practice. I mean, you still need the theory of course, but you need just enough theory to get you started with the practice. While practicing, you are going to hear “click!” in your head… many times.

We can use Subnetting to perform a few tasks; to find the Network Id and the Broadcast address of a given network, also to find out to what subnet a specific IP address belongs, but mainly, we will use subnetting to divide a network space into smaller networks called subnetworks or Subnets, and dividing a network into smaller subnets has a few benefits:

  • Organizational:
    Provides the ability to create one subnet for each department in your company but still  have communication between them.
  • Security:
    Network resources can be distributed across different subnets, each with its own set of security policies.
  • Flexibility:
    If properly implemented, subnets allow for future growth regarding both number of users, and/or network equipment.
  • Better network performance:
    Subnets break up Broadcast domains. So, instead of having one big Broadcast domain, there will be many smaller Broadcast domains, one for each subnet.

A network space can be subnetted to fit specific requirements; we might need subnets that would allow a specific number of hosts -this is usually the case-, or maybe the requirement is a specific number of subnets.
Also, we can divide the network space evenly (subnets of equal sizes), or we can apply a concept called Variable Length Subnet Mask (VLSM) which allows for a network space to be divided into subnets of varying sizes.
Since we already covered finding the Network ID and Broadcast address in our previous article, let’s talk about VLSM to get this article started.

 

Variable Length Subnet Mask (VLSM)

We just said that a network space can be divided into equal size subnets, for example; if we have a network space with 254 usable addresses, we can divide it into 2 subnets that will allows 126 users each using a 255.255.255.128 mask, or we can divide it into 4 subnets of 62 users each, using a 255.255.255.192 mask, and so on.

Note: If this concept is still not that clear, please read my previous article “So you want to learn IPv4 subnetting?” before you continue.

However, in some scenarios, subnetting like this can lead to wasting lots of address space, because as you can see below, we’ll end up with fixed mask’s lengths, like this:

Single, 254 usable addresses network, divided into:

2 Subnets

192.168.10.0/25 – 126 usable addresses.
192.168.10.128/25 – 126 usable addresses.

4 Subnets

192.168.10.0/26 – 62 usable addresses.
192.168.10.64/26 – 62 usable addresses.
192.168.10.128/26 62 usable addresses.
192.168.10.192/26 62 usable addresses.

Notice that the masks do not change between each subnet, hence, the number of users are equal in all subnets as well; 126 users on the “2 subnets” scenario, and 62 users on the “4 subnets” scenario.
But this is fine, just as long as we have the same number of users to assigned, and the number of users is close to the max allowed on each subnet so we can have enough growing space without wasting too many addresses.
For example, for the first scenario, let’s say we have exactly 252 users total and we need to assign 126 users to the 1st subnet, and the other 126 users to the 2nd subnet, this works out perfectly because a subnet mask of 255.255.255.128, as we know, gives us exactly 126 usable addresses per subnet… that’s great!… there is no much room for future growth though… hmm.

But what if we had different number of users? for example, 126 users in one group and 30 in another group. We could assign the 126 users to the 1st subnet as we just saw, however, there will be lots of wasted address space when we assign the other 30 users to the 2nd subnet, specially if we do not expect significant growth for this particular subnet, right?

Enter VLSM, it allows us to divide one network space into subnets of  variable sizes, hence the name Variable Length Subnet Mask. VLSM allows us to tailor our network space to fit our needs, without losing flexibility.

Note: Please know that there are different ways of doing subnetting, I mean, the results will be the same, but the way of doing the actual exercise can be different. I am going to show you one of those ways which is the way I learned it, but please know that there are other ways and none of them are wrong just as long as you end up with the same results.
My suggestion is to learn and stick to one of those ways while you are learning, because after a while, you’ll be doing subnetting in your head and in your own way provably.

Before we start the exercise, let’s take a look at the un-subnetted network topology from the scenario we’re going to be working with, just so we can have a before and after picture, to compare:

no_vlsm

As you can see in the topology above, all 106 users in this network are on the same, single broadcast domain, any computer on any department can reach every other computer and there is one single point of failure which is Switch1 in the middle of the topology… what would happen if that switch fails?…

Let’s see if we can solve these issues next, but before we move on to the actual practice, there are a couple of concepts that you need to take into consideration when working a subnetting scenario and they might not be so obvious if you don’t stop and think about them, they are:

  • Future growth space (Expandability).
    When subnetting, you need to allocate space, not only for the number of current users, but also for any expected future growth (both users and/or network equipment).
  • Router Topology:
    The most common will be point-to-point links between routers, but whichever the case, you will need to allocate address space for them as well, for example, each point-to-point link is a single, 2 users subnet. Don’t forget.

 

Practice.

The scenario presented below, is the scenario we talked about in our previous article, “So you want to learn IPv4 Subnetting?“, which you should read to understand the theory behind subnetting. It was like this:
You are in charge of a network that allows a total of 254 (256-2) users (192.168.10.0/24), but the company has a total of 106 employees; 4 in HR, 4 in Accounting, 2 in Legal, 11 in IT, 55 in Sales and 30 in the Warehouse.
You need to create subnets that would allow for these number of users and prevent the waste of IP addresses as much as possible.

The scenario tells us that we need to create subnets that would allow a specific number of users, so in this particular scenario, we should end up with a total of 6 subnets, and each should allow the indicated number of users (at least).

vlsm

The picture above shows the new topology after VLSM subnetting. OK, I hope this was helpful for you…no, just kidding, sorry, let’s find out how we got there.

OK, finally, let’s get started. Subnetting is accomplished in 6 steps:

1. Organize subnets.
Always start with highest number of users needed, so organize the subnets in descending order (highest to lowest).

  • Sales – 55
  • Warehouse – 30
  • IT – 11
  • Acc. – 4
  • HR – 4
  • Legal – 2
  • R1-R2 – 2 *
  • R2-R3 – 2 *
  • R3-R1 – 2 *
* Don’t forget about these.

2. Add the number of users needed, to the number of addresses needed for future growth, and convert the result to binary:

In this case, because these is the Sales subnet, the expected growth is high, so we are going to leave plenty of room, say 60 addresses. So:

55 users + 60 for future growth= 115

115 = 1110011

What we are really looking for here, is the number of bits needed to get to decimal 115. This means that you don’t even have to convert the whole number, once you find the first bit (the underlined 1 in this case), you can just count the remaining bits.
So, 7 bits are needed to get to decimal 115.

3. Convert the classfull (un-subnetted) mask to binary:

255.255.255.0 = 11111111 11111111 1111111 00000000

4. On the binary mask, reserve the number of bits needed and turn any remaining host bits into network bits (from 0 to 1):

Number of bits from step 2: 7 bits, so:

11111111 11111111 1111111 00000000

The 7 green 0s are the reserved bits, and the remaining blue o turns into a network bit, a 1.

11111111 11111111 1111111 10000000

5. Find the interesting octet and  Increment.
As we already learned in our previous article (again, read it if you haven’t), the last network bit on the new mask -the red 1-, tells you in which octet we are going to do the subnetting, as well as the increment.

Interesting Octet: 4th

 Increment: 128

6. Find the range.

Always starting from 0 for the first subnet, add the increment which is 128, like this:

192.168.10.0

192.168.10.128

But please know, and this might be tricky, that these two addresses are actually the first addresses of two separate subnets, so 192.168.10.o is the first address of one subnet (the first subnet which will be the Sales subnet), and 192.168.10.128 is the first address of the next subnet.
In other words, the first subnets goes from 192.168.10.0 to 192.168.10.127, and the second subnet starts at 192.168.10.128. Like this:

ranges

We do not know the usable addresses nor the broadcast address of the second subnet, because we haven’t subnetted it yet. However, we do know which is the first address of the second subnet, and that is the address we are going to start from to get our second subnet (Warehouse).
So let me repeat the steps to find the second subnet (without the play-by-play commentary) and I’ll let you do the rest. See if you can come up with the rest of the subnets as shown in the picture at the end of the article.

For the second subnet, the Warehouse subnet, we are looking for 30 users, and since the warehouse employees will provably grow as well, we are going to leave 30 more addresses, so:

  1. Add needed addresses and extra addresses:
    30 + 30= 60 addresses
  2. Convert to binary:
    60 in binary is 111100
    6 bits are needed
  3. Reserve the bits:
    11111111 11111111 1111111 00000000
  4. Turn the two remaining hosts bits to network bits (0 to 1)
    11111111 11111111 1111111 11000000
  5. Last network bit is the increment:
    Increment is 64
  6. Find the range (starting from the 1st address of the second subnet, the one we found earlier, the 192.168.10.128 address:
    192.168.10.128 ← Start of the Warehouse subnet.
    192.168.10.192 ← Start of the next subnet.
    so, the Warehouse subnet goes from 192.168.10.128 to 192.168.10.191.

 

OK, I really hope this is clear, it is a very tricky subject to  explain on paper, this is why you really need to practice.
If you have any questions at all, please contact me and I’ll be happy to help in any way I can.

Down below, there is a table which contains all the subnets ranges. We already did Sales and Warehouse, see if you can find the rest and then compare them to the table below. Good luck!

 

 

 

 

1st Subnet – Sales

Mask

255

255

255

128

First IP

192

168

10

0

Hosts

192

168

10

1 to 126

Last IP

192

168

10

127

2nd Subnet – Warehouse

Mask

255

255

255

192

First IP

192

168

10

128

Hosts

192

168

10

129 to 190

Last IP

192

168

10

191

3rd Subnet – IT

Mask

255

255

255

224

First IP

192

168

10

192

Hosts

192

168

10

193-222

Last IP

192

168

10

223

4th Subnet – HR

Mask

255

255

255

248

First IP

192

168

10

224

Hosts

192

168

10

225-230

Last IP

192

168

10

231

5th Subnet – Accounting

Mask

255

255

255

248

First IP

192

168

10

232

Hosts

192

168

10

233 to 238

Last IP

192

168

10

239

6th Subnet – Legal

Mask

255

255

255

252

First IP

192

168

10

240

Hosts

192

168

10

241 to 242

Last IP

192

168

10

243

7th Subnet – R1 – R2

Mask

255

255

255

252

First IP

192

168

10

244

Hosts

192

168

10

245 to 246

Last IP

192

168

10

247

8th Subnet – R2 – R3

Mask

255

255

255

252

First IP

192

168

10

248

Hosts

192

168

10

249 to 250

Last IP

192

168

10

251

9th Subnet – R3 – R1

Mask

255

255

255

252

First IP

192

168

10

252

Hosts

192

168

10

253 to 254

Last IP

192

168

10

255

 

Advertisements

Published by

BroadcastStormER

Man. Father. Husband. CCNA R&S Certified. Network Technology Freak. Cisco-NetRider 2014 - 7th place. Wine and/or Scotch Enjoyer. Argentinean Asado (Argentinean BBQ) Cook. Professional life´s pleasurable moments enjoyer.

6 thoughts on “VLSM and Subnetting Practice.”

    1. Hi Nils, I will check my post but without even looking at it, I will tell you that you are correct, there are 254 usable addresses (256-2) on a /24 network, so if it says 252…it is wrong. I really appreciate you taking the time to let me know.

      Like

  1. The new droid bionic looks like it could be a serious game changer. the quad cores make it nearly untouchable by any other smart phone on todays market in temrs of sheer performance. great post tho admin i linked to it.

    Like

  2. Very minor detail, but it threw me for a loop:

    On your final configuration illustration, you have 3 users in Legal on a /30 subnet (2 usable IPs). Everywhere else you have only 2 users in Legal, so it actually works. Just an observation.

    Thank you for the article – very clear and easy to follow.

    Like

What do you think...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s