Need help with CIDR

dan87951dan87951 Member Posts: 107
Its been a while since I have done CIDR and completely forgot when I was going over review questions. How do you CIDR an address without the subnet mask? For example if the problem was CIDR 41.220.236.8-41.220.239.11 how would you go about doing this? Another example would be CIDR 59.88.0.0-59.99.255.255. I'm completely loss and all the youtube videos I find are using the subnet mask to subnet. Any help would be appreciated. thanks

Comments

  • tex3030tex3030 Member Posts: 19 ■□□□□□□□□□
    Assuming that the range is within the same subnet, with the 41.220.236.8 - 41.220.239.11 the range you are looking for is from 41.220.236.0 to 41.220.239.255. That means that you need to a subnet mask of 255.255.252.0. When thinking about CIDR numbers I think of it from /8, /16, /24, & /32, and then just count from there. I would do 24-2=22 for the CIDR. If it is easier to count up for you then it would be 16+6=22.
  • luisYmeluisYme Member Posts: 23 ■□□□□□□□□□
    if anyone needs a good refresher on the basics, there's a free ip addressing video tutorial i like a lot: Intro to IP Addressing (Part I) | Boss CBT | Video Tutorials for Network Professionals - CCNA CCENT

    if you search long enough on youtube you'll probably find something, too.

    good luck!
  • dan87951dan87951 Member Posts: 107
    Explain more how you are getting the subnet mask? I don't understand how you are figuring out the bits by getting just the IP range.

    THanks
  • networker050184networker050184 Mod Posts: 11,962 Mod
    dan87951 wrote: »
    Explain more how you are getting the subnet mask? I don't understand how you are figuring out the bits by getting just the IP range.

    THanks

    Just look at the range of IP addresses. The part that changes is the "host" portion and the static set is the "network" portion. Don't worry about classes as the "C" in CIDR is classles.
    An expert is a man who has made all the mistakes which can be made.
  • MonkerzMonkerz Member Posts: 842
    dan87951 wrote: »
    For example if the problem was CIDR 41.220.236.8-41.220.239.11 how would you go about doing this?

    IP range is 41.220.236.8 thru 41.220.239.11

    From this range you can see that the third octet is changing so that is the octet when need to drill down on.

    When dealing with subnetting a lot, you kind of always think in exponential increments of 2. Just looking at this range I would see that the range of IPs would be encompassed entirely using 4 as an increment, 41.220.236.0 - 41.220.239.255.

    So now we know we are using an increment of 4, we can go to my spiffy mental chart to match the increment with the third octet's mask value.
    128 |  64  |  32   |   16  |   8   |   [B]4[/B]   |   2   |   1  -- increment
    
    128 | 192  |  224  |  240  |  248  |  [B]252[/B]  |  254  |  255  -- octet value
    
    /1  |  /2  |  /3   |  /4   |  /5   |  /6   |  /7   |  /8  -- CIDR notation used for 1st Octet
    /9  |  /10 | /11   |  /12  |  /13  |  /14  |  /15  |  /16  -- CIDR notation used for 2nd Octet
    /17 |  /18 | /19   |  /20  |  /21  |  /22  |  /23  |  /24  -- CIDR notation used for 3rd Octet
    /15 |  /26 | /27   |  /28  |  /29  |  /30  |  /31  |  /32  -- CIDR notation used for 4th Octet
    

    The increment matches to a value of 252 so your mask would be 255.255.252.0
    By looking at the line CIDR for 3rd octet, the increment of 4 matches /22 so your CIDR notation would be 41.220.236.0/22

    dan87951 wrote: »
    Another example would be CIDR 59.88.0.0-59.99.255.255.

    IP range is 59.88.0.0 - 59.99.255.255

    Looking at this I would see the second octet changing so this is the octet I will drill down within.

    At the speed of molasses dripping from an ice cold mug I would begin ruling out increments to encompass this range...

    Increment of 1: 0...1...2...3...~...87...88...89 <-This increment is not large enough
    Increment of 2: 0...2...4...6...~...86...88...90 <-This increment is not large enough
    Increment of 4: 0...4...8...16...~...84...88...92 <- Getting closer, but still not there
    Increment of 8: 0...8...16...24...~...80...88...96 <- Oh, we're almost there, we can almost encompass the range
    Increment of 16: 0...16...32...48...~...80...96...112 <- Well, this one won't work, it splits up the range
    Increment of 32: 0...32...64...96...128 <- This one is still splitting up the range
    Increment of 64: 0...64...128 <- WINNING!, found one to encompass the range

    Now that we know our increment (i=64 -- 59.64.0.0 -59.127.255.255), we can refer back to my mental chart and match up the increment with mask value.

    An increment of 64 matches to 192 so our mask would be 255.192.0.0
    By looking at the line CIDR for 2nd octet, the increment of 64 matches /10 so your CIDR notation would be 59.64.0.0/10

    Pleas keep in mind that this is how my brain works, and it may be very different from others. Once you subnet for a while, you "just know" what mask to use and what will encompass what.
Sign In or Register to comment.