On Thu, 9 Dec 1999, David Taylor wrote:

> I have to setup an ipfwadm rule for a subnet.  The IP addresses are in
> the range 129.8.111.192 - 129.8.111.198.  The rule must apply to those
> IPs, but no others.  I have absolutely no idea whatsoever as to how to
> calculate the mask.  Can someone out there *please* help me?  I don't
> just want the answer; I want to know how to calculate this myself in
> future.

Two of your IP's are administratively given over to your subnet. 192 and
198 are the network number and the broadcast address, respectively. In
short, these addresses are not usable for assignment to a workstation.

If someone else has assigned you the Class C address space, you can
usually just subtract the number of IP's from 256 to get the last octet of
the netmask. In your case, 256 - 8 = 248, so your netmask is
255.255.255.248.

If you're trying to determine how many IP's a given netmask yields, that
gets into binary arithmetic on which there are a number of FAQ's and
tables on the Internet. I recommend going to Webopedia for more info on
how to calculate them.

-- 
Todd A. Jacobs
Network Systems Engineer



-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to