DNS record contains two important fields, “Name” and “Data”. Both fields are being used for lookup and this record format applies to all DNS records in all zones. However, despite of using the same format, there are actually several types of DNS records based on their purpose. To help you Understanding Different Types of Record in DNS Server, we’re going to break down the explanation for each type of the DNS record.
Understanding Different Types of Record in DNS Server
In Windows Server 2012 R2, DNS record type can be seen in the DNS Manager. Browse to the zone name, either a forward lookup zone or a reverse lookup zone, and see the records inside that zone. You will see the record type next to the record “Name” in the DNS Manager. Knowing how to see the type of DNS record is the first step towards understanding different types of record in DNS server. Note that there is certain type of record that can only exist in a certain type of zone.
Before we break down each type of the DNS record, it’s also important to understand that DNS record can be a static or dynamic record in terms of how it is being treated.
- Static record — is a record that doesn’t have timestamp information (it will instead have the word “static” printed on its timestamp properties). Static record can only be updated or deleted from the DNS server on-command by the administrator or another program.
- Dynamic record — is a record with timestamp information. Usually created automatically by a client machine that obtains IP address from a DHCP server, or can also be created manually in the DNS server. The timestamp indicates the record validity period, if the record does not refreshed or updated after it passed the time specified in the timestamp then it could be subject for deletion when DNS scavenging event occurs.
And now you can see below are the explanation of each record type to help you in understanding different types of record in DNS server:
Host (A) record
Host record or A record is the most basic type of record exists in the DNS server. A-record serves the basic function of DNS server which is to map a hostname string into its IP address. In A-record properties, the “Name” field contains information about the hostname and the “Data” field will contain the IP address information of the host. For example: “the IP address of host named AS-DCO001 in zone named mustbegeek.com is 192.168.0.7”.
A-record can only be created and stored in a forward lookup zone and can be created as a static or dynamic record. There can be multiple A-records using the same “Name” pointing to different IP address, but it may caused confusion in the lookup result.
AAAA record is very similar to A record, the only difference is that A record is using IPv4 and AAAA record is using IPv6. Every provision that applies in A record applies to AAAA record too, except that AAAA record is mapping a hostname string into its IPv6 address.
Pointer (PTR) record
Pointer or PTR record is the counterpart of A record. It essentially the reverse of A record where the “Name” field contains information of the IP address number and the “Data” field contains the hostname string. PTR record is used to map an IP address into its associated hostname, usually used to find out what host name is using the specified IP address. For example: “the associated host name that is using IP address of 192.168.0.7 is AS-DCO001.mustbegeek.com”
PTR record can only be created and stored in a reverse lookup zone. It can be created manually or automatically as part of A record creation. When PTR record is created as part of A record creation, it will be either static or dynamic record following the A-record. There can be more than one PTR record using the same “Name” pointing to different hostname, but it may caused confusion in the lookup result.
Alias (CNAME) record
Alias or CNAME is mapping of a hostname into another hostname. CNAME is used to create an alias for an existing A record. For example, an alias “service.mustbegeek.com” can be used to point to an existing A-record “AS-SVC001.mustbegeek.com” where the service is hosted.
It is possible to create CNAME record in both forward and reverse lookup zone, either as static or dynamic record. Multiple CNAME can be created pointing to the same A record, but the same CNAME cannot be created more than once. The other thing worth noting is that CNAME can be created in a different zone name than the A record. For example, A-record “AS-XYZ001” is under zone name “mustbegeek.com” and CNAME record “service” under zone “example.com” can be pointed to AS-SVC001.mustbegeek.com.
Mail Exchanger (MX) record
MX record is used specifically for the purpose of sending email. MX record existence indicating the domain is willing to receive email. For example, when a mail is about to be sent to recipient name firstname.lastname@example.org, the sender server will then try to find if any MX record exists in the parent domain mustbegeek.com.
You can create MX record only in forward lookup zone, either as static or dynamic record, and should point to a valid A record or CNAME of the host where the email service is running. For example, an MX record “mustbegeek.com” is found on the domain mustbegeek.com, and it points to a CNAME record mail.mustbegeek.com which ultimately points to an A record AS-MBX001.mustbegeek.com. Multiple MX records using the same “Name” can be created, and each record may point to different A record. Different priority number can be given to each record, and lower number means more prioritized.
Nameserver (NS) record
NS or Nameserver record is another special type of DNS record. NS record is used to point to the name of the server where a zone or domain name record is registered. For example, we can create A record “example1.com” on AS-DCO001.mustbegeek.com. Therefore when I am going to assign the name example1.com to my server, I must create an NS record pointing to AS-DCO001.mustbegeek.com as that is where the A record example1.com is created.
Start of Authority (SOA) record
SOA or Start of Authority, is a DNS record that contains the name of the server that holds all the information regarding a record. It includes authoritative information such as server identification number, the responsible mail address, the primary nameserver, etc. The server referenced in the SOA record is assumed to be in charge of any process on the related record.
Every zone or domain must have an SOA record. When you create a new zone or domain in a DNS server, SOA record is usually created automatically.
Service (SRV) record
SRV or Service record, is a type of DNS record that is used for service discovery. SRV record provides information of what services are available in a particular zone or domain. SRV record has a format for its “Name” value where it starts by the name of the service, name of the protocol, then name of the zone or domain. The “Data” value will contains several information such as the priority, weight, service port number, and the host name where the service is residing.
For example, we can create an SRV record for SIP service that runs on server named AS-SVC001 port 5060 in the domain mustbegeek.com, with priority value 0 and weight value 100. The “Name” of the SRV record will be “_sip._udp.mustbegeek.com” and the “Value” will be “ as-svc001.mustbegeek.com“.
Text (TXT) record
TXT or Text record is a special type of DNS record. It doesn’t used to forward traffic but rather used to provide information about the domain. TXT can be created in any zone as a static or dynamic record. The “Name” value and the “Data” value can be filled with anything as required by a program or protocol.
One of the example use case is to define a protocol named SPF or Sender Policy Framework, where this is used by most of email systems to prove that an incoming email comes from a legitimate domain. So if the domain you used to send email is, let’s say @mustbegeek.com, and you have the TXT record that define SPF value in the DNS server, then your email will be trusted. That’s just one of the example use case for TXT record. There are plenty of other use cases that you can explore.
We can create either static or dynamic DNS record. Throughout this article we’ve covered several types of DNS record such as: A, AAAA, CNAME, MX, NS, PTR, SOA, SRV, and TXT. Of course there are other types of DNS record which is for more advanced purpose. Each type has its own use case and this is why understanding different types of record in DNS server is very important. At the end, most of IT services will rely on DNS, so if you can configure DNS server correctly then your network is good to go.
You may also like -
Latest posts by Arranda Saputra (see all)
- Restore DHCP Server in Windows Server 2012 R2 - January 9, 2020
- Backup DHCP Server in Windows Server 2012 R2 - January 9, 2020
- Configure DHCP Reservation in Windows Server 2012 R2 - January 9, 2020