From owner-freebsd-questions Tue Dec 11 11:20:17 2001 Delivered-To: freebsd-questions@freebsd.org Received: from freebie.atkielski.com (ASt-Lambert-101-2-1-14.abo.wanadoo.fr [193.251.59.14]) by hub.freebsd.org (Postfix) with ESMTP id 316F137B417 for ; Tue, 11 Dec 2001 11:19:56 -0800 (PST) Received: from contactdish (contactdish.atkielski.com [10.0.0.10]) by freebie.atkielski.com (8.11.3/8.11.3) with SMTP id fBBJJox32189; Tue, 11 Dec 2001 20:19:50 +0100 (CET) (envelope-from anthony@freebie.atkielski.com) Message-ID: <012e01c18278$cef45510$0a00000a@atkielski.com> From: "Anthony Atkielski" To: "Joe & Fhe Barbish" Cc: "FreeBSD Questions" References: Subject: Re: /etc/hosts file ? Date: Tue, 11 Dec 2001 20:19:37 +0100 Organization: Anthony's Home Page (development site) MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Joe writes: > I think the ::1 and 127.0.0.1 work together > and have to do with loopback function ... The first is for IPv6, which you probably aren't using. The second is for standard IPv4 IP addressing. As you correctly surmise, they are for the loopback (localhost) address. > ... but I have no idea what the 'localhost > localhost.my.domain myname.my.domain' is > saying to FBSD and or if am I suppose to change it. These are the names equated with the local machine. You should leave the "localhost" text alone, but change the rest to reflect the domain in which your machine resides. Since you are on a small LAN with just your two machines, however, you can just put "localhost" on this line. > Now the handbook says to add entries for any > local hosts, but gives no explanation of what > a local host is. In your configuration, a local host is the FreeBSD machine itself, plus other machines on the same LAN, which means your Win98 box. So only these two machines are local hosts. > Is local host any private box attached to > this FBSD box or just FBSD boxes with server > functions? Local hosts are any machines on your LAN that you wish to be able to address by name. So if you call your Win98 box "winbox" and you've given it an address of 10.0.0.2, you'd need a line like this in /etc/hosts to address it by name: 10.0.0.2 winbox > So do I need a statement in hosts for 10.0.0.1? It doesn't hurt, but it is not essential, unless you wish to reference that address by name. The /etc/hosts file is just a list of names to be associated with IP addresses. The resolver functions search this file looking for a name you give when you reference a computer by its hostname (either the name itself or the fully-qualified domain name, such as winbox.joesdomain.com, or whatever). > Does official hostname mean a domain name > registered with the internet people, or is > it any name I want to use as a handle to > reference this FBSD box? You can use any name you want. The /etc/hosts file is used only by the FreeBSD box itself, so you have complete freedom to put in the names you want. If the computers referenced also have "official" names known to the outside world, of course, you might wish to make sure that your hosts file matches those, but it isn't required. The hosts file will take precedence. > Does it have to have end with a .com? No, it can be whatever you want. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message