How to summarize and how to get the network given a host address.

Discussion in 'Cisco' started by ws00sw, Mar 2, 2005.

  1. ws00sw

    ws00sw Guest

    Hello People, very sorry for this kind of question,
    I was browsing at google for this question (you know cheats on how to
    summarize or to get the network of a given host address) with no luck.

    Is there any way of doing this with out the rule 128 64 32 16 8 4 2 1

    Many Thanks in advance for any information
    Regards.
    ..
     
    ws00sw, Mar 2, 2005
    #1
    1. Advertising

  2. In article <>,
    ws00sw <> wrote:
    :I was browsing at google for this question (you know cheats on how to
    :summarize or to get the network of a given host address) with no luck.

    :Is there any way of doing this with out the rule 128 64 32 16 8 4 2 1

    In the case where you are given an IP address which is known to
    be a host address, and you need to know what the smallest enclosing
    subnet is, then there is a simple formula. See
    http://groups.google.ca/groups?selm=bvgul4$okj$
    --
    Would you buy a used bit from this man??
     
    Walter Roberson, Mar 2, 2005
    #2
    1. Advertising

  3. (ws00sw) writes:
    >Hello People, very sorry for this kind of question,
    >I was browsing at google for this question (you know cheats on how to
    >summarize or to get the network of a given host address) with no luck.


    >Is there any way of doing this with out the rule 128 64 32 16 8 4 2 1



    What specificly are you trying to get?

    With CIDR (valid on the Internet for at least the last dozen years),
    you have to know the IP address and mask (ie. you could split a /24
    into one /25, one /26, three /28's & two /29's).

    To get the "network" of the block, the easiest way would be to treat
    the IP address and mask as 32-bit numbers, and logically AND the IP
    and mask together, and the result is your IP network value.

    After a while, you get to learn to just see the natural boundries, or
    have a cheat chart around showing you the different breaks.

    There's plenty of IP address calculators around on the net too.
     
    Doug McIntyre, Mar 2, 2005
    #3
  4. ws00sw

    Brad Guest

    That doesn't really answer the original question since the mask is
    never sent with the IP address (excluding classless routing updates).
     
    Brad, Mar 2, 2005
    #4
  5. ws00sw

    Guest

    Thanks to all, but I cannot use any IP Subnet Calculators...
    For example: I need to summarize these CIDR Blocks 216.0.0.0/16,
    216.2.0.0/16, 216.3.0.0/16, 216.5.0.0/16, 216.6.0.0/16,216.7.0.0/16...
    See that there are no continuos addresses in the CIDRs Blocks, how can
    you do that???
     
    , Mar 2, 2005
    #5
  6. On 02.03.2005 22:03 wrote

    > Thanks to all, but I cannot use any IP Subnet Calculators...
    > For example: I need to summarize these CIDR Blocks 216.0.0.0/16,
    > 216.2.0.0/16, 216.3.0.0/16, 216.5.0.0/16, 216.6.0.0/16,216.7.0.0/16...
    > See that there are no continuos addresses in the CIDRs Blocks, how can
    > you do that???
    >


    Have a look at aggregate (http://osx.freshmeat.net/projects/aggregate/)
    For a given set of prefixes it gives you the smallest set of prefixes
    aggergating as much as possible.



    Arnold
    --
    Arnold Nipper, AN45
     
    Arnold Nipper, Mar 2, 2005
    #6
  7. ws00sw

    Guest

    Also for example.....

    I have this host address 116.15.63.0 that is a valid host address of
    the network 116.15.62.0/23
    But I had to do the
    128 64 32 16 8 4 2 .. 1
    62 0 0 0 1 1 1 1 .. 0 (this is the network ..)
    63 0 0 0 1 1 1 1 .. 1 (This is a Host Address for
    that Network)

    But i'm looking to do it in a faster way, and not to do the Bit
    conversion....
     
    , Mar 2, 2005
    #7
  8. ws00sw

    Guest

    Sorry Arnold I wish to know how to do it with out any application..

    BTW Thanks, I will use it as a comprobation tool...
     
    , Mar 2, 2005
    #8
  9. In article <>,
    <> wrote:
    :For example: I need to summarize these CIDR Blocks 216.0.0.0/16,
    :216.2.0.0/16, 216.3.0.0/16, 216.5.0.0/16, 216.6.0.0/16,216.7.0.0/16...
    :See that there are no continuos addresses in the CIDRs Blocks, how can
    :you do that???

    Start with the lowest address, and mentally propose a mask, and
    mentally find the last IP implied by the low IP and the mask. If the
    high IP would include a block that is not on the list, then your mask
    is too big, so take the next smallest and try again. If the low to high
    range includes only IPs listed in the CIDR list, look to see if the
    next IP is in the list as well: if it is, mentally try the next larger
    mask. Repeat and eventually you would have a mask which includes as
    many elements of the CIDR as possible without including anything not in
    the list ; write that IP and mask down and remove those elements from
    the list and repeat for the new smallest IP.

    In the above, example, one would start with 216.0.0.0/16 and mentally
    propose (say) /15. The high IP implied by that would be 216.1.255.255
    so the low to high range includes IPs (216.1.*.*) that are not in the
    CIDR list, so leave the mask at /16, write that and 216.0.0.0/16
    down, and remove 216.0.0.0/16 from list. The new low element would be
    216.2.0.0/16. Try /15 again. The high IP for it would be 216.3.255.255
    and everything from 216.2.0.0 to 216.3.255.255 is covered by one of
    the CIDR. So try the next bigger mask, /14. The high IP implied
    by that would be 216.5.255.255, but the range 216.2.0.0 to 216.5.255.255
    include some IPs, 216.4.*.* that are not on the CIDR list. So go
    back to /15, mark down 216.2.0.0/15 and remove 216.2.0.0/16 and
    216.3.0.0/16 from the CIDR list. Now, 216.5.0.0/16 is the first on
    the list. If you were to try 216.5.0.0/15 then the base IP would be
    216.4.0.0 which is not on the list, so you know you have to keep /16.
    Then 216.6/16 and 216.7/16 merge to 216.6/15 . Final list:
    216.0/16, 216.2/15, 216.5/16, 216.6/15
    --
    Warhol's Second Law of Usenet: "In the future, everyone will troll
    for 15 minutes."
     
    Walter Roberson, Mar 2, 2005
    #9
  10. In article <>,
    <> wrote:
    :I have this host address 116.15.63.0 that is a valid host address of
    :the network 116.15.62.0/23
    :But I had to do the
    : 128 64 32 16 8 4 2 .. 1
    : 62 0 0 0 1 1 1 1 .. 0 (this is the network ..)
    : 63 0 0 0 1 1 1 1 .. 1 (This is a Host Address for
    :that Network)

    :But i'm looking to do it in a faster way, and not to do the Bit
    :conversion....

    You pretty much can't get away without -some- bit conversion.
    You will need to learn to recognize the major boundaries within one
    byte. Even if you only memorize a few of them such as
    32, 64, 96, 128, 192, 224 then you can zero in to the exact boundary
    with only a few mental steps (at most 5 in this case).
    --
    Live it up, rip it up, why so lazy?
    Give it out, dish it out, let's go crazy, yeah!
    -- Supertramp (The USENET Song)
     
    Walter Roberson, Mar 2, 2005
    #10
  11. ws00sw

    ws00sw Guest

    Thanks Walter, I will buy your bits ;)

    -cnrc.gc.ca (Walter Roberson) wrote in message news:<d05bcb$kqg$>...
    > In article <>,
    > <> wrote:
    > :For example: I need to summarize these CIDR Blocks 216.0.0.0/16,
    > :216.2.0.0/16, 216.3.0.0/16, 216.5.0.0/16, 216.6.0.0/16,216.7.0.0/16...
    > :See that there are no continuos addresses in the CIDRs Blocks, how can
    > :you do that???
    >
    > Start with the lowest address, and mentally propose a mask, and
    > mentally find the last IP implied by the low IP and the mask. If the
    > high IP would include a block that is not on the list, then your mask
    > is too big, so take the next smallest and try again. If the low to high
    > range includes only IPs listed in the CIDR list, look to see if the
    > next IP is in the list as well: if it is, mentally try the next larger
    > mask. Repeat and eventually you would have a mask which includes as
    > many elements of the CIDR as possible without including anything not in
    > the list ; write that IP and mask down and remove those elements from
    > the list and repeat for the new smallest IP.
    >
    > In the above, example, one would start with 216.0.0.0/16 and mentally
    > propose (say) /15. The high IP implied by that would be 216.1.255.255
    > so the low to high range includes IPs (216.1.*.*) that are not in the
    > CIDR list, so leave the mask at /16, write that and 216.0.0.0/16
    > down, and remove 216.0.0.0/16 from list. The new low element would be
    > 216.2.0.0/16. Try /15 again. The high IP for it would be 216.3.255.255
    > and everything from 216.2.0.0 to 216.3.255.255 is covered by one of
    > the CIDR. So try the next bigger mask, /14. The high IP implied
    > by that would be 216.5.255.255, but the range 216.2.0.0 to 216.5.255.255
    > include some IPs, 216.4.*.* that are not on the CIDR list. So go
    > back to /15, mark down 216.2.0.0/15 and remove 216.2.0.0/16 and
    > 216.3.0.0/16 from the CIDR list. Now, 216.5.0.0/16 is the first on
    > the list. If you were to try 216.5.0.0/15 then the base IP would be
    > 216.4.0.0 which is not on the list, so you know you have to keep /16.
    > Then 216.6/16 and 216.7/16 merge to 216.6/15 . Final list:
    > 216.0/16, 216.2/15, 216.5/16, 216.6/15
     
    ws00sw, Mar 3, 2005
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jonnah
    Replies:
    1
    Views:
    1,208
    mcaissie
    Apr 21, 2004
  2. Chris
    Replies:
    2
    Views:
    490
  3. John Oliver

    Get AS for given IP address?

    John Oliver, Oct 9, 2005, in forum: Cisco
    Replies:
    5
    Views:
    425
    David Schwartz
    Oct 10, 2005
  4. hugh jass
    Replies:
    3
    Views:
    1,059
    Helen
    Sep 11, 2003
  5. Bruce Lewis

    summarize picture phones vs compacts?

    Bruce Lewis, Mar 27, 2006, in forum: Digital Photography
    Replies:
    3
    Views:
    379
    Helen
    Mar 27, 2006
Loading...

Share This Page