Subnetting is Fun
Sun Mar 14th 2004, 10:07pm
Subnet Quiz Here is a web-based quiz I wrote a while back to practice your subnetting skills. [Update: in 2014, I converted it to Javascript so it would run completely in your browser]. Given an IP and a netmask, you derive the network and broadcast addresses. I wrote it to prep for the CCNA exam and to sharpen my on-the-job subnetting skills. For extra challenge, you can select "Advanced subnets" to have the program randomly give you the netmask in either dotted decimal (the default), hex, or slash notation.

The obnoxious cliche "practice, practice, practice" really describes the best way to get better at subnetting. It's part memorization, part basic math skills, but 90% practice. In other words, stopping after you understand how the bits work isn't enough, to be quick you need to repeatedly drill yourself with a program like this one.

I hope to publish a followup article on one way to easily subnet soon. If you're interested in the quiz program itself, you can look at the source code on Github.

Update March 26, 2009: I ran across an article called Subnetting Made Easy that gives an excellent and mercifully short explanation of how to subnet. The way he describes is exactly how I do it too. This technique works well, but I've always found it a little hard to explain to others, I'm glad someone else found a good way to convey it.

Visitor comments
On Sat Jun 12th 2004, 11:14pm, rene_enriquez_ posted:
thanks for this section...ive been practicing studying for the ccna

On Sun Jun 13th 2004, 1:54pm, Steve Kehlet posted:
You're welcome! Glad to hear someone else finds it useful. Good luck taking the CCNA. For as hard as I studied, I passed by only 1 point (of 1000) :-).

On Sun Jun 27th 2004, 11:57pm, Guest posted:
nice work with the subnetting quiz mate.. everyday i take some time out to work out a few advance problems. Keeps me on top of the class.. Really cool

On Mon Jun 28th 2004, 2:07pm, Steve Kehlet posted:
Thanks, it's somewhat addictive isn't it. Cheers.

On Sat Jul 3rd 2004, 1:30pm, Gigafunk posted:
240........64......192..32....64....2...255...240...oh, what? oh yeah, words...yes words... I am posting, not grinding numbers(I have been at it awhile)Thanks for the practice....very very cool. Ok gotta get back.....248...160....224....32....252.......64.....128......

On Mon Jul 5th 2004, 12:07am, Steve Kehlet posted:
I updated the quiz page to automatically focus on the first box, so now your fingers never even need to leave the keyboard! Rapid fire subnet crunching! :-)

On Thu May 12th 2005, 7:19pm, Visitor posted:
I have spent the last few days practicing my subnetting, and I can't find any other sources of new problems.

Thank you much.

On Fri May 13th 2005, 10:21am, Steve Kehlet posted:
Glad you've been enjoying it! I had to crank through a few more just now to freshen up my subnetting chops.

On Tue Jan 24th 2006, 10:32am, Scott H. posted:
Very nice. I started something like this in VB but never finished it. A timer with a running average would be really nice improvment. :)

On Thu Jul 20th 2006, 4:27pm, Redzzand posted:
Great site!! Very helpful to practice, and polish subnetting skills!!

On Fri Sep 15th 2006, 10:50am, Monty Python posted:
Yes, very useful. Well done!

On Tue Oct 3rd 2006, 3:35pm, Right on man... posted:
This rocks!! Thank you!!!

On Fri Oct 27th 2006, 12:46pm, SubnettingSusahBanget posted:
Mr Kehler.. thank you very much!!

On Tue Nov 28th 2006, 11:34pm, Visitor posted:
This is exactly what I have been looking for. You sir, are a freaking genius!

On Wed Nov 29th 2006, 1:57pm, Steve Kehlet posted:
Haha, thanks for posting Visitor, glad you like the tool.

On Thu Feb 8th 2007, 7:45pm, Joey posted:
Thanks for this great tool, I am taking my exam on the 23rd of this month. Thanks to you, I will have all the subnetting practice I will ever need! Great Work!

On Thu Feb 15th 2007, 4:34am, Visitor posted:

On Fri May 25th 2007, 7:43am, Matt posted:
Thanks man my instructor used this site to teach our class of 20 to subnet. I owe you a cold one :)

On Sun May 27th 2007, 8:13am, BlueMerle posted:
Thanks Steve... This is great

On Tue May 29th 2007, 4:45pm, Steve Kehlet posted:
Matt and BlueMerle, I'm glad you liked the subnet quiz. It's great to hear feedback on this.

