Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jun 2023 13:36:58 +1000
From:      Ian Smith <smithi@nimnet.asn.au>
To:        "Dan Mahoney (Ports)" <freebsd@gushi.org>,Steven Friedrich <freebsdlouisville@gmail.com>
Cc:        FreeBSD Questions Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: Using /etc/hosts, not dns
Message-ID:  <8140CE7E-9AEF-450E-821C-86308F627A6F@nimnet.asn.au>
In-Reply-To: <198956D1-6B93-4E35-AAC9-872AC146C538@gushi.org>
References:  <846f37ec-c0b3-0b1a-6294-1da6a9260777@Gmail.com> <198956D1-6B93-4E35-AAC9-872AC146C538@gushi.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 26 June 2023 12:47:15 pm AEST, "Dan Mahoney (Ports)" <freebsd@gushi=2Eor=
g> wrote:

 > > On Jun 25, 2023, at 1:51 PM, Steven Friedrich
 > <freebsdlouisville@gmail=2Ecom> wrote:
 > >=20
 > > I have been using /etc/hosts for decades to identify local hosts=2E=
=20
 > I don't want the complexity of dns for this simple scenario=2E
 > >=20
 > > I issue: host slimline
 > > Host slimline not found: 3(NXDOMAIN)
 > >=20
 > > Here's the /etc/hosts:

[=2E=2E=2E]

 > > ::1			localhost localhost=2EFriedrich=2Eorg
 > > 127=2E0=2E0=2E1		localhost localhost=2EFriedrich=2Eorg
 > > 127=2E0=2E1=2E1		Slimline=2EFriedrich=2Eorg

[=2E=2E=2E]

 > > 192=2E168=2E2=2E9	Slimline=2EFriedrich=2Eorg Slimline

 > > Why won't host lookup slimline in /etc/hosts?

 > Because you also have to put it in /etc/hosts as its shortname, as
 > the two =E2=80=9Clocalhost=E2=80=9D examples above should have suggeste=
d=2E

And from the second entry it would appear to be case-sensitive, though hos=
ts(5) makes no such mention?

But then, is a second entry with a different IP address meaningful anyway?

cheers, Ian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8140CE7E-9AEF-450E-821C-86308F627A6F>