Cloud Domain Name Service (CloudDNS) 8.3.0 Usage Guide (for Huawei Cloud Stack 8.3.0) 02
PTR Record (for Reverse Resolution)
PTR records are used for resolving IP addresses to domain names. This process is known as reverse DNS resolution, which is the reverse of forward DNS lookup. You can add PTR records for a record set to map private IP addresses to domain names.
An IP address can be used by multiple domain names. Therefore, the domain names corresponding to an IP address must be checked before reverse resolution. It brings huge workload for the system if the entire DNS system is traversed for the IP address. Therefore, RFC 1035 outlines the definition of PTR record (Pointer Record) that PTR is a data type of email system that points an IP address to a domain name, unlike an A record which points a domain name to an IP address.
Configure a PTR record as follows:
- Create a PTR private zone.
For example, the IP address segment 192.168.0.0/24 represents 255 IP addresses from 192.168.0.1 to 192.168.0.255, and the PTR private zone corresponding to these IP addresses is 0.168.192.in-addr.arpa.
The name of a PTR private zone starts with the IP address typed in reverse order and ends with .in-addr.arpa.
For example, if the IP address is 192.168.0.10, the private zone name is 10.0.168.192.in-addr.arpa.
- If the private zone name you specified is 192.in-addr.arpa, enter 10.0.168 as the host record.
- If the private zone name you specified is 0.168.192.in-addr.arpa, enter 10 as the host record.
- Add a PTR record.
In the record set 0.168.192.in-addr.arpa, add a PTR record for each IP address in the IP address segment 192.168.0.0/24.
- If the IP address is 192.168.0.1 and you add a PTR record with the host record set to 1 and the host name value set to hostname1.example.com, the reverse DNS lookup result of 192.168.0.1 is hostname1.example.com.
- If the IP address is 192.168.0.2 and you add a PTR record with the host record set to 2 and the host name value set to hostname2.example.com, the reverse DNS lookup result of 192.168.0.2 is hostname2.example.com.