Do you have a Subnetting Technique?

thehourmanthehourman Member Posts: 723
Is there a fastest/quickest way to find the subnet of a specific host IP without making a list of subnets? Also, for question like the fist valid host and broadcast.
Here is an example question from subnettingquestion.com:
[B]Question:[/B] Which subnet does host  172.23.82.201/20 belong to?
[B]Answer:[/B] 172.23.80.0

[B]Question:[/B] [I]Which subnet does host 172.18.187.141/28 belong to?
[/I][B]Answer: [/B]172.18.187.128

[B]Question: [/B][I]What is the first valid host on  the subnetwork that the node 10.75.126.160 255.255.240.0 belongs to?[/I]
 		 		[B]Answer: [/B]10.75.112.1
  		


[B]Question: [/B][I]What is the broadcast address of the network 192.168.93.208 255.255.255.240?[/I]
[B]Answer: [/B]192.168.93.223

I could not find some question that something complicated, but you know what I mean.

I think the Boolean AND seem to help to find the subnet faster than making a list, but it takes a little bit of time to convert the decimal number into binary.


Thank you in advance.
Studying:
Working on CCNA: Security. Start date: 12.28.10
Microsoft 70-640 - on hold (This is not taking me anywhere. I started this in October, and it is December now, I am still on page 221. WTH!)
Reading:
Network Warrior - Currently at Part II
Reading IPv6 Essentials 2nd Edition - on hold
«1

Comments

  • Forsaken_GAForsaken_GA Member Posts: 4,024
    yes, my subnetting technique involves telling ipplan what size subnet I need, then it gives it to me.

    In all seriousness, I use the 'magic number' method. It's quickest for me to conver the cidr mask to the octet mask, subtract the last number from 256, and that gives me my range. For example, the first question:

    172.23.82.201/20

    Ok, so the /20 converts to 255.255.240.0, 256 - 240 = 16, so my subnet blocks are going to be in increments of 16 on the third octet.

    0,16,32,48,64,80

    So the host will belong to subnet 172.23.80.0/20

    Once I realized that subnetting just involves ways to manipulate powers of 2 (because that's all individual bits are), it all kind of clicked for me
  • miller811miller811 Member Posts: 897
    I don't claim to be an expert, but I sure would like to become one someday.

    Quest for 11K pages read in 2011
    Page Count total to date - 1283
  • tim100tim100 Member Posts: 162
    thehourman wrote: »
    Is there a fastest/quickest way to find the subnet of a specific host IP without making a list of subnets? Also, for question like the fist valid host and broadcast.
    Here is an example question from subnettingquestion.com:
    [code]Question: Which subnet does host 172.23.82.201/20 belong to?
    Answer: 172.23.80.0

    One way of doing it would be to take the rightmost bit which in this case is 16. If you take the bits of the mask in the third octet you will have:

    128 64 32 16

    The third octet is 82 so 128 is out of the question. The next bit is 64. Take 64 and add the rightmost bit of 16 and you have 80. This works out pretty well for this particular subnet but you have to gauge it properly when it comes to subnets with longer masks. For example lets say the IP in question was 172.23.105.201/22. The rightmost bit is 4 and the bits of the mask are:

    128 64 32 16 8 4

    You don't want to sit there all day adding the rightmost bit of 4. It can't be 128 so take 64 and add 32 and you have 96. Take 96 and add 8 and you have 104. So 172.23.104.0 has to be your subnet because if you add 4 you have subnet 172.23.108.0 which is beyond the IP in question.

    It may seem like a long process at first but once you've done subnetting over and over you will become extremely proficient at it and you will be able to do it in your head.

    This is my way of doing it but there are other methods which will be easier for every individual. Try each method that other members post here and find out which one is best for you.
  • thehourmanthehourman Member Posts: 723
    yes, my subnetting technique involves telling ipplan what size subnet I need, then it gives it to me.

    In all seriousness, I use the 'magic number' method. It's quickest for me to conver the cidr mask to the octet mask, subtract the last number from 256, and that gives me my range. For example, the first question:

    172.23.82.201/20

    Ok, so the /20 converts to 255.255.240.0, 256 - 240 = 16, so my subnet blocks are going to be in increments of 16 on the third octet.

    0,16,32,48,64,80

    So the host will belong to subnet 172.23.80.0/20

    Once I realized that subnetting just involves ways to manipulate powers of 2 (because that's all individual bits are), it all kind of clicked for me
    What if, if the increment is by 4?
    You can't just list 0, 4, 8, 12, 16, 20, etc..
    I am not sure if this a valid scenario.
    Like this 172.5.0.0 /22 and let say the valid host is in somewhere in the 100th+ subnet.

    Also, off-topic question, if the IP address is 172.20.0.0 /17, it will be listed like this:
    172.20.0.0 - 172.20.127.255
    172.20.128.0 - 172.20.255.255
    172.21.0.0 - 172.21.127.255 <== Do we add +1 to the 2nd octet here after the above IP?
    172.21.128.0 - 172.21.255.255
    Studying:
    Working on CCNA: Security. Start date: 12.28.10
    Microsoft 70-640 - on hold (This is not taking me anywhere. I started this in October, and it is December now, I am still on page 221. WTH!)
    Reading:
    Network Warrior - Currently at Part II
    Reading IPv6 Essentials 2nd Edition - on hold
  • ConstantlyLearningConstantlyLearning Member Posts: 445

    In all seriousness, I use the 'magic number' method. It's quickest for me to conver the cidr mask to the octet mask, subtract the last number from 256, and that gives me my range. For example, the first question:

    172.23.82.201/20

    Ok, so the /20 converts to 255.255.240.0, 256 - 240 = 16, so my subnet blocks are going to be in increments of 16 on the third octet.

    0,16,32,48,64,80

    So the host will belong to subnet 172.23.80.0/20

    Once I realized that subnetting just involves ways to manipulate powers of 2 (because that's all individual bits are), it all kind of clicked for me

    Yep, I do it the same way. When your comfortable doing it this way you can answer each of the above questions in like 5-10 seconds in your head.
    "There are 3 types of people in this world, those who can count and those who can't"
  • notgoing2failnotgoing2fail Member Posts: 1,138
    yes, my subnetting technique involves telling ipplan what size subnet I need, then it gives it to me.

    In all seriousness, I use the 'magic number' method. It's quickest for me to conver the cidr mask to the octet mask, subtract the last number from 256, and that gives me my range. For example, the first question:

    172.23.82.201/20

    Ok, so the /20 converts to 255.255.240.0, 256 - 240 = 16, so my subnet blocks are going to be in increments of 16 on the third octet.

    0,16,32,48,64,80

    So the host will belong to subnet 172.23.80.0/20

    Once I realized that subnetting just involves ways to manipulate powers of 2 (because that's all individual bits are), it all kind of clicked for me


    Is that what it's called? I use that too.....I honestly think it's the best method. It takes a little more memorization but I don't mind it at all. In fact I like being able to know how many increments something is at the snap of a finger once I know the subnet mask...

    But anyways, the only time it "sucks" is when you're dealing with small increments like 4 or 8. Then if you are like me ( who is horrible in math ), I have to keep adding each increment until I get to that subnet number that they are asking you about.
  • ConstantlyLearningConstantlyLearning Member Posts: 445
    But anyways, the only time it "sucks" is when you're dealing with small increments like 4 or 8. Then if you are like me ( who is horrible in math ), I have to keep adding each increment until I get to that subnet number that they are asking you about.


    Do you mean something like this?

    What subnet does the host 172.16.213.205/21 belong to?

    Here's my thought process:

    1) It's between /16 and /24 so it's in the 3rd octet
    2) It's a block size of 8
    3) Divide 8 into 213 and you get 48 with a remainder of 5. Take 5 from 213.
    4) Subnet is 172.16.208.0
    "There are 3 types of people in this world, those who can count and those who can't"
  • notgoing2failnotgoing2fail Member Posts: 1,138
    Do you mean something like this?

    What subnet does the host 172.16.213.205/21 belong to?

    Here's my thought process:

    1) It's between /16 and /24 so it's in the 3rd octet
    2) It's a block size of 8
    3) Divide 8 into 213 and you get 48 with a remainder of 5. Take 5 from 213.
    4) Subnet is 172.16.208.0


    This is exactly what I was describing. Interesting technique....

    But how did you get 48? I got 26 when I divided 213 by 8 with a remainder of 5....
  • ConstantlyLearningConstantlyLearning Member Posts: 445
    This is exactly what I was describing. Interesting technique....

    But how did you get 48? I got 26 when I divided 213 by 8 with a remainder of 5....

    lol, why did I write 48? Brainfart, that's why! :)

    It's 26 of course.
    "There are 3 types of people in this world, those who can count and those who can't"
  • DevilWAHDevilWAH Member Posts: 2,997 ■■■■■■■■□□
    My first step in an exam is to write out my subnet table (work it out from memory)

    contains

    Host + networks
    subnet mask + / notation
    wildcard masks, and a few other bits an peices.
    for the 3rd and 4th octec.

    Why??

    Because in the heat of an exam I don't want to make a stupid calculation error when trying to figure it out in the middle of a question. By taking a few minutes of calm at the start of the exam, it focuses my mine and insures that I can quickly look up any sub-netting questions.

    I'm not the greatest with doing sums on my head, so this i find the best way. It takes 2 min to work out the table with pen n paper.
    • If you can't explain it simply, you don't understand it well enough. Albert Einstein
    • An arrow can only be shot by pulling it backward. So when life is dragging you back with difficulties. It means that its going to launch you into something great. So just focus and keep aiming.
  • notgoing2failnotgoing2fail Member Posts: 1,138
    DevilWAH wrote: »
    My first step in an exam is to write out my subnet table (work it out from memory)

    contains

    Host + networks
    subnet mask + / notation
    wildcard masks, and a few other bits an peices.
    for the 3rd and 4th octec.

    Why??

    Because in the heat of an exam I don't want to make a stupid calculation error when trying to figure it out in the middle of a question. By taking a few minutes of calm at the start of the exam, it focuses my mine and insures that I can quickly look up any sub-netting questions.

    I'm not the greatest with doing sums on my head, so this i find the best way. It takes 2 min to work out the table with pen n paper.


    I understand before the exam, they allow you some time to write some thing down. But during the exam, are you still allowed to have a pencil to write things downs to do calculations?

    Or do you have to write down everything possible and they take away your pencil??
  • Forsaken_GAForsaken_GA Member Posts: 4,024
    thehourman wrote: »
    What if, if the increment is by 4?
    You can't just list 0, 4, 8, 12, 16, 20, etc..

    For something that small, I can total it up in my head alot faster than listing it out.

    But for something small, you can just do an extra step, do the division. Take the value of the octet you'd be incrementing on and divide it by the range, but throw away the remainder. Then multiply the resulting value by the range, and you've got the value for the network id on the incrementing octet.

    So 82 / 4 = 20 (leaving out the remainder), 20 * 4 = 80, so 80 would be the network ID in the third octet.
  • DevilWAHDevilWAH Member Posts: 2,997 ■■■■■■■■□□
    in the CISCO exams I have done so far, you are provided with a pen and blank paper.

    You are not allowed to take any thing in to the exam, but you are allow to make as many notes as you wish during it.
    • If you can't explain it simply, you don't understand it well enough. Albert Einstein
    • An arrow can only be shot by pulling it backward. So when life is dragging you back with difficulties. It means that its going to launch you into something great. So just focus and keep aiming.
  • Forsaken_GAForsaken_GA Member Posts: 4,024
    I understand before the exam, they allow you some time to write some thing down. But during the exam, are you still allowed to have a pencil to write things downs to do calculations?

    Or do you have to write down everything possible and they take away your pencil??

    My test center gives us a dry erase pen and two sheets of laminated scratch paper, with more available upon request. You have to return the materials at the end of the exam. So yes, you can do math on paper during the exam, and there are a plethora of pre-exam suggestions out there for what you should **** to the paper during the time you have for the survey (as it's essentially free time).

    Personally, I usually don't need it, I've only used it a few times for things like writing out the formula for calculating bandwidth requirements for VoIP, and a few other formulas for the QoS exam.
  • thehourmanthehourman Member Posts: 723
    For something that small, I can total it up in my head alot faster than listing it out.

    But for something small, you can just do an extra step, do the division. Take the value of the octet you'd be incrementing on and divide it by the range, but throw away the remainder. Then multiply the resulting value by the range, and you've got the value for the network id on the incrementing octet.

    So 82 / 4 = 20 (leaving out the remainder), 20 * 4 = 80, so 80 would be the network ID in the third octet.
    I found this one division and multiplication faster than the magic number technique; however, I need to practice divisionicon_sad.gif

    Also, on the testing day, we all have that time to read the EULA thingy and some stuff before the actual test starts, right?
    Can we use that time to write the magic number and stuff that we can use on a piece of paper as reference for the test? Would they let me do that?

    The reason I asked is I don't want to waste my time during the test writing stuff on the paper.
    Studying:
    Working on CCNA: Security. Start date: 12.28.10
    Microsoft 70-640 - on hold (This is not taking me anywhere. I started this in October, and it is December now, I am still on page 221. WTH!)
    Reading:
    Network Warrior - Currently at Part II
    Reading IPv6 Essentials 2nd Edition - on hold
  • hexemhexem Member Posts: 177
    My testing centre have it written down that you are not allowed to use the laminated sheet until the test has actually started, however i just wrote down my block sizes and everything else during the tutorial on both my exams, didn't have any issues, im sure they wouldn't be bothered even if they did see.
    ICND1 - Passed 25/01/10
    ICND2 - Passed 9/03/10

    Studying CCNA:S
  • mella060mella060 Member Posts: 198 ■■■□□□□□□□

    In all seriousness, I use the 'magic number' method. It's quickest for me to conver the cidr mask to the octet mask, subtract the last number from 256, and that gives me my range. For example, the first question:

    172.23.82.201/20

    Ok, so the /20 converts to 255.255.240.0, 256 - 240 = 16, so my subnet blocks are going to be in increments of 16 on the third octet.

    0,16,32,48,64,80

    So the host will belong to subnet 172.23.80.0/20

    Once I realized that subnetting just involves ways to manipulate powers of 2 (because that's all individual bits are), it all kind of clicked for me

    I pretty much use the same method. After you do it for a while it becomes like second nature, you know those powers of 2 like the back of your hand.

    All you need to do is find the magic number / increment, what octet it is in and away you go.

    To do this i look at the subnet mask, work out where the last bit position value is a 1 and that is your increment.

    So for example...172.23.82.201/20.../20 is 255.255.240.0...in binary that is 11111111.11111111.11110000.00000000

    Notice where the last value is a 1 ?....128 64 32 16 8 4 2 1

    That is yout increment, which is in the 3rd octet...so 0 16 32 48 64 80

    172.23.80.0/20

    All this takes around 5-10 seconds...takes alot longer to write it out
  • Forsaken_GAForsaken_GA Member Posts: 4,024
    mella060 wrote: »

    To do this i look at the subnet mask, work out where the last bit position value is a 1 and that is your increment.

    So for example...172.23.82.201/20.../20 is 255.255.240.0...in binary that is 11111111.11111111.11110000.00000000

    This is an excellent way to do it while you're learning it.

    Me? I've gotten really good at converting cidr notation to dotted decimal masks, so it's unnecessary.

    It is absolutely infuriating to me that I can configure the majority of the network gear I work on using cidr notation, but I still have to specify the dotted decimal netmask for assigning an ip to an interface on Cisco gear
  • tim100tim100 Member Posts: 162
    It is absolutely infuriating to me that I can configure the majority of the network gear I work on using cidr notation, but I still have to specify the dotted decimal netmask for assigning an ip to an interface on Cisco gear

    Yeah, that does suck. At least with Nexus switches you can use cidr format.
  • abefromanabefroman Banned Posts: 278
    How could I go about solving this:
    How many subnets and hosts per subnet can you get from the network 172.29.0.0/22?
  • blackninjablackninja Member Posts: 385
    172.29.0.0 255.255.252.0 (/22)

    no of subnets = 64
    no of hosts = 1022

    Working on 3rd & 4th octet:

    3rd octet & 4th octet
    11111100 00000000
    NNNNNNHH HHHHHHHH

    2 to the power of 8 = 64
    2 to the power of 10 = 1024 -2 = 1022 (-2, as can't use network & broadcast addresses)

    N= network bits ( 8 )
    H = host bits (10)
    Currently studying:
    CCIE R&S - using INE workbooks & videos

    Currently reading:
    Everything. Twice ;)
  • thehourmanthehourman Member Posts: 723
    Nice, I can answer some questions on subnettingquestions.com with less time. I am so motivated right now. The only thing that is holding me back is division. Heck, I suck on division. If the number is 3 digit I ended up using the magic number method.

    Question about the ICND1 and ICND2 exams. How many percentage is the subnetting questions will appear in the exam on either ICND1 and ICND2?
    Studying:
    Working on CCNA: Security. Start date: 12.28.10
    Microsoft 70-640 - on hold (This is not taking me anywhere. I started this in October, and it is December now, I am still on page 221. WTH!)
    Reading:
    Network Warrior - Currently at Part II
    Reading IPv6 Essentials 2nd Edition - on hold
  • abefromanabefroman Banned Posts: 278
    blackninja wrote: »
    172.29.0.0 255.255.252.0 (/22)

    no of subnets = 64
    no of hosts = 1022

    Working on 3rd & 4th octet:

    3rd octet & 4th octet
    11111100 00000000
    NNNNNNHH HHHHHHHH

    2 to the power of 8 = 64
    2 to the power of 10 = 1024 -2 = 1022 (-2, as can't use network & broadcast addresses)

    N= network bits ( 8 )
    H = host bits (10)

    How do you get network bits 8? There are only 6 N's:
    NNNNNNHH HHHHHHHH
  • DevilWAHDevilWAH Member Posts: 2,997 ■■■■■■■■□□
    thehourman wrote: »

    Question about the ICND1 and ICND2 exams. How many percentage is the subnetting questions will appear in the exam on either ICND1 and ICND2?


    Can't answer that with out breaking the non-disclosure agreement. And also in the formate of the exams that question does not mean anything.

    All I will say is don't expect the exam to be split up in to areas. Expect to be asked to combine skills across the topic areas. Cisco exams = balanced testing across the certification topics.
    • If you can't explain it simply, you don't understand it well enough. Albert Einstein
    • An arrow can only be shot by pulling it backward. So when life is dragging you back with difficulties. It means that its going to launch you into something great. So just focus and keep aiming.
  • thehourmanthehourman Member Posts: 723
    How do you get network bits 8? There are only 6 N's:
    NNNNNNHH HHHHHHHH
    That was a mistyped. It should be 2^6 = 64
    Studying:
    Working on CCNA: Security. Start date: 12.28.10
    Microsoft 70-640 - on hold (This is not taking me anywhere. I started this in October, and it is December now, I am still on page 221. WTH!)
    Reading:
    Network Warrior - Currently at Part II
    Reading IPv6 Essentials 2nd Edition - on hold
  • steve514steve514 Member Posts: 17 ■□□□□□□□□□
    The Subnetting 123 tutorial below sums it up perfectly and is my favorite explaination for tackling subnetting on the CCNA:

    MC MCSE: Subnetting 123

    Remember the Subnet Table and you'll be set with subnetting :)
  • blackninjablackninja Member Posts: 385
    abefroman wrote: »
    How do you get network bits 8? There are only 6 N's:
    NNNNNNHH HHHHHHHH

    My bad, it is 6. Been a long day.

    The answer is still right though. Where you see 8 just think 6 :)
    Currently studying:
    CCIE R&S - using INE workbooks & videos

    Currently reading:
    Everything. Twice ;)
  • abefromanabefroman Banned Posts: 278
    blackninja wrote: »
    My bad, it is 6. Been a long day.

    The answer is still right though. Where you see 8 just think 6 :)

    Lol, thanks, that had me really confused. Makes sense now though.

    I hear the term "Borrowing bits" does that apply here?
  • Forsaken_GAForsaken_GA Member Posts: 4,024
    thehourman wrote: »
    Nice, I can answer some questions on subnettingquestions.com with less time. I am so motivated right now. The only thing that is holding me back is division. Heck, I suck on division. If the number is 3 digit I ended up using the magic number method.

    It's just a matter of exercising a little mental agility and knowing which method to use when. For small ranges, it's quicker for me to divide, for larger ones it's quicker for me to just do an additive list, i mean, for a range of 32, there's only what, 8 possible values on the octet? I can run through those in my head in a second
  • blackninjablackninja Member Posts: 385
    abefroman wrote: »
    Lol, thanks, that had me really confused. Makes sense now though.

    I hear the term "Borrowing bits" does that apply here?


    "Borrowing bits" = subnetting, as you are borrowing bits from the classful address and making it classless.

    You are breaking a classful address up and into subnets.

    Sorry for my mistake earlier, I know it's hard enough to learn without a tired idiot making it harder for you. :)
    Well at least you used your head and didn't just accept my answer ;)
    Currently studying:
    CCIE R&S - using INE workbooks & videos

    Currently reading:
    Everything. Twice ;)
Sign In or Register to comment.