subnetting ccna

Posted on 2014-01-13
Last Modified: 2014-01-15
I understand subnetting the long way, but that wont help on the exam. So I need to be able to get it quick for the exam. I understand the powers of 2 chart but I only know part of it and need some help and advice with the rest just to make sure I'm getting it right. Especially on the way they ask the questions or using cidr or not for th esubnet mask.

              2^7           2^6           2^5           2^4           2^3         2^2          2^1          2^0
            128            64              32             16              8              4              2              1            










I understand (I think) this so far - How many subnets and hosts can this IP  give you? /23?


So a /23 uses 7 extra bits in the mask for the network, so looking at the chart 2^7=128, so they could have 128 subnets (we only minus 2 for hosts from what I learned). So, using 7 bits for the network we have 9 bits leftover for hosts, we look at the chart 2^9 is 512-2=510, then 510 is the number of hosts we can have.

Is that correct? How do I find the subnet mask based on the chart above? Is it if I used 7 bits for the network then I would count 7 on the column on the left and that is 254. So the subet mask for this /23 address is, correct?


Also, what subnet does this IP reside on /16? This is where I need help since I dont know how to find the subnet increment.

Is this where I take the /23 as previously and see it uses 7 bits for the network and on the chart that would be increment of 128.

So it must live between the .0 and .128 networks and the range of usable hosts would be (I might have messed that up?)

 Also, if my logic is correct on this, is that I need to know for the exams?

How in the world can I use that chart for class A addresses with /20 bits used in the SM, seems impossible? How can it be done?

Question by:tolinrome
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 51

Expert Comment

ID: 39778314
First of all, you need to determine the address class of the IP address you are being questioned on.  The 172.20.x.x is a class B address.  By default, class B is a /16 subnet ( - so the mask is the default mask making one (1) subnet.

So the answer is (where .0 is the network number and .255 is the broadcast).

A class A IP address with a higher mask than /8 would be treated similarly.  How many bits of the third octet are you using?  Answer - 4.  Stay within the octet to determine your count just be sure to put the corresponding mask in the right octet and you'll get the right answer.  So, the mask is
LVL 25

Accepted Solution

Cyclops3590 earned 500 total points
ID: 39778370
Sorry for long post, but this is how I taught subnetting to my students when I did teach for a short while.  Hope it makes sense.

When doing subnetting, you're right, you need to be able to do it fast and practice is the only way you're going to answer the following:
1) Number of subnets
2) Number of hosts per subnet
3) Block size
4) Network Address
5) Broadcast Address
6) First usable address
7) Last usable address
With enough practice, you should be able to look at any IP address and answer all of those question in your head in under 15 seconds.  If you can't, practice more.  If you can, you're ready for CCNA and beyond when it comes to subnetting.  And note.  For the CCNA, they really don't ask you the simple questions like this.  But if you can't answer these questions  then you can't  answer the questions they'll ask on the cert test.

For this example, we'll use and answer the questions.

#1 requires identifying the class of the IP.  None of the others require this though.
In this case the IP is a class B address which has a default of /16 as the subnet.  However we are using a /27.  So how many subnets?  2 to the number of subnet bits.  27 - 16 = 11 subnet bits.  2 ^ 11 = 2048 subnets
HINT:  When you run into trouble multiply by 2 until you get the correct answer.  But you should at least remember the following to make things quicker on yourself:
2 ^ 2 = 4
2 ^ 3 = 8
2 ^ 4 = 16
2 ^ 10 = 1024

This is also simple.  There are 32 possible bits in an IP address.  Take the possible bits minus the subnet bit count.  Then take 2 to that number minus 2.  So 32 - 27 = 5.  2 ^ 5 = 32.  32 - 2 = 30 hosts per subnet.  Minus the 2 of course because of network address and broadcast address.

Block size is the size of each subnet (including network address and broadcast address).  Here you have to remember the octet boundaries.  /27 is greater than /24 so it puts the subnet mask into the 4th octet.  So we take 2 to the number of host bits in the octet we’re working in.  So 27 - 24 = 3 subnet bits in octet 4. So to get the block size, you take 8 - 3 = 5 host bits used.  Then 2 ^ 5 = 32.  So the block size is 32.  

