Newbee question:

Discussion in 'Cisco' started by Adrian, Nov 29, 2003.

  1. Adrian

    Adrian Guest

    John Doe wrote:
    > 192.168.1.1
    > 255.255.255.240
    >
    > Can someone please give me the formula that converts network bits "/28" to a
    > subnet mask "240". I cannot figure this out. I don't want a calculator, I
    > want to know how they got from a to b.
    >
    > 30 = 252 -> Why?


    30 = 252 is not really correct, it should be /30 = 255.255.255.252,
    remember an address is 32bits. In quad notation we are talking about 4
    separate 8bit segments, you need to consider each segment separately,
    then add them together. In this case, the final quad is:

    1111111 = 255
    1111110 = 254
    1111100 = 252
    1111000 = 248
    etc....

    Therefore, a mask of 255.255.255.252 is in binary:
    11111111.11111111.11111111.11111100

    The first 30 bits are 1s, defining a network mask of 255.255.255.252, or
    a "/30" subnet.

    A "/28" subnet (255.255.255.240) would have a total of 28 "1" bits, the
    final octet being "11100000" in binary, 240 decimal. In the same manner,
    a simple class B network 172.16.0.0/16 has a netmask of 255.255.0.0. The
    first 2 octets are all 1s, 16bits. The final 2 octets all 0s.

    Make any sense or too much rambling?

    Adrian



    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
     
    Adrian, Nov 29, 2003
    #1
    1. Advertising

  2. Adrian

    John Doe Guest

    192.168.1.1
    255.255.255.240

    Can someone please give me the formula that converts network bits "/28" to a
    subnet mask "240". I cannot figure this out. I don't want a calculator, I
    want to know how they got from a to b.

    30 = 252 -> Why?
    29 = 248
    28 = 240
    27 = 224
    26 = 192
    25 = 128
    24 = 0
     
    John Doe, Nov 29, 2003
    #2
    1. Advertising

  3. In article <HGWxb.42491$>,
    John Doe <postmaster@127.0.0.1> wrote:
    :192.168.1.1
    :255.255.255.240

    :Can someone please give me the formula that converts network bits "/28" to a
    :subnet mask "240". I cannot figure this out. I don't want a calculator, I
    :want to know how they got from a to b.

    :30 = 252 -> Why?
    :29 = 248
    :28 = 240
    :27 = 224
    :26 = 192
    :25 = 128
    :24 = 0

    The "28" refers to the number of bits to be held constant. The rest
    of the bits [ (32-28) = 4 of them in this example] are allowed to
    vary. Allow them to vary to their maximum value of all 1's -- 4
    consequative 1's in this example, which would be decimal 15.
    Subtract that value from 255 to get the netmask.

    The formula would be (2^32 - 1) - (2^(32-N) - 1) which simplifies to
    (2^32 - 2^(32-N)) as the complete 32 bit netmask.

    If you just want to concentrate on the last byte, then it comes down
    to (2^8 - 2^(32-N)). 2^8 is 256, so that's 256 - 2^(32-N).

    30 -> 256 - 2^(32-30) -> 256 - 2^2 -> 256 - 4 -> 252
    29 -> 256 - 2^(32-29) -> 256 - 2^3 -> 248
    28 -> 256 - 2^(32-28) -> 240
    etc.
    --
    Inevitably, someone will flame me about this .signature.
     
    Walter Roberson, Nov 29, 2003
    #3
  4. Adrian

    John Doe Guest

    Thanks to the both of you. I see the light now ;)


    "John Doe" <postmaster@127.0.0.1> wrote in message
    news:HGWxb.42491$...
    > 192.168.1.1
    > 255.255.255.240
    >
    > Can someone please give me the formula that converts network bits "/28" to

    a
    > subnet mask "240". I cannot figure this out. I don't want a calculator,

    I
    > want to know how they got from a to b.
    >
    > 30 = 252 -> Why?
    > 29 = 248
    > 28 = 240
    > 27 = 224
    > 26 = 192
    > 25 = 128
    > 24 = 0
    >
    >
     
    John Doe, Nov 29, 2003
    #4
    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. Jim ODonnell

    total newbee question

    Jim ODonnell, Dec 24, 2004, in forum: Firefox
    Replies:
    11
    Views:
    822
    .brian.
    Dec 25, 2004
  2. ikke

    newbee: changing from: -line

    ikke, Jan 6, 2004, in forum: Computer Support
    Replies:
    6
    Views:
    464
    °Mike°
    Jan 6, 2004
  3. Ed Johnson

    Newbee question about printers

    Ed Johnson, Nov 10, 2003, in forum: Digital Photography
    Replies:
    6
    Views:
    372
    Mark Herring
    Nov 11, 2003
  4. Aram Langhans

    Newbee question about pixels

    Aram Langhans, Jan 31, 2004, in forum: Digital Photography
    Replies:
    2
    Views:
    365
    Aram Langhans
    Feb 4, 2004
  5. B.W.

    Ping newbee question

    B.W., Oct 15, 2006, in forum: Wireless Networking
    Replies:
    10
    Views:
    726
Loading...

Share This Page