Subject: Re: name server problem NetBSD-current/stunos
To: None <greywolf@defender.VAS.viewlogic.com>
From: Ken Hornstein <firstname.lastname@example.org>
Date: 04/29/1996 23:21:44
>NOTE: I understand the phrase "inverse query" to mean "given IP address
>A.B.C.D, query the server D.C.B.A.in-addr.arpa and return a name". If
>this is an incorrect assumption, kindly disregard this letter.
It's an incorrect assumption, but a fairly common one :-) I'm not
disregarding this letter because I feel this should be explained better.
The query you're referring to is sometimes called "inverse lookup", but
more correctly referred to as a "PTR query", PTR being the record type
used for turning IP addresses into names. These are normal DNS queries
that just happen to have a strange-looking namespace. The strange-looking
namespace results from DNS hierarchies going right-to-left, but IP address
hierarchies going left-to-right.
When people talk about "inverse queries", they're talking about the FIRST
way people used to do address to name lookup. In an inverse query, you
give it some info and say, "return me what you know about that". So to
get a hostname, you'd give an A record, and you'd get back a hostname.
I believe you could use other info besides A records, ie - lookup all hosts
matching a "SunOS" HINFO record, but I'm not sure about that.
This doesn't scale, because using this scheme it's impossible to find out
the right nameserver to query for a given IP address. So the PTR namespace
was born. Read the DNS and Bind book for more info if you're interested
in the theory.
But occasionally some broken software uses inverse queries to find out
names from IP addresses. For example, Sun's nslookup uses an inverse
query to find out the hostname of the nameserver it's using when it first
starts up. Recent versions of bind will let you set a flag in the named.boot
file called "fake-iquery" that returns "[A.B.C.D]" if you try to look up
a hostname for IP address A.B.C.D using an inverse query - this makes
To sum it up - software that uses inverse queries is broken, and will
hopefully fade away. But inverse address lookups will be supported for
many years to come :-)