[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: domain names, was: hostname



On Tue, Feb 20, 2018 at 07:36:49PM +0000, Jeremy Nicoll wrote:
> > In short, the "helper" record appends the domain name to a hostname, so
> > you don't have to type out a FQDN when you're trying to get to a remote
> > host.
> 
> Do you mean when someone outside the LAN is trying to connect to my 
> machine?

No.  It's for when you try to look up a hostname without a domain.

For example, if your local area network uses "Greek gods" as its hostname
theme, and your machine is named "hermes", you might try to "ping zeus"
and see if it's up.

In this case, "zeus" has no domain name attached to it, so the values in
the /etc/resolv.conf file (search and/or domain) will be used instead.

Suppose your /etc/resolv.conf contains this:

search pantheon.gods
nameserver 10.20.30.40

Then your "zeus" gets turned into "zeus.pantheon.gods", and will be looked
up in DNS (using the recursive resolver at 10.20.30.40).

(Unless of course it was already found in /etc/hosts or however you have
configured your local /etc/nsswitch.conf to behave.)


Reply to: