subnetting fail

jamesleecolemanjamesleecoleman Posts: 1,899Member ■■■■■□□□□□
Alright...

I've been to

http://www.subnettingquestions.com/
http://www.bradreese.com/how-to-subnet-a-network.pdf
http://articles.techrepublic.com.com/5100-10878_11-6089187.html
http://faculty.valleycollege.net/rpowell/jscript/subnet2.htm
http://www.ralphb.net/IPSubnet/ipaddr.html

I've seen a few posts that explained subnetting and I still don't understand it! I'm using Todd Lammle CCNA Sixth Edition. I do what it says in the book but I still get the wrong answers. So that means that I'm doing it wrong.

For example

I have to find the subnet, broadcast address, and valid host range.

192.168.100.25/30

Soo here I go

192.168.100.25
255.255.255.252

11111111.11111111.111111111.11111100

subnets

2^6 = 32

hosts

2^2-2 = 2

Valid subnets

256-32 = 224

broadcast address

0 32 64 96 128 164 192 224

valid host range

2-30 ???


The answer is

valid subnet is
192.168.100.24

broadcast
192.168.100.27

valid hosts
192.168.100.25 and .26



I have no idea how they got the answer. I do the other problems that are in the book
and I still end up with the wrong answer. Anyone willing to help?

[/i]
Booya!!
WIP : | CISSP [2018] | CISA [2018] | CAPM [2018] | eCPPT [2018] | CRISC [2019] | TORFL (TRKI) B1 | Learning: | Russian | Farsi |
*****You can fail a test a bunch of times but what matters is that if you fail to give up or not*****