On Fri Sep 28th 2007, 9:27am, Jeff Eggenberger posted:
Very good practice tool! I am suprised at how quick I am getting at solving them. One suggestion, if there was a "skip" button, so you could skip past the easier ones without feeling like a failure when you see the big red INCORRECT... Thanks, Jeff

On Fri Sep 28th 2007, 10:50am, Steve Kehlet posted:
Jeff: glad you like it! I think the skip button is a good idea, I just added it.

On Wed Dec 12th 2007, 7:03pm, Kris posted:
I read the comments and they're ALL very true. I am indebted to you. Thank you for sharing this with us.

Ps. I look forward to reading the articles posted on the left.

On Thu Feb 14th 2008, 9:10am, Oscar posted:
Hey Steve, thanks for the article and the little quiz tool. Great stuff. You've been stumbled!

On Sun May 4th 2008, 4:49am, Visitor posted:
amazing thanks

On Wed Jul 2nd 2008, 2:02pm, jude posted:

On Wed Jul 2nd 2008, 2:02pm, jude posted:

On Thu Jul 17th 2008, 3:50pm, Ants posted:
Your the best, i think there should be a link from the cisco site. You should add a DONATE button, with all the people you must have helped by writing this you deserve some recognition.

On Tue Jul 22nd 2008, 4:34am, Tirtha posted:
Thanks! It helped me a lot to brushup my subnetting skills.

On Mon Aug 4th 2008, 6:34pm, Visitor posted:
hello Steve Kehlet, i stell got problem in subnetting any recomendations how easy to learn it?
my email is ,thanks

On Sat Aug 16th 2008, 1:52pm, sony posted:
Amazing work..

On Sun Sep 21st 2008, 6:51pm, Visitor posted:
Thanks champ for this site - good practice.

On Tue Oct 14th 2008, 2:11pm, Visitor posted:
This is awesome, This really helped more than anything I've read in a book!!

On Wed Oct 15th 2008, 10:42am, Mike posted:
Thank You Steve! This is great!

On Tue Oct 21st 2008, 3:28pm, Ryan posted:
Great tool thanks Steve!

On Mon Oct 27th 2008, 7:56pm, Robert posted:
Oh, thanks! This is great. I think I am getting the hang of it now. Thanks again for this great practice site. I also someday may take the CCNA test. We shall see!

On Mon Nov 10th 2008, 5:39am, Jerry posted:
Awesome tool! I'm taking my ICND1/CCENT tomorrow so this is good practice!

On Sun Nov 30th 2008, 8:43pm, Wayne posted:
This is great! I'm using this in prep for my 70-293 MCSE exam.

On Thu Dec 25th 2008, 7:33pm, Visitor posted:
I'm gearing up for the ICND too, this is great practice. Thanks.

On Thu Jan 8th 2009, 9:37am, daz posted:
thanx for subnetting tool ,im taking ccna and this is invaluable practice

On Thu Jan 15th 2009, 8:44pm, Visitor posted:
Excellent! I can see that there have been visitors since 2004, and this is still the BEST site ever that I have see on the internet to practice subnetting!!!! THANKS!!!!

On Wed Feb 25th 2009, 3:54pm, Visitor posted:
i do subnetting in class just to stay awake lol fun stuff

On Wed Feb 25th 2009, 3:54pm, Visitor posted:
i do subnetting in class just to stay awake lol fun stuff

On Mon Mar 2nd 2009, 6:45pm, Visitor posted:
I'm sitting for CCENT in a week- this has helped me really reduce my time to figure subnet, broadcast address and by extension beginning and ending host address for a subnet- great work!! Thanks for the help

On Tue Mar 3rd 2009, 10:08am, Steve Kehlet posted:
Thanks everyone for posting feedback, I'm very glad to hear it!

On Fri Mar 6th 2009, 6:00am, Jack posted:
At First Subnett is boring and complicated, but when you get to master it, IT IS FUN AND EASY TO DO!!!

On Wed Apr 8th 2009, 11:43am, Visitor posted:
ia m studying 70-291 for my MCSA and i found this exremely helpful . thanks
ronzo cartwtright MCp nashville ,tn

On Wed Apr 15th 2009, 11:54am, Jeannette posted:
Your quiz is great, I'm just learning subnetting and this is invaluable for drill practice. I'm studying for my CCNA.

On Sun May 3rd 2009, 5:39pm, Sam Bahani posted:
Good practice workshop for subnetting, thanks

On Wed May 6th 2009, 4:23am, Visitor posted:
Thank you very much! Excellent for CCNA prep :)

