Home||Table of Contents||2008 Back Issues||2009 Back Issues||Contact the Editor||Contact the Webmaster||

by John Lockie

Let’s Talk About Subnetting…


Bookmark and Share
John Lockie

I am an IT Director in the construction industry.
I enjoy management, and I enjoy high level infrastructure IT. The way I see myself being able to bridge these two loves is via the CCIE certification. This journal is for my own personal satisfaction. I do a lot more than just CCIE studies. Some of the technology I work with every day includes: Microsoft (no duh, but mostly server technology), Citrix, NetApp, VMWare, HP, Linux, and so on. Because of this, I may randomly post interesting things going on around me such as Enterprise Vault Exchange Deployments, WAN Optimization Projects, BES best practices, or even patch deployment, DataONTAP hacks, etc.


John's blog can be read at http://www.johnpatricklockie.com/

Subnetting is tricky, but not difficult. What sets the expert apart is the ability to subnet quickly, and then on top of that to do variable length subnetting.

First, I would like to thank 3 people in teaching me some of the cool tricks of the trade, which guided me to completing this chart.

  1. Omar Faytrouni: originator of the chart that I based my chart off of….great guy.
  2. Richard Haskins: my first CCNA and CCSP instructor, who opened the world of networks and IT up to me! He doesn’t teach anymore, but he is missed!
  3. Albert Amoyaw: professor from my recent CCNA bootcamp. Showed me some new time slashing techniques that I wrapped in to this chart behind the scenes! I thank him for the motivation I have to do this chart…

So a few years ago when I was taking some Microsoft courses (after I had taken a bundle of CCNA and CCSP courses) a professor by the name of Omar Faytrouni presented to us a nifty little chart to aid in subnetting. I placed this chart on the internet, and over the years it has spread on the net. You can Google Omar and find that chart. I currently host the original copy at my old site which is coming down in a couple of months. Here it is in all it’s glory (without explanation).

The Omar Faytrouni TCP/IP Chart

What’s wrong with this chart? Nothing really. How the heck do you use it though (it does come with instructions!)? I will say, it’s a cinch to memorize, but if I have to use it on a test I think I would be faster just counting bits on the paper. This chart requires a lot of memorization still, and requires doing math on the side. Omar would probably argue with me on that, but he would be wrong. He’s a brilliant guy, and I learned a ton from him about Microsoft. But I don’t think he realized just how fast his brain was. This chart was like a string around his finger, and not all of us are that quick. I need the answer key, not the string. But I really felt he was on to something all these years, and I watched many students get a lot out of using this chart. Wanting to make something out of it for myself, and something that can carry me through a CCIE written and even a lab environment I took some time to make this:

CDR = (bits +x) Example /24+1 = 25 0r 255.255.128.0

And now, I can subnet anything in a matter of seconds. I can also find out host, subnet, and range information from an IP address given a CIDR or a subnet mask. Literally, in seconds if that. I was showing this to our Network Admin today and he caught on almost right away (he obviously already understands the concepts of subnetting). I think I am on to something here. I have taken the best aspects of Omar’s chart (primarily, that it’s easy to replicate on test day), and added greater and quicker resources, and made it still extremely easy to remember and replicate. I defy any CCNA candidate to tell me they would have a hard time subnetting off of this chart, or even remembering how to replicate the chart. So let’s break it down a little – because I will probably use this post to point people to directions on how to use this thing (if it’s not obvious).

Oh, one more thing – this chart is not dependent upon the colors. The colors are there for instruction – to make it sort of “obvious” what the numbers represent. Once you learn how to use the chart it should become painfully obvious and easy to use without the kindergarten color scheme!

First, let’s discuss how to discover networks using this chart. For those problems that ask something like: “what is the default gateway for IP address 172.16.26.4 /22“. Now, any student knows this is a CLASS B address and to borrow from the 3rd octet. This CIDR we know is borrowing 6 bits from the /16 default (if you don’t know, /16 is 255.255.0.0 and that is considered CLASS B). If we were going to borrow 4 bits, this would be a CIDR of /20. Some organizations will subnet private IP address without consideration for classful systems (it is common to treat LAN IP’s as “classless”). For example, you will see the “10″ network used as a CLASS C IP address even though from a “standards” perspective it is CLASS A. I can admit in my networks we subnet 10 as a /22. Anyway, since we have a CIDR we can use that as a starting point. Check the charts “CIDR” section:

CDR = (bits +x) Example /24+1 = 25 0r 255.255.128.0

For us, we will look at the “+6″ column. Why? Because /22 is /16+6…..so let’s see where our bits land when we are on a +6 CIDR….

We immediately see how many NETWORKS we are going to have. That is, 64. This field is in blue. The blue fields represent the last “1″ bit in our subnet mask. In this example we know that CIDR /22 is going to give us 64 networks. Now let’s examine the entire row of bits to determine the subnet mask, host ranges, and total amount of hosts on this network. This chart is both vertical and horizontal, but 80% of the information you get from it will be on the “X” axis. We simply use the “Y” axis to determine our CIDR (or if we only have a CIDR to start with we start there!).

To the left is our subnet mask, 252. Being a CLASS B IP address, we now know our subnet mask for 172.16.26.4 is not only /22, but 255.255.252.0.

The body of the table is a logical representation of the bit masking going on. In the case of a CLASS B subnet scenario we know this will be the structure of our 3rd octet:

1 1 1 1 1 1 0 0 ‹-- the reality
1 1 1 1 1 (64) (4) 0 ‹-- my representation to show where network ends and hosts start

I have replaced the last “1″ and the first “0″ with the number of networks, and range of hosts!

The 2^2 is just another way of showing that we have 2 bits available for host address in this octet (2 to the power of 2). That means every 4 numbers in this octet (the third octet) we have entered a new “network”. But this does not represent the total amount of host ID’s for this subnet. It just tells us, look at the 3rd octet and count in “4’s” to find out what particular network an address is in….

1,2,3,4 5,6,7,8 , etc.

So if we have IP 172.16.26.4 we know that’s going to fall here:

172.16.0.1 - 172.16.3.254
172.16.4.1 - 172.16.9.254
172.16.8.1 - 172.16.11.254
172.16.12.1 - 172.16.15.254
172.16.16.1 - 172.16.19.254
172.16.20.1 - 172.16.2.254
172.16.24.1 - 172.16.27.254
172.16.28.1 - 172.16.31.254
....and so on for 64 total lines!

172.16.26.4 /22 will have a default gateway of 172.16.24.1! How easy was that? Too easy. Let’s try 1 more….

What is the network range for the address: 172.16.63.25 /18

/18 = +2
+2 = 255.255.192.0
4 networks with 64 hosts in each network

172.16.0.1 - 172.16.63.254
172.16.64.1 - 172.16.127.254
172.16.128.1 - 172.16.191.254
172.16.192.1 - 172.16.254.254

Easy…..network range is 172.16.0.1 - 172.16.63.254

Okay, what about if we are asked to subnet a CLASS B and provide for “x” number of networks!?!?

This is why I put the network and host ranges down the chart from top left to bottom right. To keep this an “X” axis chart that requires very little “thought”. So if someone asks you to subnet their CLASS B range to provide for 12 networks you go right to the blue “16″ (because 12 is greater than 8, but less than 16) that sits on the last bit of the hostmask….here’s the answer graphically, you can figure the rest out:

If you would like to know some tips on how to build the chart from memory read on….

Finally, building the chart is easy. All you need to know is this:
1 2 4 8 16 32 64 128 256

Subnet masks are incremented, starting at 128....
128 + 64 = 192
192 + 32 = 224
224 + 16 = 240
240 + 8 = 248
248 + 4 = 252
252 + 2 = 254
254 + 1 = 254

Notice that the "+" is simply the binary steps (look at middle column of #'s!), starting with 128 as the mask, and 64 to add. ...and the result carries over to calculate the next mask...if you stare at it long enough you will catch on

Start by listing the subnet masks. If you know binary, just remember 128! Then go down to 255.....

Now list all the "bits" from top down, starting with 1,0 like this:
1 0 0 0 0 0 0 0
1 1 0 0 0 0 0 0
1 1 1 0 0 0 0 0
1 1 1 1 0 0 0 0
1 1 1 1 1 0 0 0
1 1 1 1 1 1 0 0
1 1 1 1 1 1 1 0

On the last 1's of each row replace them with 2 -> 128
On the first 0's of each row replace them with 128 -> 2

Now top it off with CIDR numbers 1-8 at the top! DONE!

In a test it will look like this:

+1 +2 +3 +4 +5 +6 +7 +8
[128] 2n 128c 0 0 0 0 0 0
[192] 1 4n 64c 0 0 0 0 0
[224] 1 1 8n 32c 0 0 0 0
[240] 1 1 1 16n 16c 0 0 0
[248] 1 1 1 1 32n 8c 0 0
[252] 1 1 1 1 1 64n 4c 0
[254] 1 1 1 1 1 1 128n 2c
[255] 1 1 1 1 1 1 1 255n

I used "n" for network bit, and "c" for client bit here....easy!

I built this by starting with the SUBNET MASKS

Give me network range for 192.168.63.177 /26
+2 for CIDR
4 networks, with 64 clients in each network (remember, drop DOWN to the network bit not client bit)
just looking at that IP I can say it falls in the range:

192.168.63.128 ---> 192.168.63.191

Subnet mask: 255.255.255.192

Easy? Well, I hope I don't have any errors in my own article =P (I already had to fix a couple)


Return to the top of 'Let’s Talk About Subnetting…'.
Send Feedback


Home||Table of Contents||2008 Back Issues||2009 Back Issues||Contact the Editor||Contact the Webmaster||
All rights reserved CCIE Agent, Ltd. |><| A Dan-n-Eman Publication