[lug] Calculating network addresses

Ralf Mattes rm at ns.aura.de
Mon Mar 27 01:41:24 MST 2000


Yet another version ...

guile -c '(display (inet-ntoa (logand (inet-aton "192.168.2.80") (inet-aton "255.255.255.0"))))'

On Sun, 26 Mar 2000, Gary Masters wrote:

> On Wed Mar 08, 2000 at 09:27:14 -0700, Ian Hall-Beyer wrote:
> > 
> > Does anyone hava  quick and dirty alogorithm for extrapolating a network
> > address from an IP and subnet mask, preferably one that can be implemented
> > in bash?
> > 
> 
> Recent versions of RedHat come with a utility called ipcalc.  If
> all you need is a tool, I'd use ipcalc.  If you need an algorithm,
> I'd check the source code for ipcalc.

  Ralf

*-------------------------------------------------------------------*
|                                     |                             |==
| Ralf Mattes                         | ralf.mattes at pyramid.de      |==
| Programming, Administration         | rm at ns.aura.de               |==
|                                     |                             |==
*-------------------------------------------------------------------*==
   ====================================================================





More information about the LUG mailing list