On 2015-02-28 20:35:22 +0000, Liam O'Toole wrote: > On 2015-02-28, Philippe Clérié <[email protected]> wrote: > > What is the rationale for the /etc/hosts entry for 127.0.1.1? > > > > It tends to be annoying when using dnsmasq as a server for static hosts. > > It is used when the host uses DHCP to obtain an IP address. One places > an entry in /etc/hosts so that the host name is mapped to 127.0.1.1. > Some X applications complain when the host name cannot be resolved. > > If your server has a static IP, then you would instead map that IP to > the host name in the same file.
I'd say that even if the server has a static IP, it may be better to map the host name to 127.0.1.1, so that if for some reason the Ethernet interface is down, local connections using the host name (instead of localhost) can still work. Moreover, if for some reason the static IP changes, the /etc/hosts file won't have to be updated (not difficult, but easy to forget). -- Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: https://lists.debian.org/[email protected]

