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

Re: Localhost



Salut,

Zuthos Oddy a écrit le 24/01/2015 16:50 :
> 
> Bonjour,
> 
> Voici le résultat d'un ping sur localhost:
> # ping -c 3 localhost
> ping: unknown host localhost
> 
> 
> Par contre:
> # ping -c 3 127.0.0.1
> PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
> 64 bytes from 127.0.0.1: icmp_req=1 ttl=64 time=0.051 ms
> 64 bytes from 127.0.0.1: icmp_req=2 ttl=64 time=0.049 ms
> 64 bytes from 127.0.0.1: icmp_req=3 ttl=64 time=0.056 ms
> 
> --- 127.0.0.1 ping statistics ---
> 3 packets transmitted, 3 received, 0% packet loss, time 1998ms
> 
> 
> Hors:
> # cat /etc/hosts
> 127.0.0.1       localhost.enfants       localhost

Et en mettant :
127.0.0.1	localhost
127.0.1.1	localhost.enfants


> Si quelqu'un avait une idée du pourquoi de cette erreur...

L'ordre me paraît pas le bon, j'aurais écrit :
127.0.0.1       localhost       localhost.enfants




-- 
Stéphane


Reply to: