Re: [HACKERS] cidr - Mailing list pgsql-hackers

From The Hermit Hacker
Subject Re: [HACKERS] cidr
Date
Msg-id Pine.BSF.3.96.980722122844.23582M-100000@hub.org
Whole thread Raw
In response to Re: [HACKERS] cidr  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
On Wed, 22 Jul 1998, Bruce Momjian wrote:

> OK, let me explain what I think Paul was saying.  cidr is used for
> networks.  You can use it for hosts by specifying /32.  It is not the
> same as a netmask.  For example:
>
>     host    192.24.45.32
>
> Now, this is a host address.  We can say its netmask is 255.255.255.0,
> or was can say it is part of network 192.24.45/24, which would allow you
> compute the netmask as 255.255.255.0.  The problem is that you need the
> type to support cidr, hosts, and netmasks.

    192.24.45.32/32 == 192.24.45.32:255.255.255.255 (single host)
    192.24.45.32/30 == 192.24.45.32:255.255.255.252 (2 hosts)
    192.24.45.32/26 == 192.24.45.32:255.255.255.192 (62 hosts)

Check out: http://www.min.net/netmasks.htm, it has *all* the translations
and appropriate netmasks associated with each CIDR...



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Documentation Roadmap
Next
From: bbutler33@hotmail.com (Brian Butler)
Date:
Subject: Jim Gray's Benchmark Handbook Online