Discussion:
Non-qualifed hostname resolution in DNS
(too old to reply)
KP Bhat
2011-03-17 21:30:55 UTC
Permalink
Hello,

I have a question regarding DNS. My experience has been that DNS
servers always automatically combine a unqualified hostname with the
default domain name in order to determine the fully qualified domain
name. Is this behavior specified in some RFC, or is this just how the
DNS Servers are implemented? If this is specified in some RFC, can
someone kindly provide a reference? If not, do we know of any DNS
implementations for which this behavior does not hold?

Thanks in advance,
Bhat
glen herrmannsfeldt
2011-03-17 21:38:40 UTC
Permalink
Post by KP Bhat
I have a question regarding DNS. My experience has been that DNS
servers always automatically combine a unqualified hostname with the
default domain name in order to determine the fully qualified domain
name. Is this behavior specified in some RFC, or is this just how the
DNS Servers are implemented? If this is specified in some RFC, can
someone kindly provide a reference? If not, do we know of any DNS
implementations for which this behavior does not hold?
As far as I know, DNS servers never do that.

DNS clients have a list of domains to append to the supplied name,
and will request the qualified name in turn, followed by the
name as given.

For unix, this is part of the resolver, specified in the
/etc/resolv.conf file.

Also, DHCP servers can supply the list of domains to a DHCP client.
IF you DNS server is also a DHCP server, then look in the DHCP
configuration.

-- glen
Winston
2011-03-17 22:20:25 UTC
Permalink
Post by KP Bhat
I have a question regarding DNS. My experience has been that DNS
servers always automatically combine a unqualified hostname with the
default domain name in order to determine the fully qualified domain
name. Is this behavior specified in some RFC, or is this just how the
DNS Servers are implemented?
It's partly controlled by a configuration file.
Have a look at /etc/resolv.conf and read `man resolv.conf`.
Also read `man resolver`. Environment variables and code in each
program can also determine some of what happens.
-WBE
Charles Bryant
2011-03-18 01:57:06 UTC
Permalink
In article <13a6c35d-57b1-424f-ae2e-***@fe9g2000vbb.googlegroups.com>,
KP Bhat <***@sta.samsung.com> wrote:
}I have a question regarding DNS. My experience has been that DNS
}servers always automatically combine a unqualified hostname with the
}default domain name in order to determine the fully qualified domain
}name.

No. DNS servers never do that. Something else does that. For example,
if you give "example" as a URL to many web browsers, they may try
"www.example.com" or other alternatives. Command-line tools usually
make use of an operating-system facility which appends one or more
alternative strings, but they may also use some other lookup method
(for example, Microsoft Windows will use its own lookup systems as
well as DNS).

This is specified by RFC 1035. In particular 4.1.2, which specifies the
format of the query, says "The domain name terminates with the zero
length octet for the null label of the root." so every query must be
fully qualified.

The use of a local domain can make some queries difficult. Try looking
up "tm" on your system. For example "ping tm" or put "tm" into a web
browser. It is a valid name all by itself, but you may find that your
browser is unable to reach it unless you say "http://tm" or even
"http://tm.". The correct web page is the same as <URL: http://nic.tm >.
Loading...