Let’s say you had a /18 mask.  Well /18 is greater than 16 but less than 24 so you’re in the third octet.  So you take 18 - 16 = 2 subnet bits used in the mask in the third octet.  8 - 2 = 6 host bits.  2 ^ 6 = 64 block size.
This is important solely because it makes it easier to quickly identify the subnets when you have odd masks like /27, /28, or anything else that doesn’t end on octet boundaries.  This is the part that caused you to get 172.20…. subnetting incorrect in your original question post.

You should have the block size figured out before you figure this one out.  The reason is that you need to know the octet your subnet mask is into.  We’re in the 4th octet remember with the /27 mask and a block size of 32.  So knowing this, we know that the first 3 octets are locked:  190.159.45.X.  but what is X?  To figure that out we use the block size.  You always start at 0. is the first network address.  The next is, followed by,, etc.  Notice you start at zero and step up by the block size.  So to find the network address for the IP address in question, just figure out which network addresses its in between.  Clearly matches here. as 36 is greater than 32 but less than 64 for the 4th octet.

This one is easy.  Just look at the next network address and minus one.  Since the next is, you get as the broadcast address

This is also easy.  Take the network address and add one.  So you get

This is also easy.  Take the broadcast address and minus one.  So you get

But what about when you’re not dealing in the 4th octet.  “minusing one” is not as simple.  So say that you had instead
18 - 16 = 4.  2 ^ 4 = 16 subnets
32 - 18 = 14.  2 ^ 14 = big number.  2 ^ 10 * 2 ^ 4 = 1024 * 16 = 16384.
In third octet.  18 - 16 = 2 subnet bits being used.  8 - 2 = 6 host bits being used.  2 ^ 6 = 64 block size
190.159.X.0  The 4th octet is 0 because we’re dealing with the third octet for the subnet bits and so all bits in the 4th octet are host bits and thus 0 when looking at a subnet mask and network address.
1st subnet of, then,, (that’s all four subnet network addresses).  45 is greater than 0 but less than 64 so is the network address.
#5 - 1 = as broadcast address.  Think of it like 10 -1.  You look at the ones place but can’t subtract 1 from 0.  So you borrow from the tens position, reduce the tens place by one and then take the “10” units in the ones place now minus 1 to get 9.  In this case, you have to borrow 256 units from the third octet to put into the 4th octet before you minus the one. and you reduct the third octet by one.  (hope that makes sense).  This is the part that gets a lot of people
#6 + 1 = as first usable IP.
#7 - 1 = as the last usable IP.
LVL 31

Expert Comment

by:Gareth Gudger
ID: 39778404
Simple put... yes... your logic is correct. That's how I figure out everything quickly in my head.
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

LVL 25

Expert Comment

ID: 39779332
Not all the logic is correct.

Is this where I take the /23 as previously and see it uses 7 bits for the network and on the chart that would be increment of 128.

So it must live between the .0 and .128 networks and the range of usable hosts would be (I might have messed that up?)

a /23 means the subnet mask goes into the third octet.  You are using 7 subnet bits in that octet you are correct. leaving 1 host bit in the third octet.  But by using my steps, you'll notice the block size is thus 2 ^1 = 2.  So the network addresses are not and

Rather, they are

everything else is correct though.
LVL 31

Expert Comment

by:Gareth Gudger
ID: 39779503
Good catch, you are correct.

Author Closing Comment

ID: 39781289
Really good explanation, I'll have to spend some time practicing to get it down quick, thank you.
LVL 25

Expert Comment

ID: 39782080
By the way, this process is effectively the exact same as described in Todd Lammle's CCNA book by Sybex.  While I thought there was better technical explanation on most technologies in Wendell Odom's Cisco Press CCNA books, Lammle's I felt was by far the bible reference as to subnetting.  I'm not sure what study materials you have but those are the two I used along with GNS and I passed with ease on the first try.  I spent a lot of time practicing subnetting though to make sure I could do any of them in my head in under 15 seconds like I mentioned.  The reason I say 15 seconds is because there are a lot of questions that require that skill but they don't ask for those answers.  By doing it quickly it allows more time for the simulated lab portions which can take some time and you should take time as their worth so much of the exam score.

Good Luck.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For many of us, the  holiday season kindles the natural urge to give back to our friends, family members and communities. While it's easy for friends to notice the impact of such deeds, understanding the contributions of businesses and enterprises i…
This past year has been one of great growth and performance for OnPage. We have added many features and integrations to the product, making 2016 an awesome year. We see these steps forward as the basis for future growth.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question