[OFFTOPIC] Re: ifconfig strangeness

Raoul Boenisch / FB14 / keine Hausanschrift (st0136@hrz.uni-essen.de)
Sun, 17 Jan 1999 21:45:50 +0100 (CET)


On Sun, 17 Jan 1999, Andreas Jellinghaus wrote:

> ifconfig eth0 129.13.242.6 netmask 255.255.255.0
> results in a broadcast address 129.13.0.0 (not a usefull value IMO).
> is there a way to use the given information (ip and netmask)
> and choose 129.13.242.0, which is correct.

I get broadcast 129.13.255.255 with linux-2.2.0-pre7, net-tools 1.45
thus ifconfig 1.33 (1998-03-02).

> or is there some situation where the current behavior is desired.

The behaviour is perfectly ok. 128.0.0.0 - 191.255.255.255 is class B
network which has a netmask of 255.255.0.0 and a broadcast of x.x.255.255.
Ifconfig automatically sets the official broadcast address. In case you
change the netmask it is up to you to change the broadcast, too, if
needed.

Use

ifconfig eth0 129.13.242.6 broadcast 129.13.242.255 netmask 255.255.255.0

instead.

I think this question concerns net-tools.

-- 
Raoul Boenisch, Winkhauser Talweg 165, 45473 Muelheim an der Ruhr, Germany
homepage: http://www.raoul.home.pages.de/       home phone: +49 208 764257
Reply-To: st0136@hrz.uni-essen.de

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/