[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: New to Debian (I'm a Gentoo user) - static IP vs DHCP



Zenaan Harkness wrote:
> Andrei POPESCU wrote:
> > Tanstaafl wrote:
> >> # The primary network interface
> >> #allow-hotplug eth0
> >> auto eth0
> >> iface eth0 inet static
> >> address ###.###.###.###
> >> gateway ###.###.###.###
> >> netmask 255.255.255.0
> >> network ###.###.###.###
> >> broadcast ###.###.###.###
> >
> > Since you already fixed your issue I'll just comment on your interfaces
> > file. BTW, there is a man page for it: interfaces(5).
> 
> > 3. it's safe to get rid of 'network' and 'broadcast', they are
> > calculated from address and netmask ;)
> 
> Actually not. Some home adsl modems and routers these days default to
> 172.XX.. and 10. subnets, and Debian (Linux kernel?) chooses networks
> such as 255.255.0.0 and 255.0.0.0 and correspondingly for broadcasts.

I think you have misread "network" as "netmask".  The "netmask" is
needed.  If the netmask is specified then the "network" and
"broadcast" are not.  The program can calculate network and broadcast
from the network setting.  So set only the network and let the other
two be calculated by the program.

It used to be that the debian-installer would create those network and
broadcast entries as examples.  This was because there were
documentation examples showing how all of the options were used.  This
inadvertently caused people reading the documentation to think that
all of those options were needed.  They weren't.

Those examples have been removed and the d-i no longer creates those
entries.  Starting a couple of years ago there has been a push to
clean these up so that they are no longer distributing such examples.

Here is a reference:
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630551

And so now seeing "network" and "broadcast" in the file triggers a
motherly cleanup response.  It is dirty.  It needs to be cleaned! :-)

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: