"dig" give no Hostnames back

Bill Larson wllarso at swcp.com
Thu Aug 28 13:49:36 UTC 2008


Lots of stuff deleted:

On Aug 23, 2008, at 8:38 AM, Michelle Konzack wrote:

> Hallo,
> if I use "host" I get:
...
> [michelle.konzack at tp570:~] host -t PTR 192.168.0.70
> 70.0.168.192.in-addr.arpa domain name pointer mail.private.tamay- 
> dogan.net.
...
> ----[ command 'dig PTR  
> 192.168.0.70' ]----------------------------------
> ; <<>> DiG 9.3.4 <<>> PTR 192.168.0.70
> ;; global options:  printcmd
> ;; connection timed out; no servers could be reached
> ---------------------------------------------------------------------- 
> --
>
> ???  --  What is now broken?


You apparently are running "dig PTR 192.168.0.70" as your command.

"dig" doesn't hold any hands, or very few.  You are asking for a PTR  
record for the NAME "192.168.0.70".  It doesn't automatically assume  
that you are referring to an IP address.  There are two ways around  
this "problem".

First, you can create the actual "in-addr.arpa" name that you really  
are interested in.  You can run:

	dig PTR 70.0.168.192.in-addr.arpa

where you have reversed the IP address and fully qualified it with  
"in-addr.arpa".  This will return the "PTR" record.

Second, and highly recommended, run:

	dig -x 192.168.0.70

The "-x" option tells "dig" that you are supplying and IP address  
rather than a name, and "dig" will generate the appropriate "in- 
addr.arpa" name to query.    Also, since you are providing an IP  
address, "dig" will perform a query for a "PTR" record and you don't  
need to supply the record type ("PTR") for "dig" to query for.

Nothing is "broken".  Its all in the man page for dig.

Bill Larson


More information about the bind-users mailing list