+ + _b

On Thu May 7th 2009, 12:11pm, Visitor posted:
that ip quiz is great
thank you much
did this stuff years ago and did not realize how rusty I am

On Sun May 10th 2009, 3:27pm, prabhu posted:
It is amazing to practice is quite good to practice asking subnet address and broadcast could add questions like particular no of subnet or hosts needed.thats would be very greatful.cheers.

On Sun Jun 14th 2009, 7:14pm, Visitor posted:
Network address:
INCORRECT! 00110001 00000000 00000000 00000000
Broadcast address:
CORRECT! 00110001 11111111 11111111 11111111


On Sun Jun 14th 2009, 8:43pm, Steve Kehlet posted:
Ahh, looks you had a leading space character in your response. That seems to cause this failure. I'll fix the code to trim whitespace, thanks for the report :-).

On Mon Jun 15th 2009, 12:03pm, Steve Kehlet posted:
Leading and trailing whitespace now trimmed. Thanks again for the report.

On Fri Jun 19th 2009, 3:10pm, Visitor posted:
this is an excellent way to practice subnetting ... thanks

On Tue Jun 23rd 2009, 5:13pm, Visitor posted:
Thanks for the practice. That link to the subnetting made easy page helped tremendously.

On Mon Aug 3rd 2009, 2:29pm, Dave posted:
Hey, thanks. This is useful and cool.

On Thu Aug 6th 2009, 12:20am, Steve posted:
Great site. I looked at it a while ago when I was doing my CCNA and always end up coming back to it to practice.

On Wed Sep 30th 2009, 1:32pm, Gregg posted:
Whoa, about time I came across something with immediate feedback. Been studying subnetting for a couple weeks and every time I think "I got it", I don't. Fabulous site you created here Steve. A Thousand Thanks to you kind sir...

On Wed Sep 30th 2009, 1:34pm, Gregg posted:
Whoa, about time I came across something with immediate feedback. Been studying subnetting for a couple weeks and every time I think "I got it", I don't. Fabulous site you created here Steve. A Thousand Thanks to you kind sir...

On Fri Oct 2nd 2009, 9:34pm, Visitor posted:
Great site. Just recommended it to the students in my Networking Admin Class for subnetting practice.

Thanks for the site.


On Fri Oct 9th 2009, 5:34pm, Visitor posted:
Hey Steve, it's a nice gadget, however it seems it outputs incorrect data.

IP address:
Subnet mask:
Network address is cool:
10101000 10110100 01101001 01100000

But the broadcast address is incorrect:

IP address:
10101000 10110100 01101001 01110100
invert subnet mask:
00000000 00000000 00000000 00011111

Your broadcast:
10101000 10110100 01101001 01111111

My broadcast:
10101000 10110100 01101001 01101011

Maybe there's still something with the spaces or the XOR doesn't work correctly. Or I'm doing something wrong. :-)

On Sat Oct 10th 2009, 4:54am, Visitor posted:
Ignore me, I was stupid.

On Mon Nov 9th 2009, 4:51am, Gavin Will posted:
Thanks... Been blasting through these now. Simple !

On Thu Nov 12th 2009, 10:58am, Dave posted:
Many Thanks, I have my CCENT in a weeks time and this site is really helping. Love the time feature too.



On Sun Nov 22nd 2009, 10:40pm, Visitor posted:
Great Tool! I am studing for the CCna and this is a big help!


On Tue Dec 1st 2009, 12:19pm, Visitor posted:
Good stuff bro. I always come back when I feel rusty..

On Sun Dec 13th 2009, 6:28pm, Paola posted:
Very useful!!!

On Mon Dec 14th 2009, 8:47am, Visitor posted:
very nice for us beginners, thanks!

On Wed Dec 23rd 2009, 9:42pm, Visitor posted:
This was a treat to find! Much thanks and appreciation for this. Found it very helpful to get a solid grip on this and instant answers are a big plus. At some point you don't even need to use paper!!! Thanks a ton!!!!

On Sun Jan 10th 2010, 11:03pm, Ragachandrika posted:
This Quiz was really good!!! Really i dint feel subnetting to be easier at all before...

But after doing this quiz got to know completely class A,B and C subnetting....Thanku so much sir!!for creating such wonderful quiz...learnt a lot here...

On Fri Feb 26th 2010, 3:59pm, Visitor posted:
Thank you very much!! This is good.

On Thu Mar 25th 2010, 7:14am, Visitor posted:
Exelent. Though would be nice if somehow would be possible to download this quizz so that i could you for my time in traffic.

