Classless Subnetting... well and truely confused!

Unanswered Question
Feb 4th, 2008

Well, I thought I had subnetting totally down, but then downloaded the PrepLogic mock exam. This has me well and truely confused and I wondered if anyone can help untangle my brain:

"Given the classless addresses and subnet mask on the diagram, determine the number of subnets and hosts each represents:"


Apparently the answer is 64 subnets and 1022 hosts... which isn't what I was expecting!

Other examples are:

= 1024 subnets, 62 hosts

= 512 subnets, 32766 hosts

Any help gratefully received - I've got my exam in 2 weeks and will almost certainly fail if I can't clarify this issue!


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)

Hi James

The answers given by Prep Logic as you are probably well aware are incorrect. You should really stear clear of this type of "Mock Exam" rubbish. It's ironic that the person who wrote this stuff appears not to have a clue themselves about subnetting.

Lets try and clear this up.

Q1. /26 (

172.16 is a Class B network in Classful networking, so the classful mask would be or /16.

Using a /26 mask for subnetting means that you borrowed 10 hosts bits for subnetting. To work out how many subnets this gives, the algorithm is n^2 (where "n" is the number of host bits borrowed).

10 ^2 = 1024, so you have 1024 subnets

To work out how many IP addresses are available on each subnet the algorithm is h^2 (where "h" is the number of host bits remaining).

If 26 bits hare used for the network/subnet portion of the address, that means that there are only 6 remaining bits left for hosts.

So 6^2 = 64, so each subnet consists of 64 IP addresses.

As I am sure you are aware, the algorithm to work out the usable IP addresses on a subnet is (n^2) -2 (again "n" is euqal to the number of host bits, in this case 6), so the number of IP addresses available for assignment to hosts is 6^2 -2 or 62, as the first IP address is reserved for the subnet number and the last IP address is reserved for the broadcast address of the subnet.

Q2. The same applies. (

188.12 is class B network in classful networking, meaning a classful mask of /16 (

Number of host bits borrowed for subnetting = 6.

6^2 = 64, so this provides 64 subnets

If 22 bits are used for the network/subbnet, 10 bits are left for hosts.

10^2 = 1024 IP addresses on each subnet of which 1022 are usable as you subtract 2 for the subnet number and broadcast address for each subnet.

Q3. /17 (

43 is a class A network in classful networking so the classful mask would be /8 ( This means that 9 bits have been borrowed for subnetting.

9^2 = 512, so this gives 512 subnets.

If 17 bits are used for the network/subnet, 15 bits are left for hosts.

So 15^2 gives 32,768 IP addresses per subnet of which 32,766 are usable, since you subtract 2 for the subnet number and broadcast address.

I am sure you can see by now, that who ever posed these questions and provided the answers got thing backwards. The fact that you knew that something was wrong with what was presented shows that you are learning.

This is why brain dumps and this kind of test prep is frowned upon. It is frequently incorrect and does not teach the technologies correctly. Infact as is the case here, more often than not it only serves to cause confusion.

Your best bet no matter what Cisco certification you are going for are the Authorized self study guides to learn the technologies. Then when you feel you have a good grasp of them use the Exam certification guides to sharpen your skills for the exam. This will stand to you in both the exam and the real world.

One last point. The best explanation of subnetting I have come across was in Todd lammle's book from Sybex.

Best Regards & Good luck in the exam.


noisey_uk Tue, 02/05/2008 - 04:36

Thanks very much Michael - your response comes as a great relief!

Funnily enough, I've been using the Sybex book among other things and thought I had a solid grasp of the subnetting concepts. I'd been tearing my hair out trying to get my head around these PrepLogic mock exam answers and it's clear that, as you suggest, they are just plain wrong! I guess I have them to thank for wasting about a day of my time and don't think I'll be purchasing their product (this was 1 of 10 questions on the trial version)!

I am going through mock exams just to see if there are any gaps in my knowledge that I need to focus on before the exam - I definitely wouldn't rely solely on them for learning.

From what I've recently gleaned from Cisco articles and other discussions, the subnet calculation is 2n-2 if "ip subnet-zero" is NOT enabled and 2n (as you state) if it IS enabled. This is because it was previously considered incorrect to utilise the first and last subnets. If I'm wrong on this point, someone please shout! :-)

Thanks for your help


Hi James

Just a note. For some time now (since IOS 12.0 I think), IP subnet Zero is configured (turned on) by default on all Cisco routers. Therefore the algorithm to work out the number of subnets no longer uses "-2". It's just 2^nth power.

Also be aware of my error is my previous mail when I gave the algorithm as n^2 when it should have been 2 ^nth power. And there I was accusing someone else of getting things backwards :)

Apologies for any confusion caused.

Best Regards,


srue Tue, 02/05/2008 - 05:38

I used Todd Lammle's Windows NT4.0 TCP/IP MCSE book which also covered subnetting. That was back in '99. I've never had to relearn it since then. Do as many examples as you can make up.


This Discussion