[ale] IP Calculations

Joseph A Knapka jknapka at earthlink.net
Fri Dec 14 09:23:39 EST 2001


Chris Fowler wrote:
> 
> If someone gives me an IP address in the form of "192.168.4.6" , a string, is there an easy way I can calculate the netmask, and broadcast of that address? 

With CIDR, no. You need to be told the netmask as well.
Without CIDR, the top three bits (I think) of the most-
significant byte tell you the address class, which tells
you the netmask, but I don't remember exactly how the
class scheme works; you'll need to google that up
yourself.

Cheers,

-- Joe

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list