On Thu Mar 25th 2010, 10:41am, Steve Kehlet posted:
Thanks Visitor, you can download the PHP source to the quiz at the link I provide up top, but then you'd need an Apache web server with PHP support to run it.

On Sun Apr 4th 2010, 9:55pm, Smiley posted:
Thanks Steve. I was having difficulty with broadcast and network addresses. This is a great tool. Thanks heeps.


On Tue May 4th 2010, 2:59pm, Satyadeep posted:
Hii Steve Thanks for the excellent resource. Makes life a lot easier instead of searching for practice questions for subnetting.

On Mon May 10th 2010, 11:53am, Visitor posted:
thanks this is a great resource for someone learning to subnet

On Tue May 11th 2010, 4:34pm, Visitor posted:
This is a great site. I have really come to understand the whole process of subnetting from using your web page. Kudos to you!

On Tue May 11th 2010, 4:34pm, Visitor posted:
This is a great site. I have really come to understand the whole process of subnetting from using your web page. Kudos to you!

On Sun Jun 27th 2010, 12:23pm, Visitor posted:
thanks so much... this is a great place to practice.

On Sun Jul 11th 2010, 10:44pm, Visitor posted:
Great subnetter. Thanks!

On Tue Aug 31st 2010, 11:29am, Visitor posted:
This is a great site. Good practice tool.

On Wed Sep 1st 2010, 5:25am, ramk posted:
this is great site

On Mon Oct 4th 2010, 11:44pm, ABK123 posted:
HAD a great fun.thanx kehlet

On Tue Oct 5th 2010, 11:29pm, abk123 posted:
ameging, wid learn.thanx...........

On Thu Oct 7th 2010, 1:53am, Visitor posted:

On Sun Oct 24th 2010, 7:16pm, Visitor posted:
The Best!

On Sat Oct 30th 2010, 11:56am, Nask posted:
Great tool for practicing but I don't think the subnet mask should be allowed to get smaller than /8

On Fri Nov 12th 2010, 6:18am, Manikandan.N,.S. posted:
It is best one for practice subnetting. It's very useful to me.Thanks.

On Mon Nov 29th 2010, 6:55pm, Visitor posted:
Thankyou very much! Just what I was looking for.

On Thu Dec 2nd 2010, 3:09pm, Frank posted:
Thank you Steve, I am glad to have run into your tutorial on subnetting. I am studying for my Net.+ exam. Your site is very helpful

On Sun Dec 5th 2010, 3:10am, Visitor posted:
Hi mate,

Fantastic subnet calculator. really helps me practice for CCNA.


On Mon Jan 3rd 2011, 9:22pm, Visitor posted:
Awesome, awesome, awesome!!! Thank you!!

On Wed Jan 26th 2011, 2:48am, Visitor posted:
0xF4240 thanx. :-)
Nice app.

On Fri Feb 4th 2011, 6:36pm, Don posted:
Very useful. Thanks!

On Wed Feb 16th 2011, 3:24am, Mina posted:
thanks ,that was an amazing test i did enjoy it i wish to have one with finding the number of host needed ..

On Thu Feb 24th 2011, 1:56am, Visitor posted:
I loved it.

On Tue Mar 1st 2011, 1:54am, Visitor posted:
Oh yeah.............I'm da subnet-master now!!

On Tue Mar 22nd 2011, 5:30am, Visitor posted:
Great stuff, bookmarked.

On Wed Jun 8th 2011, 1:45pm, Visitor posted:
Thanks, very useful!

On Wed Jun 22nd 2011, 3:26am, Visitor posted:
This website is great. You have helped me learn subnetting. Thanks

On Mon Aug 22nd 2011, 11:20am, Visitor posted:
Very usefull. I bookmarked it. Thanks a lot

On Mon Nov 21st 2011, 8:28am, Visitor posted:
Great site for REALLY learning subnetting as the questions really make one think. I have a question about this one:
The answer, which I got wrong, shows the broadcast as My understanding is that anything 127.n.n.n is loopback and I put the answer as being the last usable address before the loopback:

Any comments appreciated. Thanks for the site. I did a Google search for hard subnetting questions and found you (eventually--linked from another site).

On Mon Nov 21st 2011, 3:34pm, Steve Kehlet posted:
Visitor, I'm glad you found the site helpful! As you found my test doesn't handle 127.x.x.x in any special way. An improvement would be to make it skip that network range. I should probably review the rfcs and make sure no bogus network ranges are ever issued. I'd love to get that fix in, and there are a couple of other good suggestions in the comments here that would be good to implement too. Maybe soon :-).

