From owner-freebsd-questions Thu Mar 22 2: 2: 6 2001 Delivered-To: freebsd-questions@freebsd.org Received: from gekko.i-clue.de (server.ms-agentur.de [62.153.134.194]) by hub.freebsd.org (Postfix) with ESMTP id C22E037B71B for ; Thu, 22 Mar 2001 02:02:01 -0800 (PST) (envelope-from so@server.i-clue.de) Received: from i-clue.de (automatix.i-clue.de [192.168.0.112]) by gekko.i-clue.de (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) with ESMTP id MAA18545; Thu, 22 Mar 2001 12:09:01 +0100 Message-ID: <3AB9CDE8.71855700@i-clue.de> Date: Thu, 22 Mar 2001 11:03:20 +0100 From: Christoph Sold Reply-To: so@server.i-clue.de X-Mailer: Mozilla 4.75 [de] (WinNT; U) X-Accept-Language: de MIME-Version: 1.0 To: Murray Taylor Cc: FreeBSD-Questions Subject: Re: /etc/hosts format References: <710709BB8B02D311942E00606744181054429F@MELEXC01> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Murray Taylor schrieb: > > OK I have conflicting information about the format of the /etc/hosts table > > one reference says that the format should be > > 127.0.0.1 localhost localhost.my.domain myname.my.domain > 10.0.0.2 myname.my.domain myname > 10.0.0.3 myfriend.my.domain myfriend > > then another says > > 127.0.0.1 localhost.my.domain localhost > 10.0.0.2 myname.my.domain myname > 10.0.0.3 myfriend.my.domain myfriend > > then another says > > 127.0.0.1 localhost.my.domain localhost > 127.0.0.1 localhost > 10.0.0.2 myname.my.domain myname > 10.0.0.2 myname > 10.0.0.3 myfriend.my.domain myfriend > 10.0.0.3 myfriend > > then another says (note trailing dots on secondary lines) > > 127.0.0.1 localhost.my.domain localhost > 127.0.0.1 localhost.my.domain. > 10.0.0.2 myname.my.domain myname > 10.0.0.2 myname.my.domain. > 10.0.0.3 myfriend.my.domain myfriend > 10.0.0.3 myfriend.my.domain. > > Who is right??? All of them, choose your preferred format. The last entry prohibits adding of the local domain to the trailing dot lines by the resolver library. Unfortunately, since the very same name is already listed without trailing dots, the resolver would try them nonetheless. HTH -Christoph Sold To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message