| | | Senior Member Registered Member
Join Date: Dec 2003 Location: Somewhere out there.
Posts: 1,705
Certifications: A+, Network+, Security+, CEH, CCNA. | Subnetting advice from my experience. I see lots of threads on here about various subnetting questions, how to subnet faster, etc. I figured I would post some information that I personally found useful when studying subnetting, as well as taking the exam.
So before continuing, take this post for what it's worth to you. If you have a method that works, stick with it. I'm only posting this because I found it extremely helpful and efficient when trying to subnet quickly and accurately.
IMO, there is no real reason to memorize this information when the desired result can be achieved on paper in a matter of seconds, if you know how to do it. However, when trying to subnet or work through any problem that requires you to subnet, doing it in your head or on paper subtracts from time that could be spent actually working the problem. I used the table below to quickly work subnetting problems without having to do the math in my head or on paper.
Keep in mind that this table is no substitute for knowing how to subnet and knowing how it all works, it's merely a shortcut I used to work the problems more quickly and efficiently. The top row of this table is simply the number past the network bits after you figure out the mask of whatever class IP address you're working with. The second row will be the mask, converted to decimal. The third row will be the increment for the hosts, given the mask.
1 2 3 4 5 6 7 8
128 192 224 240 248 252 254 255
128 64 32 16 8 4 2 1
Let's assume you're given a problem with a 192.168.1.25 address and a /26 mask. It's a class C address, so you're looking at 24 network bits, thus with a /26 mask you're left with 2 bits. Then use the table. According to the top column, 2 bits will give you a .192 mask and a 64 increment. Thus, you can quickly identify the 192.168.1.25 /26 address as being in the range of 192.168.1.0 - 192.168.1.63, with a decimal mask of 255.255.255.192.
So if you're trying to work a problem quickly and you get a mask given to you in CIDR notation, you don't have to have the values memorized and don't have to spend the time subtracting on paper.
Just my 2 cents. It helped me. If it confused you, pretend you never read it.  |
| | Login/register to remove this advertisement. | | | Likes Big Butts Registered Member
Join Date: May 2008 Location: D.C area
Posts: 609
Certifications: CISSP, PMP, CCNA, CCENT, Security+, Network+, A+ | That's pretty nifty!
I do think that after some practice, it becomes pretty instinctive and easy to memorize or figure out quickly in your head.
__________________
“Fighting for peace is like screwing for virginity.” ~ George Carlin
|
| | | Senior Member Registered Member
Join Date: Sep 2007 Location: SF Bay Area, Ca
Posts: 321
Certifications: 83-640 | Thanks for the tip, this might help me with my CCNA as I can do subnetting but I would like to shorten the ammount of time it takes me to get the answer. Right now using pen and paper it takes me about a minute+ per subnetting question. |
| | | Member Registered Member
Join Date: Jun 2009 Location: Edinburgh
Posts: 31
Certifications: CCENT, MCP | Great tip. Makes it very easy. Thanks very much for sharing.
I don't know what it is, but I love subnetting and working out this stuff in my head. I can feel the neurons in my brain ticking away.
I just wish I had as much enthusiasm for the other, small pieces of information that I regularly forget - such as DNS using port 53 (just looked it up again)  |
| | | Certifiable Registered Member
Join Date: Apr 2009 Location: NYC
Posts: 20
Certifications: C.S., A+,N+,MCP(270,290).. mr 2 cm! | Great tip for those who understand the workings behind subnetting, but need a shortcut to get there faster. |
| | | InfoSec Analyst Registered Member
Join Date: Mar 2007 Location: BR::LA
Posts: 11,110
Certifications: Most Recent: CEH & CWSP | Quote:
Originally Posted by nelsonnr such as DNS using port 53 (just looked it up again)  | Yea, but when does it use UDP and when does it use TCP? 
__________________ The day you stop learning is the day you start becoming obsolete.
WIP - CCNA:S | OSCP | OSWP | GPEN - 02/26/10 ETA |
| | | Member Registered Member
Join Date: Jun 2009 Location: Edinburgh
Posts: 31
Certifications: CCENT, MCP | Yes - exactly, I need to look that up now too
But seriously, when does it? |
| | | Junior Member Registered Member
Join Date: Mar 2008 Location: Hanover Park, IL
Posts: 22
Certifications: A+, Network+, i-Net+, Security+, Server+, MCSA/MCSE:Messaging/Security, MCITP: Consumer/Enterprise Support Technician | Great advice! I have memorized the following....
128 192 224 240 248 252 254 255 (Subnet Masks)
and
128 64 32 16 8 4 2 1 (Powers of 2)
but I didn't realize that was also the pattern for the increment as well! Thanks!
__________________
CCENT - Scheduled 8/8/2009
CCNA - TBD
|
| | | Senior Member Registered Member
Join Date: Dec 2003 Location: Somewhere out there.
Posts: 1,705
Certifications: A+, Network+, Security+, CEH, CCNA. | Quote: |
Great tip for those who understand the workings behind subnetting, but need a shortcut to get there faster.
| Exactly.
For the powers of two, I made a table as follows.
1 2 3 4 5 6 7 8 9 10
2
2 4 8 16 32 64 128 256 512 1024
I know that will come out formatted a little off, but to the left you've got the base number, 2 in this case. At the top, you have the power, then at the bottom, you have the value.
I found that much easier than memorizing or trying to figure it out in an instant. |
| | | InfoSec Analyst Registered Member
Join Date: Mar 2007 Location: BR::LA
Posts: 11,110
Certifications: Most Recent: CEH & CWSP | Yea, if you just remember 5 is 32 and 10 is 1024, you can easily double or halve your way to any of the others. Pretty powerful for remembering a couple of numbers!
Good info buddy Quote:
Originally Posted by nelsonnr Yes - exactly, I need to look that up now too
But seriously, when does it? | TCP for zone transfers and UDP for standard queries. It's easy to remember if you think about where there is more importance on integrity.
__________________ The day you stop learning is the day you start becoming obsolete.
WIP - CCNA:S | OSCP | OSWP | GPEN - 02/26/10 ETA |
| | | Junior Member Registered Member
Join Date: Mar 2009
Posts: 26
| |
| | | Junior Member Registered Member
Join Date: Jul 2008
Posts: 19
Certifications: CCENT, CCNA, MCP: 70-290, MCTS: 70-620, 70-642, A+, Net+ | Remember that the increments are always 256 - the octet in question in the mask. So if you have a mask that is 255.255.255.240, the increment is 16. From there you have 16-2 for 14 usable hosts. It always helped me when I was learning it to remember that as the number of hosts gets larger the subnet octet gets smaller, for example a mask of 255.255.255.224 gives an increment of 32.
Also, remember to work in the octet. if you get a /20 mask ignore the first two octet, they're static at that point, and remember the increment is in the third octet, not the 4th, that used to trip me up at the beginning.
Last edited by blackngold4877; 06-20-2009 at 12:46 AM.
|
| | | Junior Member Registered Member
Join Date: Sep 2008 Location: Edmonton, AB
Posts: 29
Certifications: MCP, A+ | blackngold4877 - Are you talking about subnetting or music? Also, I would not say the increment is always 256. |
| | | Junior Member Registered Member
Join Date: Mar 2009
Posts: 26
| Quote:
Originally Posted by Highspade blackngold4877 - Are you talking about subnetting or music? Also, I would not say the increment is always 256. | Including " 0 " there is.
256 256 256 256 256 256 256 256
- 128 -64 -32 -16 -8 - 4 - 2 - 1
------- ----- ----- ----- ----- ----- ----- -----
128 192 224 240 248 252 254 255 |
| | | Junior Member Registered Member
Join Date: Sep 2008 Location: Edmonton, AB
Posts: 29
Certifications: MCP, A+ | Quote:
Originally Posted by Manuel_A Including " 0 " there is.
256 256 256 256 256 256 256 256
- 128 -64 -32 -16 -8 - 4 - 2 - 1
------- ----- ----- ----- ----- ----- ----- -----
128 192 224 240 248 252 254 255 |
Ok - I misread what he was trying to say. I do however, stand by my music comment. |
| | | Junior Member Registered Member
Join Date: Jul 2008
Posts: 19
Certifications: CCENT, CCNA, MCP: 70-290, MCTS: 70-620, 70-642, A+, Net+ | Quote:
Originally Posted by Highspade Ok - I misread what he was trying to say. I do however, stand by my music comment. | Ah, octet, of course. Sorry, but yeah music is another hobby  |
| | | Senior Member Registered Member
Join Date: Jan 2008
Posts: 106
| Quote:
Originally Posted by /usr I see lots of threads on here about various subnetting questions, how to subnet faster, etc. I figured I would post some information that I personally found useful when studying subnetting, as well as taking the exam.
So before continuing, take this post for what it's worth to you. If you have a method that works, stick with it. I'm only posting this because I found it extremely helpful and efficient when trying to subnet quickly and accurately.
IMO, there is no real reason to memorize this information when the desired result can be achieved on paper in a matter of seconds, if you know how to do it. However, when trying to subnet or work through any problem that requires you to subnet, doing it in your head or on paper subtracts from time that could be spent actually working the problem. I used the table below to quickly work subnetting problems without having to do the math in my head or on paper.
Keep in mind that this table is no substitute for knowing how to subnet and knowing how it all works, it's merely a shortcut I used to work the problems more quickly and efficiently. The top row of this table is simply the number past the network bits after you figure out the mask of whatever class IP address you're working with. The second row will be the mask, converted to decimal. The third row will be the increment for the hosts, given the mask.
1 2 3 4 5 6 7 8
128 192 224 240 248 252 254 255
128 64 32 16 8 4 2 1
Let's assume you're given a problem with a 192.168.1.25 address and a /26 mask. It's a class C address, so you're looking at 24 network bits, thus with a /26 mask you're left with 2 bits. Then use the table. According to the top column, 2 bits will give you a .192 mask and a 64 increment. Thus, you can quickly identify the 192.168.1.25 /26 address as being in the range of 192.168.1.0 - 192.168.1.63, with a decimal mask of 255.255.255.192.
So if you're trying to work a problem quickly and you get a mask given to you in CIDR notation, you don't have to have the values memorized and don't have to spend the time subtracting on paper.
Just my 2 cents. It helped me. If it confused you, pretend you never read it.  |
Hi
sorry just going through some older posts. Thanks this looks pretty uselful. How this work on a class b or class A address? Also how would you workout how many hosts you could have?
Thanks
Kev |
| | | Member Registered Member
Join Date: May 2009
Posts: 75
| Quote:
Originally Posted by kevin31 Hi
sorry just going through some older posts. Thanks this looks pretty uselful. How this work on a class b or class A address? Also how would you workout how many hosts you could have?
Thanks
Kev |
Class B: 172.16.0.0
Subnet Mask: 255.255.240.0
256 - 240 = 16
So the increment in the 3rd octet is 16 (0, 16, 32, 48...).
Since 240 is 128 + 64 + 32 + 16, that means we have used 4 bits from the 3rd octet to represent the networks. This leaves 12 bits for the hosts. Determining the number of hosts would be (2^12)-2 = 4094.
Does that help? |
| | | Senior Member Registered Member
Join Date: Sep 2007 Location: Yorktown, VA
Posts: 274
Certifications: Network+, A+, CCNA | This is also good to remember because you can write it down when you get into the exam room while you're going through the tutorial. Write it at the top of your wipe board that they provide you and you'll be able to reference it during the exam without having to think!
__________________
Working on 70-431...goal of December 1st, 2009
|
| | | Senior Member Registered Member
Join Date: Feb 2009
Posts: 167
Certifications: CCNA | The original poster's method and blackngold4877's method are the combination I use to subnet, but I do it in my head.
It's the easiest method I have come accross and when you've used it enough you will be able to do it in your head and sometimes just look at CIDR notation or a mask and just know the increment straight away. As soon as you know that, the rest is easy.
Using it for class A or B is no different, the only thing that can be more tricky is calculating number of hosts addresses or possible subnets. Once you know the math that's simple to work out too, and if there's a problem with the higher numbers just learn the powers of 2 for as many bits as you need to.
Good post. |
| | | Senior Member Registered Member
Join Date: Jan 2008
Posts: 106
| Quote:
Originally Posted by up2thetime Class B: 172.16.0.0
Subnet Mask: 255.255.240.0
256 - 240 = 16
So the increment in the 3rd octet is 16 (0, 16, 32, 48...).
Since 240 is 128 + 64 + 32 + 16, that means we have used 4 bits from the 3rd octet to represent the networks. This leaves 12 bits for the hosts. Determining the number of hosts would be (2^12)-2 = 4094.
Does that help? | Sorry if im not right here so this would be the same for A class a address?
So the hosts are worked out from the remaing bits left in the 3 and fourth octet on the above example? Thats 4 bits borrowed in the 3rd octet leaves 4 left then the 8 in the fourth octet gives you 12? then 2 to power of 12 = 4094 is my understanding right?
What would happen if the subnet mask was 255.255.255.0?
Thanks
Kev |
| | | Member Registered Member
Join Date: May 2009
Posts: 75
| Quote:
Originally Posted by kevin31 Sorry if im not right here so this would be the same for A class a address? |
Correct.
Class: 10.0.0.0
Subnet Mask: 255.240.0.0
Increment (of 16) is now in the 2nd octet.
Number of hosts is (2^20)-2 since we borrowed 4 bits from the 2nd octet, plus we have 16 bits from the 3rd and 4th octet. Quote:
Originally Posted by kevin31 then 2 to power of 12 = 4094 is my understanding right?
| (2^12) is 4096.
(2^12) - 2 is 4094.
Remember to subtract 2 when determining number of hosts, as the Network ID and Broadcast Address are not assignable. Quote:
Originally Posted by kevin31
What would happen if the subnet mask was 255.255.255.0?
Kev | If we took 172.16.0.0 and applied a subnet mask of 255.255.255.0, then we have 8 bits left for hosts.
So the number of hosts is (2 to the power of eight) - 2
The increment would be 1 in that case.
Last edited by up2thetime; 07-07-2009 at 12:38 PM.
|
| | | Senior Member Registered Member
Join Date: Jan 2008
Posts: 106
| Quote:
Originally Posted by up2thetime
If we took 172.16.0.0 and applied a subnet mask of 255.255.255.0, then we have 8 bits left for hosts.
So the number of hosts is (2 to the power of eight) - 2
The increment would be 1 in that case. | I think the llight is starting to flicker on LOL
So why is the increment only 1? Is it cause 256 - 255 = 1?
Kev |
| | | Senior Member Registered Member
Join Date: Feb 2009
Posts: 167
Certifications: CCNA | Quote:
Originally Posted by kevin31 I think the llight is starting to flicker on LOL
So why is the increment only 1? Is it cause 256 - 255 = 1?
Kev | Yes. In this case all 8 bits are being taken from the third octect which total 255, another way you can look at it is the last bit being taken has a value of 1.
Just like if the mask was 255.255.240.0 the last bit being taken has a value of 16 so the increment is 16. You can also look at it as 256-240, which is the easiest thing to do when the mask number is higher. Either way, you will come to the same conclusion.
Keep practicing this and you'll be able to look at these things and know what the increment is within seconds. Once you know that the rest is simple. |
| |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT. The time now is 05:27 PM. | |