1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Subnetting Q, im going braindead, help?

Discussion in 'Routing & Switching' started by Beany, Oct 17, 2012.

  1. Beany

    Beany Bit Poster

    39
    0
    2
    Afternoon,

    i can subnet ip addresses with any masks apart from /8 /16 /24.

    can some please explain to me in detail how to subnet the following two examples:

    1) 172.16.0.0/16
    2) 172.16.0.0/24

    this will be help me greatly.

    many thanks
     
  2. parman05

    parman05 Byte Poster

    126
    0
    21
    Those are defaut classfull b and c networks.
     
    Certifications: A+, Network +, MCTS WIN7 (70-680), MCITP WIN7 (70-685), MCSA WIN7, Linux +,LPIC-1, Novell CLA 11, SUSE 11 Tech Spec, DC Tech Spec
    WIP: 70-640, 70-642, security +, CCNA
  3. jvanassen

    jvanassen Kilobyte Poster

    322
    2
    47
    Go to Professor Messers website and watch his videos from the A+ on subnetting. I remember these being really good when i studied it and he explained it very well.
     
    Certifications: CompTIA A+, Network+, CCENT
    WIP: ICND2 200-101
  4. The_Omj

    The_Omj New Member

    7
    1
    11
    Hi Beany,

    I use Jeremy Ciaora's method from his CBTnuggets vids, a lot easier than some other methods I've seen. Anyway, for your 2 IPs we need to turn those masks into binary.


    172.16.0.0/16

    a. I need to take the subnet mask and turn it into binary. /16 basically means 16 bits out of the possible 32 are used in the mask,

    so:

    11111111.11111111.00000000.00000000 = 255.255.0.0

    Now I have the mask in binary as well finding its decimal value, I can find out what the subnets will be.

    b. To find out what the increments/ranges are we look for our last bit in the mask (the number 1 which is furthest to the right in the mask), which in this case happens to be the last bit in the 2nd octet. At this point we are only interested in the octet with the last bit, so we don't count any bits or zeroes from the other octets.

    11111111.11111111.00000000.00000000
    The last bit we need is highlighted, what is its value in binary if we ignore all the other octets? The last bit on the right in this octet, remember binary is right to left, has a value of 1. This means an address increment/range of 1 is being utilised. So for the first example we have the following:

    c. 1 subnet, range 172.16.0.0 - 172.16.255.255. Useable hosts will be 172.16.0.1 to 172.16.255.254.

    Another trick I learned is how to find out how many useable hosts the subnet/s will contain. The formula is

    (2 to the power of n) -2
    where n the number of zeros in the last 2 octets present in the subnet mask. In this case we have 16 zeros, so 2 to the power of 16 is 65536, minus 2 gives us 65534 useable hosts.



    Now onto the second ip,
    172.16.0.0/24

    a. Let's find out the mask's binary and decimal value.

    11111111.11111111.11111111.00000000 = 255.255.255.0

    b. The third octet contains the bit furthest to the right in the mask, what is its value?

    11111111.11111111.11111111.00000000
    The last bit we need is highlighted. Again we need its value in binary, so starting from the right, ignoring all the other octets, its binary value
    will be 1. Like the previous example an address increment/range of 1 is being utilised, but because this is a class C network, we have considerably less addresses to work with.

    c. So we have 1 subnet, range 172.16.0.0 - 172.16.0.255. And just to make sure my host counting formula works, let's try it again.

    So 2 to the power of n, where n = number of zeroes in mask (in this case 8 zeroes from the last octet) will give us 256. Take away 2 and we have 254 usable hosts.



    Let's try another example, here's one with a /8 mask.


    172.16.0.0/8

    a. subnet mask in binary/decimal: 11111111.00000000.00000000.00000000
    b. value of bit furthest into the right of mask:
    11111111
    like the other examples, the binary value is 1, so we have only an address increment/range of 1 being utilised.

    c. 1 subnet, range 172.0.0.0 - 172.255.255.255

    Useable hosts (2 to the power of n) - 2 = 16777214.



    And here's a random question I grabbed off subnettingquestions:


    "How many subnets and hosts per subnet can you get from the network 172.21.0.0 255.255.254.0?"

    a. Let's turn the mask into binary,

    255.255.254.0 = 11111111.11111111.11111110.00000000

    b. value of the 1 bit furthest into the right of mask, which happens to be in the third octet:
    11111110
    in binary this bit value will be 2, so an address increment/range of 2 is being used.

    c. Subnet ranges for 172.21.0.0/23,

    172.21.0.0 - 172.21.1.255
    172.21.2.0 - 172.21.3.255
    172.21.4.0 - 172.21.5.255
    172.21.6.0 - and so on.

    But how many subnets are there all together? Here's another formula to find out how many subnets are being used in this mask:

    2 to the power of n, where n is the number of bits in the last mask which isn't all zeroes, in this case 11111110 (.254) The answer is 128 subnets are being used.

    Number of hosts is 2 to the power of n, where n is the number of zeroes at the end of the mask, 0.00000000, that's 9. So 2 to the power of 9 is 512 -2 = 510 useable hosts.

    Hope this is clear. I only learned subnetting 4 days ago and with this method I can answer most subnet questions fairly easily. However the real challenge is doing it in 30-60 seconds a time, and that only comes with practise. If you want me to work out any more examples feel free, I'm happy to practise my new found skills :)
     
    WIP: CCENT
    Jon Christie likes this.
  5. p1xels

    p1xels Bit Poster

    23
    0
    2
    Hi all,
    What The_Omj explained above do you all agree with? I think he is wrong!
    How can range 172.16.0.0 - 172.16.0.255 be the only subnet of 172.16.0.0/24?
    The subnets are -
    Subnet , Valid Hosts , Broadcast
    172.16.0.0 , 172.16.0.1 to 172.16.0.254 , 172.16.0.255
    172.16.1.0 , 172.16.1.1 to 172.16.1.254 , 172.16.1.255
    172.16.2.0 , 172.16.2.1 to 172.16.2.254 , 172.16.2.255
    172.16.3.0 , 172.16.3.1 to 172.16.3.254 , 172.16.3.255
    172.16.4.0 , 172.16.4.1 to 172.16.4.254 , 172.16.4.255
    172.16.5.0 , 172.16.5.1 to 172.16.5.254 , 172.16.5.255
    172.16.6.0 , 172.16.6.1 to 172.16.6.254 , 172.16.6.255
    172.16.7.0 , 172.16.7.1 to 172.16.7.254 , 172.16.7.255
    172.16.8.0 , 172.16.8.1 to 172.16.8.254 , 172.16.8.255
    172.16.9.0 , 172.16.9.1 to 172.16.9.254 , 172.16.9.255
    172.16.10.0 , 172.16.10.1 to 172.16.10.254 , 172.16.10.255
    172.16.11.0 , 172.16.11.1 to 172.16.11.254 , 172.16.11.255
    172.16.12.0 , 172.16.12.1 to 172.16.12.254 , 172.16.12.255
    172.16.13.0 , 172.16.13.1 to 172.16.13.254 , 172.16.13.255
    172.16.14.0 , 172.16.14.1 to 172.16.14.254 , 172.16.14.255
    172.16.15.0 , 172.16.15.1 to 172.16.15.254 , 172.16.15.255
    172.16.16.0 , 172.16.16.1 to 172.16.16.254 , 172.16.16.255
    172.16.17.0 , 172.16.17.1 to 172.16.17.254 , 172.16.17.255
    172.16.18.0 , 172.16.18.1 to 172.16.18.254 , 172.16.18.255
    172.16.19.0 , 172.16.19.1 to 172.16.19.254 , 172.16.19.255
    Also you need to find the magic number.What he explained (Cioras method) I cudn't understand anything.
    Anyways,everyone has their own ways!
    :)
     
    Last edited: Jul 24, 2013
  6. danielno8

    danielno8 Gigabyte Poster

    1,305
    48
    92
    sorry you are mistaken. He is correct the address 172.16.0.0/24 is 1 subnet with a possible 254 hosts.

    I have highlighted the mask which is where your mistake is. Had the mask been /16 for instance, then you could subnet down to the ranges you have suggested (and more). If you are only assigned 172.16.0.0/24 in the first instance, you cannot subnet down to those ranges.
     
    Last edited: Jul 24, 2013
    Certifications: CCENT, CCNA
    WIP: CCNP
  7. RichyV

    RichyV Megabyte Poster Forum Leader

    536
    17
    79
    Yes! I do agree...

    It's a /24 address or Class B with 254 hosts.

    Subnet mask will be 255.255.255.0 so with the address being 172.16.0.0

    The first IP will be 172.16.0.1 and the last will be 172.16.0.254

    Pretty straight-forward really....
     
    Last edited: Jul 24, 2013
    Certifications: B.Sc.(Hons), MBCS. MCP (271,272), MCDST, MCTS (680), MCITP:EDST7, MCSA:WIN7, MCPS, MCNPS
    WIP: 70-686, then onto MCSE: Desktop Infrastructure via MCSA: Server 2012...
  8. The_Omj

    The_Omj New Member

    7
    1
    11
    Hi P1xels,

    Sorry for the confusion. At the time I posted this I had just learnt this method, however I realise now that there are some issues with what I was doing, even though I was managing to get most subnetting questions right. I also realise that I made Ciora's method more complicated than it really was, so sorry again.

    In any case, later on I had gone through subnetting in greater detail using the official Cisco guide and would recommend doing this also as it provides greater detail and help in understanding the different aspects of subnetting.

    With regards to 172.16.0.0/24, you are absolutely right, there can't be just one subnet.

    This is how I break networks/subnets down now:

    172.16.0.0/24

    The mask is a total of 24 bits which is comprised of
    172.16 = 16 Network Bits (which must remain untouched)
    and 8 Subnet Bits = 256 networks or 2 to the power of 8.

    This also leaves us with 8 host bits (all zeroes)giving us 256 hosts - 2, for 254 hosts per subnet.
     
    Last edited: Jul 24, 2013
    WIP: CCENT
  9. ade1982

    ade1982 Megabyte Poster Forum Leader

    566
    12
    52
    I think he is right

    if the /24 is there, that means you have 8 bits for hosts. It's the /24 that's crucial.

    Been a long time since I did it though!
     
    danielno8 likes this.
  10. The_Omj

    The_Omj New Member

    7
    1
    11
    Hi Danielno8,
    Funny thing is I think I was wrong on this one. If the address was a genuine class C address (which it isn't), then you're right, there would only be 1 subnet. However, when looking at this address/mask again I have to assume it's a class B, with 16 network bits and 8 subnet bits.
     
    WIP: CCENT
  11. p1xels

    p1xels Bit Poster

    23
    0
    2
    Hi Daniel,
    I think you are wrong.There will be 256 subnets not 1 subnet!
    Plz check your subnetting again :)
    Hello Daniel correct me if I am wrong.
    BTW,how to subnet 172.16.0.0/16?

    - - - Updated - - -

    Hi ade,who is right ?Please mention the persons id to make it clear to others too!! :-p
     
    Last edited: Jul 24, 2013
  12. RichyV

    RichyV Megabyte Poster Forum Leader

    536
    17
    79
    256 subnets?

    Do you mean there will be 254 HOSTS?

    /16 will give:

    First IP: 172.16.0.1

    Last IP: 172.16.255.254

    Total Hosts will be 65534...
     
    Certifications: B.Sc.(Hons), MBCS. MCP (271,272), MCDST, MCTS (680), MCITP:EDST7, MCSA:WIN7, MCPS, MCNPS
    WIP: 70-686, then onto MCSE: Desktop Infrastructure via MCSA: Server 2012...
  13. The_Omj

    The_Omj New Member

    7
    1
    11
     
    WIP: CCENT
  14. danielno8

    danielno8 Gigabyte Poster

    1,305
    48
    92
    Ok let me try and explain this another way. You are building a new branch office. You go to th person in your company who manages all the companies IP addresses. You are assigned 172.16.0.0/24 to use to build your network.

    From here, do you still think you can use 172.16.1.0/24 or 172.16.2.0/24 or 172.16.3.0/24 etc ? The answer is you cannot, because you were only assigned 172.16.0.0/24 , which only gives you control of that specific range. Your IP address guy quite possibly issued 172.16.1.0/24 for use at a different site.

    Now, if you were assigned 172.16.0.0/16, then you are free to do use the addresses in the range which was originally quoted. So you could then start assigning 172.16.0.0/24, 172.16.1.0/24, 172.16.2.0/24, 172.16.3.0/24, 172.16.4.0/24 etc.

    I hope that explains it a bit better. The key is in the address you were given to start with (it had already been subnetted to make it a /24 rather than a /16).

    - - - Updated - - -

    There are 256 subnets possible if you subnet 172.16.0.0/16 using a /24 mask. NOT if you "subnet" 172.16.0.0/24 with a /24 mask (which was the original mask in the example you quoted). This is the difference.
     
    Certifications: CCENT, CCNA
    WIP: CCNP
  15. The_Omj

    The_Omj New Member

    7
    1
    11
    Thanks Daniel, I understand what you're saying. But for the purposes of the exam, if we're given 172.16.0.0 address with NO mask, then we have to assume that it's a Class B address, unless they state otherwise, no?. And that's how I viewed this particular problem. They might say here's 172.16.0.0 and you've been given a mask of /24, how many subnets and hosts per sub will you get?

    The example you gave of 172.16.0.0/24 with a /24 mask, basically you're saying this is a 'Classless' IP and the class has been defined by the mask of /24 making it a Class C address before subnetting has even began, and that's how I approached the problem earlier in the year. So I was right in a way, but it all depends on how you view the address (classful or classless).

    I haven't been to subnettingquestions for a while, I might go and give a go and see if I come across any problems.

    Thanks again.
     
    WIP: CCENT
  16. danielno8

    danielno8 Gigabyte Poster

    1,305
    48
    92


    Yes , you should assume its classful mask if not given one. The example under discussion was:

    And the answer you originally gave was correct, i was trying to clear it up for P1xels., who didn't seem to see the difference the in available subnets depended on whether you started with the /16 or /24.
     
    Certifications: CCENT, CCNA
    WIP: CCNP

Share This Page

Loading...