Subnetting : True Confessions

CCNA_2007CCNA_2007 Member Posts: 13 ■□□□□□□□□□
I finally got to the point where I thought I had a grasp on subnetting, and so I went to subnettingquestions.com to test my skills over and over again.

I was right, I did have a grasp on subnetting. But I was still making alot of errors.

When I analyzed my mistakes, they all pointed to the same weakness: I don't know how to count from 0 to 256 quickly in multiples of 4 or 8 or 16 or 32.

Counting from 0 to 256 in multiples of 2, or 128 or 64, that's easy enough. It's the ones in between that got me all hung up.

If you're just looking at subnetting for the first time, and if you want to be able to subnet in your head, and if you're not a math whiz with these multiples, then I suspect that you might end up in the same predicament.

thanks.

Comments

  • tech-airmantech-airman Member Posts: 953
    CCNA_2007 wrote:
    I finally got to the point where I thought I had a grasp on subnetting, and so I went to subnettingquestions.com to test my skills over and over again.

    I was right, I did have a grasp on subnetting. But I was still making alot of errors.

    When I analyzed my mistakes, they all pointed to the same weakness: I don't know how to count from 0 to 256 quickly in multiples of 4 or 8 or 16 or 32.

    Counting from 0 to 256 in multiples of 2, or 128 or 64, that's easy enough. It's the ones in between that got me all hung up.

    If you're just looking at subnetting for the first time, and if you want to be able to subnet in your head, and if you're not a math whiz with these multiples, then I suspect that you might end up in the same predicament.

    thanks.

    CCNA_2007,

    Do you prefer to learn using physical methods?
  • CCNA_2007CCNA_2007 Member Posts: 13 ■□□□□□□□□□
    tech-airman, I think physical methods are always better if they can be had, so I would have to answer "yes". But I'm not sure there's a physical method to learn these multiples so that they can be done quickly in the mind, except to know them?

    The more I work at it, I see that multiples of 8 and 16 are the hardest, because they are in the middle, and the best way to approach them is to either use the multiples of 4 or 32 for bracketing, and to work from the multiples of 4 or 32 first....and then just add 8s or 16s from there.

    But for example, the multiples of 2 are easy and immediate, because it's just a matter of seeing whether or not a number is even. So it is easy to figure every single subnet possibility if the mask is 254, for example.

    But with multiples of 4 (mask 252), it seems at first that it would be just as easy, but it's not. For example, if I consider any even, three digit number at random, it's clear that it is a multiple of 2, but is it a multiple of 4? So 162 is a multiple of 2, but is it a multiple of 4? Every multiple of 4 is a multiple of 2, but not every multiple of 2 is a multiple of 4. The simplest examples are the numbers 6 and 10.

    So knowing the mutliples of 2 does not help with knowing the multiples of 4. And by the same token, knowing the multiples of 4 does not help with knowing the multiples of 8. ( 20 is a good example, a multiple of 4 but not a multiple of 8 ). Etc.

    Again, all easy to do on paper with a pencil, or even in your head if you have the time, that's not the problem :)
  • tech-airmantech-airman Member Posts: 953
    CCNA_2007 wrote:
    tech-airman, I think physical methods are always better if they can be had, so I would have to answer "yes". But I'm not sure there's a physical method to learn these multiples so that they can be done quickly in the mind, except to know them?

    The more I work at it, I see that multiples of 8 and 16 are the hardest, because they are in the middle, and the best way to approach them is to either use the multiples of 4 or 32 for bracketing, and to work from the multiples of 4 or 32 first....and then just add 8s or 16s from there.

    But for example, the multiples of 2 are easy and immediate, because it's just a matter of seeing whether or not a number is even. So it is easy to figure every single subnet possibility if the mask is 254, for example.

    But with multiples of 4 (mask 252), it seems at first that it would be just as easy, but it's not. For example, if I consider any even, three digit number at random, it's clear that it is a multiple of 2, but is it a multiple of 4? So 162 is a multiple of 2, but is it a multiple of 4? Every multiple of 4 is a multiple of 2, but not every multiple of 2 is a multiple of 4. The simplest examples are the numbers 6 and 10.

    So knowing the mutliples of 2 does not help with knowing the multiples of 4. And by the same token, knowing the multiples of 4 does not help with knowing the multiples of 8. (20 is a good example, a multiple of 4 but not a multiple of icon_cool.gif. Etc.

    Again, all easy to do on paper with a pencil, or even in your head if you have the time, that's not the problem :)

    CCNA_2007,

    When you mention "multiples", are you trying to figure out the "subnetwork numbers?"
  • CCNA_2007CCNA_2007 Member Posts: 13 ■□□□□□□□□□
    tech_airman, yes, I am trying to figure out the subnet given the mask.

    mask 254 = easy, because subnets fall from zero to 256 in multiples of 2.
    mask 252, harder.
    mask 248, even harder.
    mask 240, very hard.
    mask 224, a bit easier, multiples of 32, and only 8 possibilities.
    mask 192, much easier, multiples of 64, and only 4 possibilities
    mask 128, very easy, multiples of 128, and only 2 possibilities.


    Given the decimal value of the octet, and trying to figure out the subnet, it's hard in the midranges. thanks for listening.
  • tech-airmantech-airman Member Posts: 953
    CCNA_2007 wrote:
    tech_airman, yes, I am trying to figure out the subnet given the mask.

    mask 254 = easy, because subnets fall from zero to 256 in multiples of 2.
    mask 252, harder.
    mask 248, even harder.
    mask 240, very hard.
    mask 224, a bit easier, multiples of 32, and only 8 possibilities.
    mask 192, much easier, multiples of 64, and only 4 possibilities
    mask 128, very easy, multiples of 128, and only 2 possibilities.


    Given the decimal value of the octet, and trying to figure out the subnet, it's hard in the midranges. thanks for listening.

    CCNA_2007,

    Gotcha. This is the technique that I developed while doing the bashing head into the "virtual" wall trying to study for the 640-801 CCNA exam. Question, do you know how to touch type?
  • malcyboodmalcybood Member Posts: 900 ■■■□□□□□□□
    CCNA_2007 wrote:
    tech_airman, yes, I am trying to figure out the subnet given the mask.

    mask 254 = easy, because subnets fall from zero to 256 in multiples of 2.
    mask 252, harder.
    mask 248, even harder.
    mask 240, very hard.
    mask 224, a bit easier, multiples of 32, and only 8 possibilities.
    mask 192, much easier, multiples of 64, and only 4 possibilities
    mask 128, very easy, multiples of 128, and only 2 possibilities.


    Given the decimal value of the octet, and trying to figure out the subnet, it's hard in the midranges. thanks for listening.

    Every time I work on subnetting q's I draw the following chart out. Each numbers correspond to the one below so 128 mask corresponds to /25 bit borrow and .128 in the octet and so on. After you familiarise yourself with this you can get away with using just the decimal numbers.

    Mask 128 192 224 240 248 252 254 255

    bits /25 /26 /27 /28 /29 /30 /31 /32

    decimal 128 64 32 16 8 4 2 1

    OK so if you have a host address of 192.168.123.22 and a mask of 255.255.255.248 what is the subnet?

    I do it in the following way and use the mask/bits/decimal relation. So I know the network part is definately 192.168.123 due to the first 3 octets being 255.255.255 which just leaves me the last octet entry .248 to work out. Remember any bits switched on within .248 mask is the subnet.

    So based on the above mentioned mask, what I would do to work out what subnet .22 is on, draw out my little decimal chart as below only and use the above chart as a reference.

    128 64 32 16 8 4 2 1

    Refer to your table and establish your subnet range from your mask .248 and draw a line to the right hand side of 8. This indicates your network portion

    128 64 32 16 8| 4 2 1

    I would then mark 1's and 0's over the bits that accumulate to the 4th octet network address .22 as below

    128 64 32 16 8| 4 2 1

    0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 |

    = 16 + 4 + 2 = 22 with only 16 being in the network portion of the address meaning that this particular host is in the 192.168.123.16 subnet

    If the last octet was . 114 with the same subnet mask, then you would be on subnet 192.168.123.112 as you would have 64 + 32 + 16 (in network portion is 112) + 2 (in host portion) = 114, do you follow?

    Use the same method for different classes on networks A & B and also for different subnet masks. I learned this method 6 years ago and have never forgotten it. Although I can do this in my head, I always write down the charts as it is very easy to make a mistake especially in an exam situation by relying completely on memory and I find it easier to reference quickly and work out scenarios in my head if I have something on paper to refer to!

    Remember in the exam you have a pen and a pad to write this sort of stuff down before the actual exam starts.

    I hope this helps and if you have any questions on the above please ask.

    Cheers

    Malc
  • malwethmalweth Member Posts: 42 ■■□□□□□□□□
    I use the same chart :) Thought about getting a plastic card made ;)

    If you're really interested in being able to do it in your head, best I can say is to write them out over and over again... it's similar to how teachers used to make kids write out the multiplication tables or spelling words repeatedly. It does work...

    Personally, I can't think of a time someone's asked me to generate a subnet where I didn't have enough time to figure it out on paper... as long as you can still do it within 30 seconds or so.
    128  64  32  16  |   8   4   2   1
    128 192 224 240  | 248 252 254 255
     25  26  27  28  |  29  30  31  32
    
  • ReardenRearden Member Posts: 222
    I'm a CS major and had to take the computer architecture course this semester. After all of the binary math I had to do in that course, I think that I'm finally going to be able to get subnetting down cold.

    Good luck in getting it figured out. :)
    More systems have been wiped out by admins than any cracker could do in a lifetime.
  • KaminskyKaminsky Member Posts: 1,235
    There's only 8 of them and they must be sequential.

    It's not like you are converting decimal to binary really. You're just adding up powers of 2 backwards ... 128 + 64 + 32 ... etc for the networks and 1+2+4, etc for the hosts.

    The actual 1,2.4,8,16,32,64,128 you see in your head.

    There is no trick to this !

    You just stare at the table long enough and you see it and know it when you close your eyes. The adding is the only tricky bit. You do that long enough and your brain becomes accustomed and you see say 4 network bits and you know it's going to be 240. You don't check, just in case.... you know it is right!

    This is important to master mentally. Your entire networking career is going to be based on that ability. On the ground, your colleagues see you counting fingers trying to work out an address range and their opinion of you is going to nose dive fast. You've just got to know it. It really isn't that hard.

    Just keep doing it over and over until you know it.
    Kam.
  • CCNA_2007CCNA_2007 Member Posts: 13 ■□□□□□□□□□
    Thanks everyone for this input. These are all good ideas, I love seeing different ways to accomplish a thing.

    I like the idea of writing down and turning on and off the binary bits, only thing is I'm hot to see if I can get to the point where I can do it all in my head. It's the basic math in the head that is the hardest part.

    Just today I was practicing some more and I decided that with a 252 or 248 mask requiring subnets in increments of 4 or 8, and if the IP address segment is high up there to where I can't figure it out at first glance, I'm just going to count up my subnets in multiples of 40, for example, until I get close to my target. From there I can back down or advance up by 4 or 8, depending on the mask.
    The 40 multiple is will work for either mask.

    267 as an IP segment, well by 40s it's between 240 and 280. From there I can figure up or down in my head.

    tech_airman, yes I can touch type, happy to hear your idea on that.

    Yes after all, it's all about practice and memorizing, but I'm starting to see little tricks about grouping the multiples up for quicker rangefinding.

    thanks all.

    edit: i just though of a better way to handle the counting for 252 masks or /14, /22, /30
    just to count by 20s and then move up or down by 4 to get close to the target IP. example if IP segment is 225 then 220 is a multiple of 20 so 220 is a valid subnet, then add 4 to get to the subnet that contains 225.
  • tech-airmantech-airman Member Posts: 953
    CCNA_2007 wrote:
    Thanks everyone for this input. These are all good ideas, I love seeing different ways to accomplish a thing.

    I like the idea of writing down and turning on and off the binary bits, only thing is I'm hot to see if I can get to the point where I can do it all in my head. It's the basic math in the head that is the hardest part.

    Just today I was practicing some more and I decided that with a 252 or 248 mask requiring subnets in increments of 4 or 8, and if the IP address segment is high up there to where I can't figure it out at first glance, I'm just going to count up my subnets in multiples of 40, for example, until I get close to my target. From there I can back down or advance up by 4 or 8, depending on the mask.
    The 40 multiple is will work for either mask.

    267 as an IP segment, well by 40s it's between 240 and 280. From there I can figure up or down in my head.

    tech_airman, yes I can touch type, happy to hear your idea on that.

    Yes after all, it's all about practice and memorizing, but I'm starting to see little tricks about grouping the multiples up for quicker rangefinding.

    thanks all.

    edit: i just though of a better way to handle the counting for 252 masks or /14, /22, /30
    just to count by 20s and then move up or down by 4 to get close to the target IP. example if IP segment is 225 then 220 is a multiple of 20 so 220 is a valid subnet, then add 4 to get to the subnet that contains 225.

    CCNA_2007,

    Then the answer, like some things, is right in front of your face. I'm talking about your eight fingers on the "home keys" on the keyboard. Notice the pattern/relationship. You have 8 fingers, there are 8 bits in a byte. This is useful to know because of what I call the "relevant octet."

    Here's the checklist I use to solve pretty much any subnetting problem:
    1. Determine the class of the IP address.
    2. Determine the default mask for the class of the IP address.
    3. Determine the default network address.
    4. Determine the "relevant octet" based on the subnet mask.
    5. Determine the subnetwork address.
    6. Determine the first valid IP address.
    7. Determine the last valid IP address.
    8. Determine the broadcast IP address.

    So let's make this simple with the following problem:

    IP address = 192.168.1.129
    Subnet Mask = 255.255.255.192

    So let's go through the steps:
    Step 1: Determine the class of the IP address.

    You take the first octet then convert it from decimal to binary. Since 128 + 64 = 192, the binary for 192. is 11000000. Notice the first bit is not 0, so this is NOT a Class A address. Notice the first two bits are not 10, so this is NOT a Class B address. However, the first three bits are 110, so this is a Class C address.

    Step 2: Determine the default network address.

    Since we know that this IP address is a Class C address, the default mask for Class C is 255.255.255.0 . We apply that default mask to the IP address as follows:

    IP address
    192.168.001.129
    Default mask
    255.255.255.000
    Default network
    192.168.001.000

    Step 3: Determine the "relevant octet" based on the subnet mask.

    Since the subnet mask is 255.255.255.192 and the default mask is 255.255.255.0 , the "relevant octet" is the fourth one. Ok, this is where your fingers come in.

    Lay your eight fingers on the "home keys" on the keyboard. Now, lift both of your hands until your fingertips are in the air above the home keys. Your eight fingers now represent 8 bits in the byte that represents the "relevant octet." Now, since the subnet mask for the relevant octet is .192 , you represent that as follows:
    1. Lower your left pinky downward until it touches the 'A' key.
    2. Lower your left ring finger downward until it touches the 'D' key.

    You should have the other 6 fingers still up in the air. The two fingers on the left hand that are lowered now represents the subnet bits that you "borrowed" from the host bits. Now, if the IP address is classless, then we have 4 possible subnets. Here's why...
    Subnet  8th  7th
    count   bit  bit
    1       0    0
    2       0    1
    3       1    0
    4       1    1
    


    For classful IP addresses, we are not allowed to use the "all 0" and "all 1" subnets, so that means subnets 1 and 4 are not allowed, which is why we subtract 2 from the number of subnets from the maximum possible classless subnet numbers, in this case we have 2 classful subnets we can use. Now, here's where it helps you to simplify subnetting. Look at the positions of the two fingers on the left hand. They represent the "128" bit and the "64" bit. So instead of trying to do some sort of contorted "long division" to figure out "multiples", think of simply what the bits ARE.

    In the case of two subnet bits, assuming it's a classless situation, let's concentrate on what those bits ARE. Those bits ARE....
    1. 192.168.1.00|000000
    2. 192.168.1.01|000000
    3. 192.168.1.10|000000
    4. 192.168.1.11|000000

    Now to translate the binary back to decimal it works out to be...
    1. 192.168.1.00|000000 = 192.168.1.0
    2. 192.168.1.01|000000 = 192.168.1.64
    3. 192.168.1.10|000000 = 192.168.1.128
    4. 192.168.1.11|000000 = 192.168.1.128+64 = 192.168.1.192

    There, we now know ALL the subnetwork addresses WITHOUT resorting to "long division" and "multiples." Now onto the next step..

    Step 4: Determine the first valid IP address.

    Now that we've calculated all the subnetwork addresses, just simply add one to them. So in this example, we've got...
    1. 192.168.1.00|000000 = 192.168.1.0+1 = 192.168.1.1
    2. 192.168.1.01|000000 = 192.168.1.64+1 = 192.168.1.65
    3. 192.168.1.10|000000 = 192.168.1.128+1 = 192.168.1.129
    4. 192.168.1.11|000000 = 192.168.1.192+1 = 192.168.1.193

    See how simple things are so far? Now, instead of going to Step 5 next, we're going to Step 6.

    Step 6: Determine the broadcast IP address.

    Now this is where you really need to understand binary. Here's how to figure out the broadcast address...

    Going back to the "relevant octet", we've got 8 bits. So here's some "quick practical math" to help find the broadcast address....

    Knowing the following decimal facts...
    1. 128 = 127 + 1
    2. 64 = 63 + 1
    3. 32 = 31 + 1
    4. 16 = 15 + 1
    5. 8 = 7 + 1
    6. 4 = 3 + 1
    7. 2 = 1 + 1

    Translated to binary is...
    1. 10000000 = 01111111 + 00000001
    2. 01000000 = 00111111 + 00000001
    3. 00100000 = 00011111 + 00000001
    4. 00010000 = 00001111 + 00000001
    5. 00001000 = 00000111 + 00000001
    6. 00000100 = 00000011 + 00000001
    7. 00000010 = 00000001 + 00000001

    The reason for all this is because the broadcast address is defined as the IP address with "all 1s in the host bits." So by figuring out the "lowest bit in the subnet mask" , you can figure out how to find the broadcast address by...
    1. Adding .127 to the subnetwork address if the subnet mask is 255.255.255.128 or /25
    2. Adding .63 to the subnetwork address if the subnet mask is 255.255.255.192 or /26
    3. Adding .31 to the subnetwork address if the subnet mask is 255.255.255.224 or /27
    4. Adding .15 to the subnetwork address if the subnet mask is 255.255.255.240 or /28
    5. Adding .7 to the subnetwork address if the subnet mask is 255.255.255.248 or /29
    6. Adding .3 to the subnetwork address if the subnet mask is 255.255.255.252 or /30

    Now that we know the broadcast addresses, just subtract one from them to find the "last valid IP address" or Step 5.

    So in summary, let your fingers in front of your face be the guide for subnet bits therefore subnetwork addresses, add 1 to the subnetwork addresses to find the first valid IP address, then to figure out the broadcast addresses, then to figure out the last valid IP address. Also in review, you should memorize the following "finger table..."
             Finger Finger Finger Finger Finger Finger Finger Finger
               1      2      3      4      5      6      7      8
    Binary    128     64     32     16      8      4      2      1
    Subnet    128    192    224    240    248    252    253    255
    


    Remember, Prometric and VUE will permit you to take your fingers into the exam. So why not use them as your "calculator?" :)

    I hope this helps.
  • CCNA_2007CCNA_2007 Member Posts: 13 ■□□□□□□□□□
    tech-airman, that's an excellent explanation of the process, and thank you for that.

    It's complete and covers every base, and I can see that if I just followed that process each time, I would come out with the correct answer.

    A little technical glitch I noticed when doing the actual 'tactile' part with fingers on the keyboard in home position, the 64 bit would be an "S", and not a "D", the "D" would represent the 32 bit. If that was just a typo on your part, you might want to make note for the next time you share the tutorial.

    Little by little, it's all sinking in and thanks again.
  • tech-airmantech-airman Member Posts: 953
    CCNA_2007 wrote:
    tech-airman, that's an excellent explanation of the process, and thank you for that.

    It's complete and covers every base, and I can see that if I just followed that process each time, I would come out with the correct answer.

    A little technical glitch I noticed when doing the actual 'tactile' part with fingers on the keyboard in home position, the 64 bit would be an "S", and not a "D", the "D" would represent the 32 bit. If that was just a typo on your part, you might want to make note for the next time you share the tutorial.

    Little by little, it's all sinking in and thanks again.


    CCNA_2007,

    Yes, you are correct. It was a typo that should have been 'S' instead of 'D'.
Sign In or Register to comment.