How to a dig -x to return A records and CNAMES
Barry Margolin
barmar at alum.mit.edu
Tue Dec 20 20:38:30 UTC 2005
In article <do9p4c$1v2s$1 at sf1.isc.org>,
"Beast" <adamnealis at yahoo.co.uk> wrote:
> Hi,
>
> If this is a FAQ I apologise, but I couldn't find an example.
>
> I have a "forward" domain mydom.net, in which I have an A record and a
> CNAME like this.
>
> tc23.test.mydom.net. 1800 IN CNAME sol41.mydom.net.
> sol41.mydom.net. 1800 IN A 10.144.114.170
>
> I have corresponding PTRs in another zone file:
>
> 170.114.144.10 IN PTR sol41.mydom.net.
> 170.114.144.10 IN PTR tc23.test.mydom.net.
>
> So when I dig, I get
>
> $ dig +short -x 10.144.114.170
> tc23.test.mydom.net.
> sol41.mydom.net.
>
> Which is cool, but a chore to maintain as I have to add PTRs for A
> records and CNAMEs.
>
> Is there a way to configure things such that one need only add a PTR
> for the A record and the dig above returns both A and CNAMEs?
PTR records are only supposed to point to primary names, i.e. names with
A records. You shouldn't have the PTR record that points to the alias,
and you shouldn't expect the reverse lookup to return it.
In general, there's no good reason for a PTR lookup to return more than
one name. Most applications that do reverse lookups only use the first
one that's returned. See the recent thread "Random DNS-reply" for the
confusion that can result.
--
Barry Margolin, barmar at alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
More information about the bind-users
mailing list