On Wed Nov 30th 2011, 11:59pm, Alex posted:
Thanks for the coding to implement this useful test. I have a few quesitons, as the classes that I have been included in all teach different techniques for subnetting. In this class which is Network+ (Military side), here is the way the teacher is conducting...

IP Address:
Subnet Mask:

1) How many subnets do we need?
2) How many bits do you have?
3) What is your subnet mask?
4) What is your subnet (block) size?
5) What are you useable subnets?
6) What are the number of hosts/and IP range?

How can I implement the instructions on the guide that you've posted to adapt to these questions?

On Sun Dec 11th 2011, 5:22pm, Robyn Little posted:
Thanks for making this quiz. Used it to practice!

On Sat Jan 7th 2012, 8:24am, Syed Tahir Husain Naqvi posted:
Excellent work,Steve.I cannot learn subnetting in books,but i come to know by your BINARY Method very easily.

Thanks and Thanks a lot.GOD bless you.

Syed Tahir Husain Naqvi.
Engineer - Ericsson India Pvt. Ltd

On Fri Jan 20th 2012, 8:02pm, Visitor posted:
I find the site pretty good, but it doesn't explain what your doing wrong regarding the subnetting? I get some right and some wrong or both answers wrong?

On Thu Jan 26th 2012, 3:30am, Pete B posted:
OUTSTANDING quiz for subnetting. Have been doing this for a couple days and now have it down pat. Never been easier to learn. Thanks!!

On Thu Jan 26th 2012, 8:46am, Steve Kehlet posted:
Visitor, try reviewing that "Subnetting made easy" link I put up at the top, it does a great job explaining how to subnet.

Pete: glad to hear it, thanks!

On Sat Apr 14th 2012, 7:24pm, Pijush posted:
studying for CCNA, really Helpful. Thank You!

On Thu Apr 19th 2012, 1:13pm, jeromey baloney posted:
thanks man! you are da bomb!

On Thu May 24th 2012, 8:05pm, Visitor posted:
Your application is still useful. Great for practicing!

On Tue Aug 7th 2012, 5:34pm, Visitor posted:
Thanks for the simple questions to gain speed in computing the network and broadcast for various host addresses. Great tool.

On Sat Sep 8th 2012, 4:20pm, Visitor posted:
great testing engine!
thanks a lot!
gerard - holland

On Sat Sep 29th 2012, 4:37am, Aussie posted:
thank you for keeping the website

cheers from Australia

On Sat Oct 13th 2012, 12:46pm, Visitor posted:
Found an Error,

Netmask: = 27
Hosts/Net: 30

Great Practice Tool!
Thank You.

On Wed Nov 14th 2012, 8:25pm, Bob posted:
Thanks for great practice tool.
Bob from Czech

On Fri Dec 7th 2012, 7:30pm, MichaelT posted:
Awesome tool! Helps me with teaching subnetting. After a while, I no longer have to write the problems on the board!

On Tue Feb 5th 2013, 3:48am, LH posted:
What a WONDERFUL tool to learn and practice subnetting !! PLEASE KEEP THIS ALIVE ALWAYS!!! It has helped me to learn to do the subnetting in my head and do it really fast.!!Thank you so much again!!

On Wed Mar 6th 2013, 4:24am, Visitor posted:
I am addicted to subnetting. Great site . Thank you

On Sun Apr 28th 2013, 3:00am, DC posted:
Thanks very much for this site. This site has really helped me to do subnetting quickly in in my head.

On Tue Jul 2nd 2013, 2:01pm, Visitor zx posted:
great exercise! i feel confident for the exam

On Tue Jul 30th 2013, 7:22pm, Visitor posted:
Yes! :D Brilliant stuff mate!

On Tue Jul 30th 2013, 7:22pm, Visitor posted:
Yes! :D Brilliant stuff mate!

On Mon Sep 30th 2013, 4:51am, Visitor posted:
nice...thanks. How bout some VLSM?

On Sun Nov 3rd 2013, 3:33am, Dave posted:
it is a pity it is not down downloadable
but thanks anyway.

On Thu Jan 2nd 2014, 12:19pm, Visitor posted:
ip configar

On Thu Jan 2nd 2014, 12:19pm, Visitor posted:
ip configar

On Mon Jan 6th 2014, 11:41am, Bill posted:
Really Helpful tools ,help me for studying for CCNA, .
Thank You! again
Bill from Greece