Le jeudi 12 mars 2015 à 02:20:55, Vincent Lefevre a écrit : > On 2015-03-12 13:29:47 +0100, Stéphane Aulery wrote: > > > If so, can you provide an appropriate explanatory text of the > > example? Maybe it's nothing, but I have no knowledge on the subject. > > Perhaps say: > > 127.0.1.1 is often used for the FQDN of the machine. > > The main goals of my suggestion to mention 127.0.1.1 are: > * Inform the user who sees that in his /etc/hosts (normally > automatically generated by the Debian installer) that this > is not a mistake. > * Show an example where the FQDN is not associated with the IP of > a configured interface (the IPv4 address of the lo interface is > 127.0.0.1, but any 127.x.x.x address will respond too). > > Moreover IPv6 addresses could be added in the examples: > > ::1 localhost ip6-localhost ip6-loopback > ff02::1 ip6-allnodes > ff02::2 ip6-allrouters > > since these ones are the default ones in Debian. This is a subset of > > http://www.bieringer.de/linux/IPv6/IPv6-HOWTO/IPv6-HOWTO-6.html#etc-hosts
I propose the patch attached. Comments? -- Stéphane Aulery
diff --git a/man5/hosts.5 b/man5/hosts.5 index 9ec8cb2..2eaeb69 100644 --- a/man5/hosts.5 +++ b/man5/hosts.5 @@ -106,11 +106,20 @@ I just found three, from 92, 94, and 95. .SH EXAMPLE .nf +# The following lines are desirable for IPv4 capable hosts 127.0.0.1 localhost + +# 127.0.1.1 is often used for the FQDN of the machine +127.0.1.1 thishost.mydomain.org thishost 192.168.1.10 foo.mydomain.org foo 192.168.1.13 bar.mydomain.org bar 146.82.138.7 master.debian.org master 209.237.226.90 www.opensource.org + +# The following lines are desirable for IPv6 capable hosts +::1 localhost ip6-localhost ip6-loopback +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters .fi .SH SEE ALSO .BR hostname (1),