Comments

  • dynamikdynamik Posts: 12,314Banned ■■■■■■■■□□
    You need do a binary AND with the IP address you and the subnet mask to find what subnet its on.

    192.168.100.25 = 11000000.10101000.1100100.00011001
    /30 = 11111111.11111111.11111111.11111100

    We'll just do the last octect because the others are obviously 192.168.100:
    00011001
    11111100
    ========
    00011000 (.24)

    If you're not familiar with a binary AND, the value is 1 if both bits are 1, and 0 otherwise.

    That's your subnet address. To find the broadcast address, just flip all the host bits of the subnet address (just the last two in this example) to 1.

    00011011 (.27)

    The usable addresses are everything in between, so you have .25 and .26.
  • kalebkspkalebksp Posts: 1,033Member ■■■■■□□□□□
    I have to find the subnet, broadcast address, and valid host range.

    192.168.100.25/30

    Soo here I go

    192.168.100.25
    255.255.255.252

    11111111.11111111.111111111.11111100

    subnets

    2^6 = 32

    hosts

    2^2-2 = 2
    Looks good...

    Valid subnets

    256-32 = 224
    Why are you subtracting the number of subnets from 256? There are many different ways to solve subnetting problems, but the way I learned was to get the increment by looking at the position of last 1 in the subnet mask.

    In this case:

    11111111.11111111.111111111.11111100
    ^4 (2^2)

    So your increment is four...
    0 4 8 12 16 20 24 28

    25 is between 24 and 28, so...

    Network: 192.168.10.24

    Broadcast:192.168.100.27

    Range: 192.168.10.25-26
  • KaminskyKaminsky Posts: 1,235Member
    Try it this way...

    192.168.100.25/30
    Soo here I go
    192.168.100.25
    255.255.255.252

    Look at the subnet boundaries.
    The Ip Address itself is a class C (this is important to keep in mind), so subnet in only last octet... 252.

    Use the 256-subnet rule = 256-252 = 4 = Subnet is 4 wide

    Explanation of this.
    The 255.255.255.252 will split this 192.168.100.(0-255) into chunks of 0.0.0.4 starting at

    1st Subnet
    Subnet Address: 192.168.100.0
    First Valid Host Address: 192.168.100.1
    Last Valid Host Address: 192.168.100.2
    Subnet Broadcast: 192.168.100.3

    2nd Subnet
    Subnet Address: 192.168.100.4
    First Valid Host Address: 192.168.100.5
    Last Valid Host Address: 192.168.100.6
    Subnet Broadcast: 192.168.100.7

    Continue this for subnets .8 .12 .16 .20 .24
    (initially I would recommend you write each of these down whilst learning subnetting. It helps you to visualise it all in your head)

    You could continue to do this for subnets .28 .32 .36 .... etc but, looking at your IP address, it lies within the 7th subnet. [.24 to .27]

    So, for your subnet
    7th Subnet
    Subnet Address: 192.168.100.24
    First Valid Host Address: 192.168.100.25
    Last Valid Host Address: 192.168.100.26
    Subnet Broadcast: 192.168.100.27

    Bingo, you have your answer.


    When you write the subnets down, you can see how it all works so you feel confident you are not just plucking numbers out of thin air.

    When you move on to Class B and Class A, they are no different than that of the above.

    eg 150.168.100.25 /30 (same numbers, same subnet except this is a class B)

    The subnet here will be 0.4 ... not .4 like the class C.
    What this means is that the subnets start at 150.168. and go up in chunks of 0.4
    Once you reach 150.168.0.(252-255), the next subnet becomes 150.168.1.(0-3)

    Practice these back at subnettingquestions.com but write down each of the subnet boundaries and it will all fall into place in your head.
    Kam.
  • cisco_troopercisco_trooper Too many Posts: 1,443Member ■■■■□□□□□□
    Personally I think the way Cisco (and everyone else for that matter) tries to "teach" people how to subnet is retarded. They have you writing down ones and zeroes and then "ANDing" stuff for no apparent reason (not that it doesn't have merit). It is much easier to just think about what you are doing and go from there. Once you understand what is going on you should be able to fly through most 8 bit subnetting questions without even writing anything down. If you are decent with math you'll probably be good for 12 to 16 bits with out too much hassle.

    Kam's suggestions are a good place to start.....
  • skrpuneskrpune Posts: 1,409Member
    I kinda like knowing more than one way to do stuff so I prefer to have the alternate methods to figure out the answer (especially since for exams you never really know what kind of ammo you'll be given to figure otu the problem so it helps to have alternate methods), and I can see how some people prefer the AND'ing method since it's simple math.

    Subnetting isn't rocket science or anything, but it's one of those things that seems really mysterious until you realize that it's just addition & subtraction & multiplication, just from a different angle and with binary tossed in.
    Currently Studying For: Nothing (cert-wise, anyway)
    Next Up: Security+, 291?

    Enrolled in Masters program: CS 2011 expected completion
  • networker050184networker050184 Posts: 11,962Mod Mod
    Personally I think the way Cisco (and everyone else for that matter) tries to "teach" people how to subnet is retarded. They have you writing down ones and zeroes and then "ANDing" stuff for no apparent reason (not that it doesn't have merit). It is much easier to just think about what you are doing and go from there. Once you understand what is going on you should be able to fly through most 8 bit subnetting questions without even writing anything down. If you are decent with math you'll probably be good for 12 to 16 bits with out too much hassle.

    Kam's suggestions are a good place to start.....

    I agree that you should get to the point where it can all be done in your head, but I don't believe it's retarded to tech people the binary math.

    I think it's very important to understand the why and not just the how of everything you do.
    An expert is a man who has made all the mistakes which can be made.
  • phoeneousphoeneous Go ping yourself... Posts: 2,333Member ■■■■■■■□□□
    This is by no means a workaround and I encourage you to learn the theory and math behind subnetting. After you understand the theory do a google search for subnetting secrets. That website has helpded me develop quick subnetting skills that I can master in my head. I can pretty much subnet anything now.
  • dynamikdynamik Posts: 12,314Banned ■■■■■■■■□□
    I agree that you should get to the point where it can all be done in your head, but I don't believe it's retarded to tech people the binary math.

    Absolutely, which is why I went with that explanation. Once you understand how things work behind-the-scenes, it's a breeze to do everything in your head.
  • jamesleecolemanjamesleecoleman Posts: 1,899Member ■■■■■□□□□□
    I can do some of the stuff in my head but honestly....

    I still don't understand this. I've been trying to do this for the past 3 months
    and I still suck at this subject. I would move on but I feel that I'll just understand
    the other stuff easier. I've taken courses through the netacad back in highschool.
    My goal is to have ccent or ccna done by the end of the semester.
    Booya!!
    WIP : | CISSP [2018] | CISA [2018] | CAPM [2018] | eCPPT [2018] | CRISC [2019] | TORFL (TRKI) B1 | Learning: | Russian | Farsi |
    *****You can fail a test a bunch of times but what matters is that if you fail to give up or not*****
  • dynamikdynamik Posts: 12,314Banned ■■■■■■■■□□
    What don't you understand? You've gotten a lot of good explanations.
  • JavonRJavonR Posts: 245Member
    I can do some of the stuff in my head but honestly....

    I still don't understand this. I've been trying to do this for the past 3 months
    and I still suck at this subject. I would move on but I feel that I'll just understand
    the other stuff easier. I've taken courses through the netacad back in highschool.
    My goal is to have ccent or ccna done by the end of the semester.

    You might want to look into purchasing the CBT Nuggets... the instructor (Jeremey Cioara) has a VERY good explanation for subnetting the binary way.
  • miller811miller811 Posts: 897Member
    I can do some of the stuff in my head but honestly....

    I still don't understand this. I've been trying to do this for the past 3 months
    and I still suck at this subject. I would move on but I feel that I'll just understand
    the other stuff easier. I've taken courses through the netacad back in highschool.
    My goal is to have ccent or ccna done by the end of the semester.

    James, I sent you a PM,
    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
  • /usr/usr Posts: 1,768Member
    Like dynamik said, exactly where are you running into trouble or what is it you don't get?

    You have to know this stuff like the back of your hand, even for ICND1, so there's no point in skipping ahead really.
  • drew2000drew2000 Posts: 290Member
    subnets

    2^6 = 32

    I skimmed through the other answers and didn't see this, but 2^6 is not 32 it is 64.

    HTH.
    Drew
  • kevin31kevin31 Posts: 154Member
    Guys Im with jamesleecoleman on this Ive been trying to understand this for months just cant seem to get it there also seems to be so many different methods of doing it to!

    The 2^6 is something that I get stuck on? And the /30

    Anyone no of any courses as such in UK for subnetting alone???

    thanks
    LAB - 4 X 2651XM's 1 X 2620 3 X 2950 1 X 2509 AS 1 X 3550
  • Morty3Morty3 Posts: 139Member
    Do not make subnetting harder then is it. Write the mask down into binary, and then find the last 1. Find out what value that last 1 have, and there's your subnets! So, a /26 mask is

    11111111.11111111.11111111.11000000
    Binary chart: 128 64 32 16 8 4 2 1

    Last 1 falls under the "64", that means the subnets hop by 64. Does not matter which class when finding the hops, just the number of subnets. So:
    The class C address 192.168.0.0/26 got the following subnets:
    192.168.0.0->192.168.0.63
    192.168.0.64->192.168.0.127
    192.168.0.128->192.168.0.191
    182.168.0.192->192.168.0.255

    To find out the number of subnets, see how many bits we have subnetted with (protip, we know the answer is 4, since I've written them down ^_^. This is for a Class C address, ofc)
    Default mask for a C address: 11111111.11111111.11111111.00000000 (24 1:s)
    Our subnetmask 11111111.11111111.11111111.11000000 (26 1:s)
    2 more bits. Then take 2^2, since its all in powers of 2, and get 4. 4 valid subnets. Is it true? Yes, check my valid subnets above. We got 4 valid nets.

    Valid hosts? Check our mask in binary again, but this time count the zeros. 6 zeros.
    6^2 = 64. REMEMBER THOUGH, you don't want to fail at this, one address it for the net and one is broadcast. We then need to subtract 2 from that number. I.e we got 6^2 = 64, then 64-2. 62 valid hosts. Is it true? Once again, check into the subnets I've already calculated.
    192.168.0.0->192.168.0.63. The .0.0 is the net address and the 0.63 the broadcast. That means we got 62 valid hosts.

    It is the same for class A and B network, but the subnetting starts in the second and third octet. More detailed, like this:
    10.0.0.0
    ....^
    Subnets starts in the second octet
    And
    150.0.0.0
    ........^
    Subnets starts in the third octet

    Hope I did not mess it up.
    CCNA, CCNA:Sec, Net+, Sonicwall Admin (fwiw). Constantly getting into new stuff.
  • Morty3Morty3 Posts: 139Member
    kevin31 wrote: »
    The 2^6 is something that I get stuck on? And the /30

    2^6 = 2*2*2*2*2*2

    The /30 means its 30 ones in the subnetmask. A mask is "supposed" to be in binary, but we write it in decimal since we think its a lot easier.
    /30 means 11111111.11111111.11111111.11111100
    The default masks are /8 for A, /16 for B, /24 for C. These /x are how many "1":s in the mask.
    /10 means the mask would be: 11111111.11000000.00000000.00000000


    ONLY way to get this is to do it OVER and OVER and OVER again. Took me ages to get it also, but when I watched Jeremy do it I was like illuminated :D
    CCNA, CCNA:Sec, Net+, Sonicwall Admin (fwiw). Constantly getting into new stuff.
  • KaminskyKaminsky Posts: 1,235Member
    Morty3 wrote: »
    Do not make subnetting harder then is it. Write the mask down into binary, and then find the last 1. Find out what value that last 1 have, and there's your subnets! So, a /26 mask is

    11111111.11111111.11111111.11000000
    Binary chart: 128 64 32 16 8 4 2 1

    Last 1 falls under the "64", that means the subnets hop by 64. Does not matter which class when finding the hops, just the number of subnets. So:
    The class C address 192.168.0.0/26 got the following subnets:
    192.168.0.0->192.168.0.63
    192.168.0.64->192.168.0.127
    192.168.0.128->192.168.0.191
    182.168.0.192->192.168.0.255

    To find out the number of subnets, see how many bits we have subnetted with (protip, we know the answer is 4, since I've written them down ^_^. This is for a Class C address, ofc)
    Default mask for a C address: 11111111.11111111.11111111.00000000 (24 1:s)
    Our subnetmask 11111111.11111111.11111111.11000000 (26 1:s)
    2 more bits. Then take 2^2, since its all in powers of 2, and get 4. 4 valid subnets. Is it true? Yes, check my valid subnets above. We got 4 valid nets.

    Valid hosts? Check our mask in binary again, but this time count the zeros. 6 zeros.
    6^2 = 64. REMEMBER THOUGH, you don't want to fail at this, one address it for the net and one is broadcast. We then need to subtract 2 from that number. I.e we got 6^2 = 64, then 64-2. 62 valid hosts. Is it true? Once again, check into the subnets I've already calculated.
    192.168.0.0->192.168.0.63. The .0.0 is the net address and the 0.63 the broadcast. That means we got 62 valid hosts.

    It is the same for class A and B network, but the subnetting starts in the second and third octet. More detailed, like this:
    10.0.0.0
    ....^
    Subnets starts in the second octet
    And
    150.0.0.0
    ........^
    Subnets starts in the third octet

    Hope I did not mess it up.


    I wouldn't suggest it that way in the exam where time is very precious. For learning and speeding up your mental arithmetic, sure.

    When given a "/X" type subnet just mentally work out where it is in relation to the class of ip address you are working with. /26 for a class C address is completely different to /26 for a class B or A.

    A) 08 + 18 bits ... 255.255.192 .. (256-192 = 64) => subnet = 0.0.64 wide
    B) 16 + 10 bits ... 255.192 ........ (256-192 = 64) => subnet = 0.64 wide
    C) 24 + 02 bits ... 192 .............. (256-192 = 64) => subnet = 64 wide

    You are still doing the same math of the subnet bits (256-192 = 64)

    You will need to do that in your head in a matter of seconds. Surprisingly, it isn't that hard once you get used to it.
    Kam.
  • Morty3Morty3 Posts: 139Member
    This way just takes a few seconds as well. I just tried to analyze the way I do subnetting, which I find easy. Find the last 1 (in C-addresses you know them in your head already :P)
    CCNA, CCNA:Sec, Net+, Sonicwall Admin (fwiw). Constantly getting into new stuff.
Sign In or Register to comment.