The smaller the bit mask number (in this case /16 and /24) the less specific the network. Gilbert -----Original Message----- From: plug-discuss-admin@lists.plug.phoenix.az.us [mailto:plug-discuss-admin@lists.plug.phoenix.az.us]On Behalf Of AZ Pete Sent: Thursday, August 07, 2003 1:11 PM To: plug-discuss@lists.plug.phoenix.az.us Subject: Help with Network Address Math Calling all network gurus :) My IP network address math is rather rusty (it's been a long time!!). I have need to calculate whether a given client IP address is within a given network. Additionally, if there are a list of given networks, which one is the most specific. I need the math formulas to calculate these figures for use within an application. Examples: Given the network: 192.168.1.0/24 Given IP address is: 192.168.1.100 What is the formula to determine if this client's IP address falls within the network's range. Further example Given these networks: 192.168.1.0/24 and 192.168.0.0/16 and the client IP of: 192.168.1.100 In this case the client's IP falls within both networks. What is the formula to determine which network is the more specific one? Any help would be most appreciated. Thanks, Peter --------------------------------------------------- PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us To subscribe, unsubscribe, or to change you mail settings: http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss --- [ This E-mail was scanned for viruses by Phoenix Internet ] [ Phoenix Internet www.phoenixinternet.net ] --- [ This E-mail was scanned for viruses by Phoenix Internet ] [ Phoenix Internet www.phoenixinternet.net ]