On Sun 23 Jan 2022 at 08:50:56 (+0100), Andrei POPESCU wrote: > On Sb, 22 ian 22, 20:07:45, David Wright wrote: > > > > Because the basic /etc/hosts file looks something like: > > > > 127.0.0.1 localhost > > 192.168.1.1 router.corp router > > 192.168.1.2 cascade.corp cascade > > 127.0.1.1 acer.corp acer # 192.168.1.10 > > # The following lines are desirable for IPv6 capable hosts > > ::1 localhost ip6-localhost ip6-loopback > > ff02::1 ip6-allnodes > > ff02::2 ip6-allrouters > > > > and the hostname, acer, will be different on each host. > > Instead of listing the machine's name with 127.0.1.1 I'm using it's > actual IP (like the one you have in the comment). > > Any potential issues I should be aware of?
Yes, and ISTR its being discussed on d-u perhaps 20 years ago. It means that software can get the hostname resolved to an IP address a) before DNS is running, and b) before any interfaces are configured, or when they fail to get configured at all. Otherwise, you get a response to ping, say, like: ping: connect: Network is unreachable instead of a response from the loopback address. > As far as I can tell (with my limited understanding of DNS) it only > makes it easier to share /etc/hosts with no obvious downside. The idea of the script is to make sharing it as trivial as using scp directly. And if you use sneakernet to transfer the master file and the script, the latter should still work, because Debian sets up 127.0.1.1 at installation time. Cheers, David.