Subject: Re: netmask/broadcast questions
To: SamMaEl <rimsky@teleport.com>
From: Colin Wood <cwood@ichips.intel.com>
List: port-mac68k
Date: 12/30/1997 18:18:55
SamMaEl wrote:
> 
> 
> 	In my struggle to get ipnat working CORRECTLY on my subnet, I
> changed my local IP setup from: 
> 
> IPs 10.0.0.*                  # with 1-4 being used
> netmask 255.255.255.0         # which Bob Nestor pointed out as wrong

The above netmask isn't wrong, just unusual.  The 10.* block was
originally part of the Class A network block, technically meaning a subnet
mask of 255.0.0.0 (i.e. the first octet is the network number, the other 3
are the host number), but most people would subnet a network that large
anyway, so you're "Class C" subnet mask would work just fine, provided you
get all the other numbers correct.

> broadcast 255.255.255.10      # also wrong?

This is definitely wrong.  It should've been:

broadcast 10.0.0.255

> 	My new setup is:
> 
> IPs 192.168.1.*               # with 1-4 being used

Fine.

> netmask 255.255.255.0         # which for a class C subnet SHOULD be right?

Fine.

> broadcast 255.255.255.192     # ?? no clue on this one...

Nope.  The way this works is that the netmask has all binary 1's in the
_network_ portion of the address and 0's in the _host_ portion, while the
broadcast address has the actual network number in the network portion and
all 1's in the _host_ portion.  Thus, it should be:

broadcast 192.168.1.255
 
> 	So, for the above setup, 1) is the netmask I set correct, and 2)
> what the &*(^ would my broadcast be? ;-) I'm going to re-ifconfig here in
> a sec, so we'll see if it works... heh ;-)

Let me know if the above works.

Later.

-- 
Colin Wood                                 cwood@ichips.intel.com
Component Design Engineer - MD6                 Intel Corporation
-----------------------------------------------------------------
I speak only on my own behalf, not for my employer.