[lug] Calculating network addresses

Brian Jarrett BrianJ at StorageSoft.com
Wed Mar 8 10:59:20 MST 2000


Ian,

The easiest _algorithm_ is to AND the IP address and Subnet Mask.  This is
how networking devices work.  Not sure of how to do it in BASH, but any
programming language would handle it for sure.

Brian

-----Original Message-----
From: Ian Hall-Beyer [mailto:manuka at nerdherd.net]
Sent: Wednesday, March 08, 2000 9:27 AM
To: lug at lug.boulder.co.us
Subject: [lug] Calculating network addresses



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?

-Ian

--
<cosmo> wow, this is kinda nifty. the win98 protocol stack is 
like a chinese finger puzzle, twist and turn in the right places, 
and it pops right off			--Seen on EFNet IRC


_______________________________________________
Web Page:  http://lug.boulder.co.us
Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug




More information about the LUG mailing list