From owner-freebsd-questions@FreeBSD.ORG Fri Sep 12 03:50:24 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74E6A106564A for ; Fri, 12 Sep 2008 03:50:24 +0000 (UTC) (envelope-from on@cs.ait.ac.th) Received: from mail.cs.ait.ac.th (mail.cs.ait.ac.th [192.41.170.16]) by mx1.freebsd.org (Postfix) with ESMTP id 236E98FC0A for ; Fri, 12 Sep 2008 03:50:22 +0000 (UTC) (envelope-from on@cs.ait.ac.th) Received: from banyan.cs.ait.ac.th (banyan.cs.ait.ac.th [192.41.170.5]) by mail.cs.ait.ac.th (8.13.1/8.13.1) with ESMTP id m8C3oJCZ046318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 12 Sep 2008 10:50:19 +0700 (ICT) (envelope-from on@banyan.cs.ait.ac.th) Received: (from on@localhost) by banyan.cs.ait.ac.th (8.14.2/8.12.11) id m8C3oJfx070824; Fri, 12 Sep 2008 10:50:19 +0700 (ICT) Date: Fri, 12 Sep 2008 10:50:19 +0700 (ICT) Message-Id: <200809120350.m8C3oJfx070824@banyan.cs.ait.ac.th> From: Olivier Nicole To: freebsd-questions@freebsd.org In-reply-to: <20080912034117.GA48495@shepherd> (message from Sahil Tandon on Thu, 11 Sep 2008 23:41:17 -0400) References: <200809112249.05138.naylor.b.david@gmail.com> <20080912034117.GA48495@shepherd> X-Virus-Scanned: on CSIM by amavisd-milter (http://www.amavis.org/) Subject: Re: /etc/hosts not working X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2008 03:50:24 -0000 > `ping google.com' actually pings 127.0.0.1 but `host google' returns > the actual IP addresses for google. ping will resolve the name using the mecanism defined in /etc/nsswitch.conf, usually: hosts: files dns nis try first /etc/hosts, then DNS, then NIS But host(1) command is designed to query DNS exclusively. Hence the different recults. Olivier