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

Re: hostname is being reset, killing net on reboot



On Sun, Jan 23, 2022 at 08:50:56AM +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?
> 
> 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.

If that actually works, that's great news for Gene.  It means he can
duplicate a single /etc/hosts file across all systems without needing
to bolt on a unique per-system header afterward.

In terms of operation, the main difference as far as I understand it
is that a connection to "acer" (or whatever your system's own name is)
will be directed to the ethernet interface instead of the loopback
interface.  So, if you've got a daemon that's only bound to loopback,
you would need to contact it via the name "localhost" rather than the
system's name.  Whereas in the regular Debian setup that has 127.0.1.1
bound to the system's name, either one works.


Reply to: