what's the name?

Kevin Darcy kcd at daimlerchrysler.com
Thu Mar 2 22:49:48 UTC 2000

Bovine Unit #243 wrote:

> >> Same question, but with "" "quack" "quck.duck.org" as the
> >> arguments.
> >Again, it all depends on what the DNS database contains, and what your
> >nslookup settings/arguments are.
> And is there an accepted norm of what those results should be? Or can
> I just put in anything as long as "it makes sense?" The reason I'm
> asking is I've found out I can get the answers in the form I want by
> playing with various files (resolv.conf, that name -> IP address file,
> and the reverse look-up file). e.g. instead of returning "localhost,"
> I may be able to make it answer "quack."

Right, you could just have this for your zone:

$TTL 3600
@            IN      SOA     quack.duck.org. root.quack.duck.org. (
                1 86400 3600 3600000 3600 )
                IN      NS      quack.duck.org.
                IN      PTR     quack.

Then a DNS lookup of will return "quack". (Most of the values in
that file are useless placeholders except of course for the right-hand-side
of the PTR record).

It's more "traditional" to have it return "localhost", but not mandatory. For
instance, we have a naming convention around here that includes the interface
name in each FQDN, so on my workstation here, for instance,
resolves to "clkcdts1-lo0.is.chrysler.com" in DNS. For consistency, the
forward lookup for that name resolves to on my machine.

You should be aware, however, that some OS'es treat the loopback address
"specially". Solaris, for instance, "shortcuts" to always be
"localhost" in all of its non-DNS-specific utilities, so although my name
resolves to something else within DNS, if I do, say, a netstat -a, my
loopback will still be resolved as "localhost". Since it's probably the
Solaris resolver library that's doing this, I could probably "fix" the
problem by replacing it with a BIND one, if I cared.

> By the way, should named be able to provide result from just the
> non-fully-qualified name? For example, if there's machine "quack" in
> "duck.org" domain, can I look up "quack" and expect query success?
> Right now it doesn't... The FreeBSD book I'm following along doesn't
> say anything of whether I should be able to or not.

DNS servers don't really understand the concept of a "non-fully-qualified
name". If a query for a "dot-less" name is received by a DNS server, the
server will look for the name in the root zone, since every DNS query name is
implicitly "qualified" with a (usually invisible) root-zone "." at the end.
The resolver is supposed to take care of tacking domains onto the name as
necessary before it sends it to the server.

- Kevin

More information about the bind-users mailing list