Home
Posted By: ph8tel Testing A and PTR records on a Mac - 02/09/11 09:14 PM
Hello all,

I am brand new to Mac's and am wondering if anyone knows how to test the A and PTR records from the command line on a Mac, or where I might be able to find the commands. So far google has failed me.

Cheers,
ph8
Posted By: Ira L Re: Testing A and PTR records on a Mac - 02/09/11 10:46 PM
With a variation on "If you have to ask how much, you can't afford it", let me ask what you mean by the "A and PTR records". I've been on Macs for quite awhile and never heard that terminology.

Perhaps it has meaning on a PC system, but uses different verbiage on a Mac?
Posted By: David Re: Testing A and PTR records on a Mac - 02/10/11 04:26 AM
In general, the dig(1) command will return whatever query types you want, or all types.

What, specifically, are you trying to do? Do you have a DNS server running on your own Mac that you are trying to test? Are you testing the configuration of a remote DNS server?
Posted By: Virtual1 Re: Testing A and PTR records on a Mac - 02/10/11 04:28 PM
for example, "dig google.com any" in terminal returns all nameserver records, including A, but I see it doesn't seem to indicate ptr. for that you can do "dig google.com ptr"

you can also use @nameserver to query a nameserver besides your system default / cached
Posted By: tacit Re: Testing A and PTR records on a Mac - 02/10/11 08:12 PM
Originally Posted By: Ira L
With a variation on "If you have to ask how much, you can't afford it", let me ask what you mean by the "A and PTR records". I've been on Macs for quite awhile and never heard that terminology.


A and PTR records aren't Mac or PC things; they are Web and Internet domain name record things.

An "A record" is an IP address that goes with a particular domain name. The A record for finetunedmac.com is "74.53.32.254". When you type a domain name into, say, a Web browser, the browser goes toy our name server, asks for the A record for what you typed in, and then connects to that IP address.

The PTR is just the reverse. It is the "canonical name" associated with an IP address. Since many Web sites can live on one server, or many different services (like FTP or Web or SSH) can be associated with one IP address, the "canonical name" is the top level name associated with an IP address--the name of the server that multiple web sites are living on, for instance.

The A record for finetunedmac.com is "74.53.32.254;" the PTR for 74.53.32.254 is "root.gator255.hostgator.com". That tells you that finetunedmac.com is living on a server at IP address 74.53.32.254, and the full canonical name of the server it is living on is root.gator255.hostgator.com.
Posted By: Ira L Re: Testing A and PTR records on a Mac - 02/10/11 10:17 PM
Nicely and clearly explained. Thanks.

Posted By: alternaut Re: Testing A and PTR records on a Mac - 02/11/11 01:06 AM
For the record: List of DNS record types.
© FineTunedMac