[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 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).

1. Do you have a specific reason for using 'auto' instead of 
'allow-hotplug'? I doubt you'll see any difference in practice.

2. Indenting makes your file easier to read, e.g.

iface eth0 inet static
    address ...
    gateway ...
    netmask ...

3. it's safe to get rid of 'network' and 'broadcast', they are 
calculated from address and netmask ;)

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).

This is additional complexity for a machine with a static address that 
rarely changes, but I thought you should be aware of the possibility.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
http://nuvreauspam.ro/gpg-transition.txt

Attachment: signature.asc
Description: Digital signature


Reply to: