In your head (Subnetting + VLSMs)

markzabmarkzab Member Posts: 619
Something I noticed. Some of you know I haven't been doing this for years and just got back into things. I bought Lammle's book for the CCNA. In the reviews on here and elsewhere people mentioned in his chapter on subnetting and VLSMs he tries to teach you a way of doing this all in your head. I just finished Chapters 2 and 3 last night and I understand perfectly what he's trying to teach and how to do this all in your head.

I've seen others call him nuts for trying to do it in your head. I think it works for me right now because I cannot remember how I used to do it back in the day. Actually, after seeing his method of doing this all I can't even imagine another way of doing it. I'm not sure if that's a good or bad thing honestly. icon_lol.gif

I think some people may have problems learning Lammle's "in your head" way because they've been so used to doing it one way for so long. In my case I remembered the basics and just applied his method.

Just gotta remember the blocks and you're fine. 4, 8, 16, 32, 64, 128. To myself I feel like I know this, but I'm worried that it seems a little too easy for me. Can it be so simple?
"You, me, or nobody is gonna hit as hard as life. But it ain't how hard you hit; it's about how hard you can get hit, and keep moving forward. How much you can take, and keep moving forward. That's how winning is done!" - Rocky
«1

Comments

  • jrmcentjrmcent Member Posts: 51 ■■□□□□□□□□
    i actually found the "in your head method" to be fairly easy, and its the first time i have ever done any subnetting, i use it all the time now, he does explain it very well
  • markzabmarkzab Member Posts: 619
    I mean, let's say I'm presented something like 192.168.40.12 /27

    To figure everything out for that don't I just...

    Block size (2"x"th power)= ("5" host bits left on 4th octet) = 32
    Subnet mask = (3 bits on the 4th octet) 255.255.255.224
    8 subnets max = 0 (with ip subnet 0 command, right?), 32, 64, 96, 128, 160, 192, 224

    So this IP would be on the 192.168.40.0 network where most likely the default gateway would be 192.168.40.1 and the broadcast address would be 192.168.40.31, giving me a valid host range of 192.168.40.(1-30)...

    Right?

    Where am I missing something? I even find it easier when I'm presented with a smaple network with amounts of users needed for each network.

    Can someone test me out so I can see if I really know this the way I think I do?

    That is...if you're not too busy at work. icon_wink.gif
    "You, me, or nobody is gonna hit as hard as life. But it ain't how hard you hit; it's about how hard you can get hit, and keep moving forward. How much you can take, and keep moving forward. That's how winning is done!" - Rocky
  • Ed RooneyEd Rooney Member Posts: 52 ■■□□□□□□□□
    I think his method is the easiest. I try to teach it to all of my entry-level staff.

    It IS that easy.
  • markzabmarkzab Member Posts: 619
    So what I wrote up top was on point?

    It just feels so blank and empty...almost too easy to be correct. icon_sad.gif

    I think I just miss writing 11101010101010001010010010010010101001001001 all the time. icon_wink.gif
    "You, me, or nobody is gonna hit as hard as life. But it ain't how hard you hit; it's about how hard you can get hit, and keep moving forward. How much you can take, and keep moving forward. That's how winning is done!" - Rocky
  • remyforbes777remyforbes777 Member Posts: 499
    You are right. I learned using Lammies way and its absolutely amazing how easy it is. I can do subnetting in my head like its nothing now.
  • james_james_ Member Posts: 97 ■■□□□□□□□□
    Lammle's chapter on Subnetting is the best. I learned to subnet in my head within an hour or two, maybe not very fast, but still the understanding was there. Now through practice the speed is there too. I agree blocks are the key to subnetting, understand them, and everything else seems to fall in place.

    To make things easier, i always write down these numbers:

    128 192 224 240 248 252 254 255

    If I am given a /27, I count from the classful boundary, ie 24 through to 27 on this little chart above.

    "25" would be a prefix of 128
    "26" would be a prefix of 192
    "27" would be a prefix of 224

    It works will all classes, ie a /10, the classful boundary is /8, so counting across gives 192, just have to remember in which Octet to put the interesting mask.

    With that info, blocks are a piece of cake to work out.

    Hope this doesn't confuse!
  • remyforbes777remyforbes777 Member Posts: 499
    James,
    I use the same exact method. I use the classful subnet (8, 16, 24) and if I am given a subnet of /27 I know I need to count over three bits which would equal 224. Makes it very simple. From there I know 256-224=32 (block size).
  • DirtySouthDirtySouth Member Posts: 314 ■□□□□□□□□□
    I'm not sure exactly if I follow Lamle's "head" model, but for me it was something that finally just clicked and made sense. After that, I no longer had to write it all out on paper. Granted...I do still use my fingers. :D
  • markzabmarkzab Member Posts: 619
    "You, me, or nobody is gonna hit as hard as life. But it ain't how hard you hit; it's about how hard you can get hit, and keep moving forward. How much you can take, and keep moving forward. That's how winning is done!" - Rocky
  • markzabmarkzab Member Posts: 619
    This one froze me up for a second...word for word:

    Q: You need 500 subnets, each with about 100 usable host addresses per subnet. What mask will you assign using a Class B network address?

    A) 255.255.255.252
    B) 255.255.255.128
    C) 255.255.255.0
    D) 255.255.254.0


    Ok, so the way my brain started to process this after freezing for a second was to figure out the host part first. It said about 100 users per subnet so I obviously was going with the 128 block. With that I figured that I would need the final 7 bits on the final octet for hosts to get to 128/s-net.

    That would leave the first bit in the 4th octet a mask bit giving me the mask of 255.255.255.128. That was the correct answer when I checked. When I checked the answer key this is what the boook wrote...

    B) If you use the mask 255.255.255.0, that only gives you 8 subnet bits, or 256 subnets. You are going to have to use 1 subnet bit from the fourth octet, or 255.255.255.128. This is 9 subnet bits (2[9th]=512).

    Ok, so here is finally my question...2 part actually:

    1.) Obviously he calculated for the 500 needed subnets before calculating for hosts. The exact opposite order of how I calculated for the final answer. Is there a right or wrong way? Was I wrong in calculating for needed hosts before needed subnets? Could this bring me problems in the future if I calculate hosts first and get comfortable with that?

    2.) And I just thought of this writing the above...what if someone asked for 500 subnets and around 180 hosts per subnet on a Class B network? Would I have to say sorry, can't be done? If they said this was a must at that point would I suggest moving to a Class A addressing scheme?

    Phew, lots of stuff...love this. Thanks for the help.
    "You, me, or nobody is gonna hit as hard as life. But it ain't how hard you hit; it's about how hard you can get hit, and keep moving forward. How much you can take, and keep moving forward. That's how winning is done!" - Rocky
  • borumasborumas Member Posts: 244 ■■■□□□□□□□
    Ok, so here is finally my question...2 part actually:

    1.) Obviously he calculated for the 500 needed subnets before calculating for hosts. The exact opposite order of how I calculated for the final answer. Is there a right or wrong way? Was I wrong in calculating for needed hosts before needed subnets? Could this bring me problems in the future if I calculate hosts first and get comfortable with that?

    2.) And I just thought of this writing the above...what if someone asked for 500 subnets and around 180 hosts per subnet on a Class B network? Would I have to say sorry, can't be done? If they said this was a must at that point would I suggest moving to a Class A addressing scheme?
    1) I think the old logic of whatever gives you the right answer on a consistent basis is the right way, so if the other way works for you keep using it.
    2) I guess you could tell them you could only do that with a class A network.

    A good testing resource for practice is http://www.subnettingquestions.com/default_int.asp
    they ask a question and then you can click to find an answer, really a great site to practice subnetting on.
  • Sulblk27Sulblk27 Member Posts: 148
    Great timing...I am in the subnetting...for some reason..B and C are fine with me...the Class A has me staring at the ceiling icon_eek.gif
    I can't seem to see how to subnet with a 255.255.0.0---my problem lies with, ie..subnet 10.0.0.0- 1st host 10.0.0.1, 10.1.0.1 placing the 1s where they are makes my brain freeze. Sybex- 5th edition- page128
    I am badly missing something, any assistance will be greatly appreciated.
    Someone asked me when will my studying be over......
  • markzabmarkzab Member Posts: 619
    Sulblk27 wrote:
    Great timing...I am in the subnetting...for some reason..B and C are fine with me...the Class A has me staring at the ceiling icon_eek.gif
    I can't seem to see how to subnet with a 255.255.0.0---my problem lies with, ie..subnet 10.0.0.0- 1st host 10.0.0.1, 10.1.0.1 placing the 1s where they are makes my brain freeze. Sybex- 5th edition- page128
    I am badly missing something, any assistance will be greatly appreciated.

    EDIT: WARNING - Read slowly. Lots of numbers. icon_lol.gif

    Ok, it's not that bad. If it's a class A your default mask is starting at 255.0.0.0. So pretend we're talking about someone who needs to be able to have 200 subnets. The subnets are in that 2nd octet there. So lets go binary for a second. You know that first octet is already 255 (11111111), so for the 2nd octet to get 200 subnets we have to go 3 bits in from the left (11111111.11100000). The first bit would be 128, the 2nd bit would be 192 (still not enough cause we need 200) and the 3rd bit would be 224 (more than enough). So, knowing that we would only need those 3 bits in the 2nd octet that would give us a subnet mask of 255.224.0.0 (11111111[255].11100000[224].00000000.00000000).

    Your IP would look something like this in this example: 10.0.0.0 /11 (8 for the first octet and 3 from the 2nd). This would give you a SHITLOAD of hosts (2 to the 21st power).

    I've opened the book and am looking at the example. If you understood the above it might make a little more sense It's giving you a mask for the network of 10.0.0.0 as 255.255.0.0. That entire 2nd octet is available for subnets. So you could have a 10.0.0.0 (00001010.00000000) if you had ip subnet zero turned on. Then your next subnet would be 10.1.0.0 subnetwork (00001010.00000001). Then 10.2.0.0, 10.3.0.0, 10.4.0.0...and so on. So looking at the first subnet you could possibly have...10.0.0.0, what would be the first host? It would be 10.0.0.1. Then the first host for the 2nd subnet which we already figured out to be 10.1.0.0 would be 10.1.0.1. Then the first host for the next subnet, 10.2.0.0 would be 10.2.0.1.

    I'm not sure if I'm explaining this as easy as it sounds in my head so I'll stop there. icon_wink.gif
    "You, me, or nobody is gonna hit as hard as life. But it ain't how hard you hit; it's about how hard you can get hit, and keep moving forward. How much you can take, and keep moving forward. That's how winning is done!" - Rocky
  • markzabmarkzab Member Posts: 619
    borumas wrote:
    Ok, so here is finally my question...2 part actually:

    1.) Obviously he calculated for the 500 needed subnets before calculating for hosts. The exact opposite order of how I calculated for the final answer. Is there a right or wrong way? Was I wrong in calculating for needed hosts before needed subnets? Could this bring me problems in the future if I calculate hosts first and get comfortable with that?

    2.) And I just thought of this writing the above...what if someone asked for 500 subnets and around 180 hosts per subnet on a Class B network? Would I have to say sorry, can't be done? If they said this was a must at that point would I suggest moving to a Class A addressing scheme?
    1) I think the old logic of whatever gives you the right answer on a consistent basis is the right way, so if the other way works for you keep using it.
    2) I guess you could tell them you could only do that with a class A network.

    A good testing resource for practice is http://www.subnettingquestions.com/default_int.asp
    they ask a question and then you can click to find an answer, really a great site to practice subnetting on.

    Nice site. Thanks bud. icon_wink.gif
    "You, me, or nobody is gonna hit as hard as life. But it ain't how hard you hit; it's about how hard you can get hit, and keep moving forward. How much you can take, and keep moving forward. That's how winning is done!" - Rocky
  • markzabmarkzab Member Posts: 619
    Ok, that site just completely screwed me up. icon_lol.gif

    Question: Which subnet does host 172.31.127.197/23 belong to?

    Answer: 172.31.126.0


    How the hell is 126 a subnet address there? We've got a subnet mask of 255.255.11111110 (254?) woah...I'm completely stumped right now. WTF?

    Ok, been sitting here with a major brainfart... Subnets going by 4's? If that were the case wouldn't the subnets around that number be 172.31.120.0, 124.0, 128.0? How the hell are they getting a 126 subnet?

    Wait...it's starting to click... (PS, every paragraph in this post is about 3-5 minutes later, lol)...

    Is the 126 network a viable one because with the available bits it would be...01111110? And since 127 is an odd numbers you wouldnt be able to get to that number so it couldnt be a subnet? Therefor making the closest one to it 126?

    Can anyone who understands my rambling help me out? And if I finally did begin to understand that please explain to me how in the depths of hades I could have figured out the 126 subnet in my head? It doesnt coinside with any of the block sizes does it?

    icon_confused.gificon_eek.gificon_confused.gificon_eek.gif
    "You, me, or nobody is gonna hit as hard as life. But it ain't how hard you hit; it's about how hard you can get hit, and keep moving forward. How much you can take, and keep moving forward. That's how winning is done!" - Rocky
  • KaminskyKaminsky Member Posts: 1,235
    I remember when the light started coming on for me on this. Great feeling. You'r nearly there but it's just the way your doing your maths thats throwing you.
    Let me explain.

    Question: Which subnet does host 172.31.127.197/23 belong to?

    Answer: 172.31.126.0

    The 172 implies a class B. (This is important so keep it in your head as it changes the way the maths work throughout)

    Mental Calculations
    1st) /23 = 254.0 (not 254 - this is a class B) [11111111.11111111.11111110.00000000]
    2nd) [use 256-SN Rule to find increments] 256-254 = 2 = Subnet increments are 2.0 (not 2)

    Rather than count up the 3rd octet in 2s we can see 127 should lie in the 126.0 subnet

    .....
    .....
    SN: 172.31.124.0 hosts 172.31.124.1 - 172.31.125.254 BC = 172.31.125.255
    SN: 172.31.126.0 hosts 172.31.126.1 - 172.31.127.254 BC = 172.31.127.255
    SN: 172.31.128.0 hosts 172.31.128.1 - 172.31.129.254 BC = 172.31.129.255

    The trick to it is the subnet increment is 2.0 (or put another way 0.0.2.0) not just 2. If it were a class C it would be 2 (or 0.0.0.2) or a class A it would be written 0.2.0.0)

    It's important to work out the subnet according to the class of IP address you are working with and remember it in full (2.0)

    Little more practice and you can knock out this question in less than 10 seconds.

    Now go back to subnettingquestions.com and kick it's butt !! icon_lol.gif

    Good luck.
    Kam.
  • Sulblk27Sulblk27 Member Posts: 148
    Thank you markzab...I'm going into lock down mode with subnetting--until I fully understand...things started clicking for a minute..then 'lights out' icon_rolleyes.gif
    Someone asked me when will my studying be over......
  • markzabmarkzab Member Posts: 619
    Kaminsky wrote:
    I remember when the light started coming on for me on this. Great feeling. You'r nearly there but it's just the way your doing your maths thats throwing you.
    Let me explain.

    Question: Which subnet does host 172.31.127.197/23 belong to?

    Answer: 172.31.126.0

    The 172 implies a class B. (This is important so keep it in your head as it changes the way the maths work throughout)

    Mental Calculations
    1st) /23 = 254.0 (not 254 - this is a class B) [11111111.11111111.11111110.00000000]
    2nd) [use 256-SN Rule to find increments] 256-254 = 2 = Subnet increments are 2.0 (not 2)

    Rather than count up the 3rd octet in 2s we can see 127 should lie in the 126.0 subnet

    .....
    .....
    SN: 172.31.124.0 hosts 172.31.124.1 - 172.31.125.254 BC = 172.31.125.255
    SN: 172.31.126.0 hosts 172.31.126.1 - 172.31.127.254 BC = 172.31.127.255
    SN: 172.31.128.0 hosts 172.31.128.1 - 172.31.129.254 BC = 172.31.129.255

    The trick to it is the subnet increment is 2.0 (or put another way 0.0.2.0) not just 2. If it were a class C it would be 2 (or 0.0.0.2) or a class A it would be written 0.2.0.0)

    It's important to work out the subnet according to the class of IP address you are working with and remember it in full (2.0)

    Little more practice and you can knock out this question in less than 10 seconds.

    Now go back to subnettingquestions.com and kick it's butt !! icon_lol.gif

    Good luck.

    Ok, I understand now. The problem I was having was that I was thinking that blocks correspond with subnets as well and from what I've been reading there have been no mention of a block size of 2. The only ones Ive read about are 4,8,16,32,64,128. With that in mind I couldn't understand how someone can divide 126 by the smallest size of 4. Thanks Kaminsky. icon_wink.gif

    So theoretically on a C Class network you couldn't have a mask of 255.255.255.254 because that would only leave you with 2 available addresses, right? And one would be the subnet and the other a broadcast? In other words you can't have /31, right? The .254 can only be on a Class A (255.254.0.0) or Class B (255.255.254.0)?
    "You, me, or nobody is gonna hit as hard as life. But it ain't how hard you hit; it's about how hard you can get hit, and keep moving forward. How much you can take, and keep moving forward. That's how winning is done!" - Rocky
  • borumasborumas Member Posts: 244 ■■■□□□□□□□
    So theoretically on a C Class network you couldn't have a mask of 255.255.255.254 because that would only leave you with 2 available addresses, right? And one would be the subnet and the other a broadcast? In other words you can't have /31, right? The .254 can only be on a Class A (255.254.0.0) or Class B (255.255.254.0)?
    Yeah, you could have a mask of 255.255.255.252 but not 254, cause 252 would allow 2 host but 254 would not allow any host.
  • markzabmarkzab Member Posts: 619
    borumas wrote:
    So theoretically on a C Class network you couldn't have a mask of 255.255.255.254 because that would only leave you with 2 available addresses, right? And one would be the subnet and the other a broadcast? In other words you can't have /31, right? The .254 can only be on a Class A (255.254.0.0) or Class B (255.255.254.0)?
    Yeah, you could have a mask of 255.255.255.252 but not 254, cause 252 would allow 2 host but 254 would not allow any host.

    Alright, that's definitely what stumped me then. Thanks guys.
    "You, me, or nobody is gonna hit as hard as life. But it ain't how hard you hit; it's about how hard you can get hit, and keep moving forward. How much you can take, and keep moving forward. That's how winning is done!" - Rocky
  • KaminskyKaminsky Member Posts: 1,235
    Theoretically and mathematically you could have a class C of 254 but it would be useless an I am pretty sure it's useless with classless addressing too even though /30 is common (or at least could be used with either side of a wan link).
    Kam.
  • PashPash Member Posts: 1,600 ■■■■■□□□□□
    DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.
  • SieSie Member Posts: 1,195
    Can you tell me which version of the book this is in?

    I think i can locate a copy of the fourth edition this afternoon.....

    Just to have a look what method he uses.
    Foolproof systems don't take into account the ingenuity of fools
  • markzabmarkzab Member Posts: 619
    Kaminsky wrote:
    Theoretically and mathematically you could have a class C of 254 but it would be useless an I am pretty sure it's useless with classless addressing too even though /30 is common (or at least could be used with either side of a wan link).

    A Class C .254 mask wouldn't even work for WAN links because you'd only have 2 addresses available. One would be the subnet while the other would be the broadcast.
    "You, me, or nobody is gonna hit as hard as life. But it ain't how hard you hit; it's about how hard you can get hit, and keep moving forward. How much you can take, and keep moving forward. That's how winning is done!" - Rocky
  • markzabmarkzab Member Posts: 619
    Sie wrote:
    Can you tell me which version of the book this is in?

    I think i can locate a copy of the fourth edition this afternoon.....

    Just to have a look what method he uses.

    Not sure if you're the one who sent me the PM, but I'm using Lammle's 5th edition.
    "You, me, or nobody is gonna hit as hard as life. But it ain't how hard you hit; it's about how hard you can get hit, and keep moving forward. How much you can take, and keep moving forward. That's how winning is done!" - Rocky
  • KaminskyKaminsky Member Posts: 1,235
    markzab wrote:
    Kaminsky wrote:
    Theoretically and mathematically you could have a class C of 254 but it would be useless an I am pretty sure it's useless with classless addressing too even though /30 is common (or at least could be used with either side of a wan link).

    A Class C .254 mask wouldn't even work for WAN links because you'd only have 2 addresses available. One would be the subnet while the other would be the broadcast.

    Things get funky when you get to vlsm. I'm still shaky on that. Seems far too straightforward after learning subnetting.

    4 ip sibnets are very workable on wan links though. When your spreading a given subnet (isp) and then subnetting it down further, only using 4 IPs for the wan and a couple more for the rest of the network infrastructure and whatever is left for the hosts in a small company works a treat. Looks very flash too icon_wink.gif
    Kam.
  • mikej412mikej412 Member Posts: 10,086 ■■■■■■■■■■
    CCNAs are not allowed to use /31 ..... you have to wait until you are studying for the CCNP. icon_lol.gif
    Using 31-Bit Prefixes on IPv4 Point-to-Point Links
    :mike: Cisco Certifications -- Collect the Entire Set!
  • KaminskyKaminsky Member Posts: 1,235
    Ahhh that explains the guy that's been hanging around outside my house ... he just waiting for me to reconfigure again....

    icon_wink.gif


    BTW: Mike is a link machine icon_lol.gif he knows em all....
    Kam.
  • markzabmarkzab Member Posts: 619
    mikej412 wrote:
    CCNAs are not allowed to use /31 ..... you have to wait until you are studying for the CCNP. icon_lol.gif
    Using 31-Bit Prefixes on IPv4 Point-to-Point Links

    Ok, you just opened up the can Mike. icon_lol.gif

    I read through that and if I'm understanding it correctly basically the "network address" would be assigned to the first side of that WAN link, and the "broadcast address" would be assigned to the 2nd side? Yet there would not be any broadcasts now?
    "You, me, or nobody is gonna hit as hard as life. But it ain't how hard you hit; it's about how hard you can get hit, and keep moving forward. How much you can take, and keep moving forward. That's how winning is done!" - Rocky
  • KaminskyKaminsky Member Posts: 1,235
    You still need the transport mechanism... ie one end ip (host ip) to the other end ip (host ip) which makes 4 such a lovely number when your only given a class C for the whole small business and there is no need to nat.
    Kam.
Sign In or Register to comment.