Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Dec 2001 20:19:37 +0100
From:      "Anthony Atkielski" <anthony@freebie.atkielski.com>
To:        "Joe & Fhe Barbish" <barbish@a1poweruser.com>
Cc:        "FreeBSD Questions" <freebsd-questions@freebsd.org>
Subject:   Re: /etc/hosts file ?
Message-ID:  <012e01c18278$cef45510$0a00000a@atkielski.com>
References:  <LPBBIGIAAKKEOEJOLEGOEECJCJAA.barbish@a1poweruser.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?012e01c18278$cef45510$0a00000a>