[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



On 1/5/14, Andrei POPESCU <andreimpopescu@gmail.com> wrote:
> On Vi, 03 ian 14, 07:29:52, 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 always set these to a .../24 version, or occasionally I've even set
them less (to a smaller subnet) eg /28


> 4. If you prefer to keep all network settings in one file you could
> install the package 'resolvconf' and add a 'dns-nameservers' line (no,
> the 's' is not a typo, since you can add more of them, separated by
> spaces).

Agreed. I find this very convenient. Only caveat to manually applied
DNS servers is that if your DNS is otherwise provided by your ISP, and
they change their DNS ip address (has happened to me occasionally)
then obviously the manually assigned addresses must be updated.

Best
Zenaan


Reply to: