On Wed May 10 2000 at 09:33, Richard June wrote:

> Just out of curiosity, the kernel apparently doens't set the broadcast
> address on a device according to the netmask of said device, i.e. ifconfig
> eth0 10.10.10.1 netmask 255.255.255.252 will assign the ip and netmask as
> specified, but will set broadcast to 10.255.255.255 even though(If I

Unless you specify a broadcast address, what will be used is the
normal A- B- C- class specifications for setting it.  In the case
of a 10.X.X.X network, this is an A class network, with only the
first 8 bits used for the network address (ie, 10.255.255.255).

> understand correctly) broadcast should be 10.10.10.3, am I off my rocker,
> or is this true? and if so, why does the kernel set netmask if not
> specified, but not figure out the broadcast?

The broadcast address depends on the netmask, yes.  But not
necessarily so.  Which sounds weird, but there are some
(admittedly weird) situations where the netmask and broadcast
addresses might need to be "inconsistent".  The point is that the
kernel and networking utilities let you do exactly what you want.

/sbin/ifconfig will usually do all this for you.  But with
/sbin/ip you MUST specify the broadcast address.

But the broadcast address for an A class network is X.255.255.255
so this is what is created by default.  If you want anything
different, then you need to specify it explicitly.

Cheers
Tony
 -=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-
  Tony Nugent <[EMAIL PROTECTED]>    Systems Administrator, RHCE
  GrowZone OnLine       (a project of) GrowZone Development Network
  POBox 475 Toowoomba Oueensland Australia 4350    Ph: 07 4637 8322
 -=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to