Subnetting problems, please assist...

Discussion in 'General Cisco Certifications' started by ssample, Nov 9, 2012.

  1. ssample

    ssample New Member

    2
    0
    1
    First let me start by saying that I have read I don't know how many online tutorials on subnetting, asked for extra help in class and watched at least a dozen subnetting videos, so please don't flame me. I've got some kind of mental block to subnetting and I'm just not getting it. The main issue I think is the Binary representation...I don't get it...AT ALL. I don't understand why it's necessary, don't understand what it's supposed to do for me, I have no idea how to figure how many bits need to be borrowed or why. I'm completely lost on subnetting a subnet and supernetting. That REALLY makes no sense to me.

    I have no idea how to tell if 172.15.16.33/29 is part of what range. I can't change a /29 to it's octet equivalent. I don't know how I figured it out enough to do it for my second semester of Cisco routing, but now, I'm in my third and am really falling behind because I can't do this. Does someone have an easier method of teaching this? The cisco resources, for me, are among the worst teaching tools for me.

    Thanks in advance for your constructive assistance.
     
  2. Nyx

    Nyx Byte Poster

    190
    25
    25
    As they say there are 10 types of people - those who can understand binary and those who don't;)

    I think that's where you go wrong. Might be worth having a look on hex system as well, nothing to do networks but might help with getting your head round anything else than decimal.
     
  3. Coupe2T

    Coupe2T Megabyte Poster

    590
    43
    67
    It should be fairly simple to get your head round if you keep on practising. Computers communicate in Binary, which is why it is needed, but IP addresses are used to be more human reader friendly etc. In an IP address, you have 4 Octets, An Octet, as you might imagine is 8 binary bits (Think Octogan, Octopus etc). Binary is only ever 1 or 0, on, or off. So from a decimal to binary conversion point of view, this is how it works:

    Decimal numbers are used, against each binary bit, any of thos binary bits that are 'On' need to be added together. ie

    128 64 32 16 8 4 2 1 so if we write bits below, in any order, then add together the on bits, then that gives us the value of that octet (each 8 bits si only one octet remember, so an IP address is 32 bits in length all together.)

    so if we had Binary of say 1 0 1 1 0 0 1 0, underneath our decimal, we would have 178, as the value of the first octet. then you can repeat the process for each octet to work out what the decimal or binary number is. If ALL binary bits are on, then you add the whole lot together to give you 255 (which you will no doubt have a LOT in network masks)

    So now when it comes to subnetting, you will be given a subnet mask, or the decimal notation of /29 for example. The /29 or the subnet mask simply tell you what part of the address is for the network. So if it is a /29 notation, then the first 29 binary bits of the IP address refer to the network, so the network mask would be equal to 255.255.255.248. You can also use the decimal part of the notation to work out what network your network is a part of. we know an IP address is 4 octets, each being 8 binary bits, so anything over a /8 means the first octet of the subnet mask will always be 255, anything over /16, first two octets of the mask will be 255.255, anything over /24 means first three octets of subnet mask will be 255.255.255

    So we only ever need to really concern ourself with the last octet of the subnet mask to find the network portion against the host portion In the /29 mask used above, we are over /24, so we know it's 255.255.255 and then we just need to work out the last octet. 29 - 24 is 5, so the first 5 bits are on. Put this against our decimal and you have:

    128 64 32 16 8 4 2 1
    1 1 1 1 1 0 0 0

    So as previously said, added together that gives you the .248 for the last octet of the mask, but also, you can see the last 'On' bit is for the 8 in the decimal numbers. This tells you that the networks are subnetted into chunks of 8. so if I had an example Class C address of 192.168.0.0 and I was subnetting it with the /29 mask, then I am borrowing bits from the last octet to make up the networks. As shown above the last on bit is under the 8, so that means my network addresses will increment by 8. So for network addresses I would have the following:

    192.168.0.0
    192.168.0.8
    192.168.0.16
    192.168.0.24
    192.168.0.32

    and so on, with the last octet incrementing by eight for each subnet. As we are using some parts of the last octet for the network address, it means we will have a very small number of hosts on each subnet. The first network number is generally considered just the network ID and is not used for a host. and the last number is always the broadcast address. So we always lose 2 of the host numbers for this reason (Although technically you can use the network ID as a host nuber I believe). So in our cases above we have the following:

    Network ID - 192.168.0.0
    Hosts - 192.168.0.1 - 192.168.0.6
    Broadcast address - 192.168.0.7

    Network ID - 192.168.0.8
    Hosts - 192.168.0.9 - 192.168.0.14
    Broadcast address - 192.168.0.15

    And so on.

    Hopefully that makes sense, but the best way to understand is to do. In the above example I have used some of the last octet as the network address, so made very small hosts portions, but if you use a lot less of an IP address for the network, then you leave a lot more host portions. To give a quick example of that, let's use a class B address of 172.16.0.1. Now if we wanted to subnet this with say a /18, then same process applies as before. We are over /16, so we know the first parts of the mask will be 255.255. and we need to work in the 3rd octet to find that last number. 18 - 16 is 2, so we are using the first 2 bits of the third octet as on. So putting that against our decimal values we have:

    128 64 32 16 8 4 2 1
    1 1 0 0 0 0 0 0

    So we just need to add the first 2 numbers together. which gives us 192. so the mask is 255.255.192.0 and out networks are jumping in 64's.

    So for our networks we have:

    172.16.0.0
    172.16.64.0
    172.16.128.0
    172.16.192.0

    and so on, now obviously it's the 3rd octet that is going up in 64's, as that is the octet we borrowed from for our network addresses. This means that you have the entire of the last octet aswell as the last 6 bits of the third octet for host id's, so we can have a lot of hosts here. As shown below:

    Network ID - 172.16.0.0
    Hosts - 172.16.0.1 - 172.16.63.254
    Broadcast address - 172.16.63.255

    Network ID - 172.16.64.0
    Hosts - 172.16.64.1 - 172.16.127.254
    Broadcast address - 172.16.127.255

    Network ID - 172.16.128.0
    Hosts - 172.16.128.1 - 172.16.191.254
    Broadcast address - 172.16.191.255

    And so on. Hopefully I haven't made any errors myself there writing this as I keep getting interrupted by work whilst trying to type this post, but generally this should cover it all I think. If you need any more help though then just ask.

    Maybe a little fun to try and do some yourself.

    So if I give you these IP addresses then can you tell us what the network addresses will be and what hosts and broadcast, as I have done above?

    I will keep them fairly similar to my above examples to try and make it a bit easier to bed in.

    192.168.0.0 / 30
    172.16.0.0 / 17

    Also, anoyone else reading this then check my work and if I have made errors where I am coming to and from then please highlight, so I don't cause more confusion. :)
     
    Certifications: ECDL, Does that Count!?!
    nXPLOSi likes this.
  4. ssample

    ssample New Member

    2
    0
    1
    OMG! Someone made sense!!!

    192.168.0.0/30

    Okay, so 30-24=6, so the first 6 bits in the third octet are on

    128 64 32 16 8 4 2 1
    1 1 1 1 1 1 0 0

    255-3=252 (the check is 128+64+32+16+8+4=252)

    So I now know that the IP Address is going to be 192.168.0.0 255.255.252.0 or a /30 address. Since the last on bit is in the "4" column then the addresses will increment by 4.

    192.168.0.0
    192.168.1.0-192.168.2.0
    Broadcast 192.168.3.0

    192.168.4.0
    192.168.5.0-192.168.6.0
    Bcast 192.168.7.0

    172.16.0.0/17

    So, since this is higher than 16, we know we are still working in the third octet. So 17-16=1, so we know that the first bit is on.

    128 64 32 16 8 4 2 1
    1 0 0 0 0 0 0 0

    So, this would be:
    172.16.0.0 255.255.128.0 or /17

    This would make the increment for the networks 128:
    172.16.0.0
    172.16.1.0-172.16.126.0
    Bcast 172.16.127.0
    172.16.128.0
    172.16.129.0-172.16.254
    Bcast 172.16.255.0

    Okay! Great!!! Thank you very much, this is the first explanation that makes any sense!

    1. Now, how do I identify how many hosts are betwen 2 network addresses?

    2. Given a problem of: with a network of 172.16.0.0/16, Define a network address scheme that will accomodate 2000 computers on one subnet and 3 others of 100.

    3. How do I understand supernetting for routing protocols?

    Again, thank you SO VERY MUCH! This was the best tutorial!!!
     
  5. Coupe2T

    Coupe2T Megabyte Poster

    590
    43
    67
    You have almost got it, although you have made a couple of small mistakes. In the first example, you are increasing the network increment in the 3rd octet, and you shoudl be in the 4th. /30 means you are working in the last octet, as it is more than 24. But otherwise you have the right principle.

    In the second example you also made a slight error as you are not using the last octet for hosts.

    You have said:

    This would make the increment for the networks 128:
    172.16.0.0
    172.16.1.0-172.16.126.0
    Bcast 172.16.127.0
    172.16.128.0
    172.16.129.0-172.16.254
    Bcast 172.16.255.0

    Which is close, but you go to the end of the 4th octet. So the hosts on the first network would be 172.16.0.1, not 172.16.1.0. The network starts at 172.16.0.0, so the first host would be as above, .0.1, then .0.2 all the way up to 255, then once the last octet is 255 it will drop again to 0 and the 3rd octet then increases to 1, if that makes sense. It's kind of like minutes and seconds. you just counting in minutes. so you are ignoring the last octet. Whatever isn't used for the network, is ALL hosts.

    So when the network portion ends in the third octet, then you work out your network and then to get the hosts you work out the 2 network addresses, in the case above you have it right, 172.16.0.0 and 172.16.128.0, and then count all in between. so one less than 172.16.128.0 shoudl in fact be 172.16.127.255, which is what would be your broadcast address. and that makes your range of hosts 172.16.0.1 - 172.16.127.254

    Does that make sense? It's important you understand these parts first before tackling the problem you have mentioned above.

    Try again with 172.16.0.0 / 20
     
    Certifications: ECDL, Does that Count!?!

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.