On 21 August 2015 at 16:43, Bruce Dubbs <[email protected]> wrote:

> Richard Melville wrote:
>
>> Is there any reason why we use ping from inetutils rather than the
>> version from iputils.  I realise that we don't install iputils, but why?
>>
>
> Why not?  There is no need to change.
>

Even though most of inetutils is useless by way of insecurity?

>
> I'm asking this because it would appear that the former won't tolerate
>> the same alias (hostname) being entered in /etc/hosts for both IPv4 and
>> IPv6, but the latter does.
>>
>
> The hostnames in /etc/hosts must be unique.  Rename the entry to create a
> unique name:
>
> a.b.c.d hostname
> BBBB:BBBB:BBBB:BBBB:BBBB:BBBB::BBBB  hostname6
>

The iputils version of ping appears not to require a unique hostname:-

127.0.0.1    localhost
127.0.1.1    turing

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback turing
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

The above works just fine for me; whereas on LFS with the inetutils version
of ping the above entry does not work, as you agree, owing to duplication
of hostname.  Actually, if I remove the IPv4 hostname completely from
/etc/hosts on LFS, ping still works but returns the following:-

#ping dog
PING ip6-localhost (127.0.0.1): 48 data bytes
56 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.152 ms
56 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.118 ms
56 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.103 ms
^C--- ip6-localhost ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.103/0.124/0.152/0.000 ms

As apposed to this from iputils ping (with duplicated hostnames):-

$ ping turing
PING turing (127.0.1.1) 56(84) bytes of data.
64 bytes from turing (127.0.1.1): icmp_req=1 ttl=64 time=0.055 ms
64 bytes from turing (127.0.1.1): icmp_req=2 ttl=64 time=0.035 ms
64 bytes from turing (127.0.1.1): icmp_req=3 ttl=64 time=0.035 ms
^C
--- turing ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.035/0.041/0.055/0.012 ms

However, it doesn't work the other way round, that is, if I remove the IPv6
hostname from /etc/hosts I get "unknown host".

I'm assuming it's a difference between the two versions of ping.

Richard
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to