Subnetting questions - CCNA related


I've got a question on subnetting that hopefully you'll be able to help me on....
Given a network address and a subnet mask, how can you work out the number of subnets created. Is it
2 to the power of borrowed bits
(2 to the power of borrowed bits) - 2
So, for example
Network address:
Is the number of subnets created 2 (to the power 2) = 4
Or 2 (to the power 2) - 2 = 2
Some sources say the first and last subnet created are not valid, hence the reason for subtracting two. Obviously, for hosts, the first and last hosts are invalid because they represent the network and broadcast address, but I thought routers could now handle the zero subnet by default? Also, why would the last subnet be invalid? What is/was the reasoning behind this.

Would appreciate the help.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Pete LongTechnical ConsultantCommented:
You need to do it at speed in an exam - for my CCNA I learned the following you can transpire it onto ANY Cisco CCNA  related subnet question....................
Pete LongTechnical ConsultantCommented:
The Subnet mask is

All you need to remember is 256

subtract 240 from 256

answer 16

therefore every subnet is 16 bits wide
you know the lowest on is the network number - the highest is the broadcast number  - that means there ate 14 usable addresses

To work out what all those are......................................
Pete LongTechnical ConsultantCommented:
................. add 16 to itself


etc etc till you get to 265 then stop and cross 256 out

so the subnet numbers are 0, 16, 32, 48 etc

take the 16 subnet  - 16 is the subnet number - the broadcast for this network is ONE LOWER than the next network number (so its 31) usable addresses will be between the two (17 to 30)

now go back to the IP address you were givien in the question (if you were given one) and you can work out what network you are in
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

Pete LongTechnical ConsultantCommented:
using your example

256 - 192 = 64

subnets are


That'll be four of them :)   <------------answer

each network you loose two addresses (broadcast and network number) so 62 clients per subnet

Might look long winded at first - get used to doing it this way and you can SPEED answer any subnetting question that cisco will ask you, I got 97% on my CCNA and 97% on my CSPFA so I know what you are up against ;)

Dilan77Author Commented:
Thanks Pete.

So, there are 4 subnets created, and the .0 and .192 subnets are valid?

Some books I've come across say that only the .64 and .126 subnets are valid subnets, and I was wondering why they were saying this?

Dilan77Author Commented:
Sorry typo

Third line should read;

Some books I've come across say that only the .64 and .128 subnets are valid, and I was wondering why they were saying this?
I think you are referring to subnet Zero? where the first subnet cannot be used?

There were or are issues with some network devices regarding this.

Cisco switches have the option that you can switch on to get round the limitation, and in an Exam they would tell you that IP subnet Zero has been applied, so when working out a subnet question you would not that all subnets are usable -2 for hosts (Network & broadcast addresses)
Pete LongTechnical ConsultantCommented:
Indeed  - cscorbet is correct BUT all cisco gear can handle a zero

The answer is four subnets mate - if in doubt simply punch it into a subnet calculator :)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
For the CCNA... do not apply the -2 to calculate number of subnets.  DO apply the -2 to get the number of hosts.

When in doubt, think this to yourself, "what is the best answer for keeping this as simple as possible, but still do it THE CISCO WAY."

If you over analyze, or try to give "real world" answers that work in the real world, you can wind up in trouble.  Think Cisco way, Cisco way, Cisco way ... there are non other than Cisco ... ;)
Keith AlabasterEnterprise ArchitectCommented:
lol, not in the ccna exam anyway :)
Yeah - for the CCNA.  :)
Pete LongTechnical ConsultantCommented:
>>Think Cisco way, Cisco way, Cisco way ... there are non other than Cisco ... ;)

Indeeedly doodly
Dilan77Author Commented:
Thanks guys...appreciate the help.

..this had been bugging me for ages.
Pete LongTechnical ConsultantCommented:
No Probs Mate - glad to help
Hup same here, Glad to help
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.