Easy! IT | Server | PTR record
Everything might be not exactly correct in this article but it’s very useful for beginners to understand IT terms. If you want to learn IT but you don’t have any experience to work in the IT industry, I wish it helps you to understand IT and you like to study IT more.
Let’s start our 3 minutes lesson!
What is a PTR record?
- PTR records are written in a zone file.
- PTR records are opposite to A records.
- PTR records help to resolve an IP address to a domain/host.
- PTR records are the abbreviation for Pointer records.
I suggest you read the following articles before you read this article if you don’t know DNS well.
DNS: IT Learning | Network | DNS | Japan Teams
Secondary DNS: IT Learning | Server | Secondary DNS | Japan Teams
1. PTR records are used by Authoritative name server
PTR records are resource records in the Domain Name System (DNS). It’s written in a zone file.
There are two DNS servers. One is “Authoritative name server”. Another is called Caching DNS Server. Laptops usually ask Mr Caching DNS server the first question. If he can’t answer the question, he will ask Ms Authoritative name server.
Authoritative name server: IT Learning | Server | Authoritative name server | Japan Teams
When Ms Authoritative receives the question from Mr Caching, she checks her job handbook called “Zone file”. There is much information in a zone file, and one of the information is “PTR record”.
Zone file: IT Learning | Server | Zone file | Japan Teams
2. For what is a PTR record?
DNS has two lookup ways. One is a forward DNS lookup, and another is a reverse DNS lookup. We use A record for a forward DNS lookup and this PTR record for a reverse DNS lookup. PTR is the abbreviation for Pointer. What is a reverse DNS lookup? A reverse DNS lookup looks for a hostname with an IP address, so A PTR record is:
one of DNS records that resolves an IP address to a hostname.
3. How to write PTR records?
How can you write a PTR record in a zone file? Here is the format of the PTR record in a zone file.
“Reversed IP address(XXX.XXX.XX.XXX).in-addr.arpa.” IN PTR “Domain Name(server’s hostname)”
Firstly, I explain “Reversed IP address(XXX.XXX.XX.XXX).in-addr.arpa”. Reversed IP address means reading IP address from right to left. For instance, if the target IP address is 192.168.0.1, then it should be 1.0.168.192. in PTR records. And PTR after IN means that it is a PTR record. And “Domain Name(Server’s hostname)” is the one that is connected to the IP address.
Then the sample is as follows,
1.0.168.192.in-addr.arpa. IN PTR big.meat.com.
This sample indicates that the hostname whose IP address is 192.168.0.1 has the hostname “big.meat.com”.
Information resources are as follows:
What Is A PTR Record? Do I Need To Create One? – Intermedia Knowledge Base, How to format DNS PTR record ? (linuxquestions.org), What is a DNS PTR record? | Cloudflare
fin
|