A DNS configuration file can look a bit daunting without understanding the resource records. In this video, you’ll learn about the address (A), canonical name (CNAME), mail exchanger (MX), and pointer (PTR) DNS records.
<< Previous: An Overview of DNSNext: Dynamic DNS >>
Earlier video, we talked about the domain name system process. We talked about the servers that you would communicate to. But we really didn’t talk about the internals of those servers. Those servers are running DNS software. And that software has a number of records that it uses to provide you with information about name servers and IP addresses. These are called resource records, or RR. These are all of the different records for all of those different devices that you might run into.
And there are a lot of different record types. There are over 30 record types. Some of them will tell you about IP addresses. Others tell you about certificates. Others tell you about name servers, alias names, and so much more. And in this video, we’ll step through what some of the most used DNS records are.
If we were to log in to a DNS server and look at its configuration, we would find a forward lookup file that looks something like this one. You can see this is easy to read. There are different sections. And a lot of this may be pretty clear of what it’s trying to tell you. Everything that we need to configure is in this text file, which also makes it very easy if we need to make a change to any of these settings.
If we look a little closer at the configuration file, we can see some comments, like a list of machine names and addresses. And these must be the machine spock.mydomain.name. We have a Mail. And we have a Kirk. And we can see IP addresses that appear to be associated with those as well. And once we step through this, not only will these names and IP address be clear to you, but you’ll also be able to figure out what everything is in the middle, as well.
One of the most common records in a DNS serve– and, from our perspective, one of the most important– is the A record. A stands for Address. And this is how we ultimately define a name with an IP address. An A record is an IP version 4 address. That as what we commonly will see and use on the internet, although IP version 6, of course, is becoming much more popular as of late. So we have A records for IPv6, as well.
There are quad A records. AAAA is what you will see in that DNS lookup file, instead of just a simple A that designates IP version 4. It’s all in the same configuration file. It’s the same DNS server. It’s just a different record that we would put inside of the server itself.
Here’s an example of an A record that might be for my web server. So you have www.professormesser.com. The IN stands for internet. There’s the A for the A record, which means this must be an IP version 4 address. And indeed, it is– 18.104.22.168. And there’s a semicolon there to put some remarks or different information in the file so that you can remember what it is for later, and to simply have my name right after that.
If there are other IP addresses and names that you’d like to add, you simply add additional A records to the file. And that DNS server can now provide anybody with information about these A records that you add.
The domain name system also allows us to name a single device but give it multiple names. Give it a nickname. Give it a secondary name. Add as many extra names as you would like. And they can all associate back to one individual device. And you can see an example of this as something called a canonical name record, or CNAME. This is something like gopher on the internet. The CNAME is mail.domain.name. But if I use FTP as the name, it also refers to mail.mydomain.name. And www also refers to mail.mydomain.name. That way, we can have names that are familiar to people and things that people can find easily, but point them all back to a single server that’s providing access and services for all of those different applications.
If you’re in an organization, really, of any size, your email is so very important. Email has to be able to go between email server to email server. How do those servers know where to send the email? They ask the DNS server, of course. Inside the DNS server is a special record called the mail exchanger record, or the MX record. This is how all of these devices know where to send your email. So this is a very important record.
If you were to look at the mail exchange record, it’s very simple. There’s IN, MX, for the mail exchange, and then the name of the mail server. And that’s it. You don’t have to define anything else. Later on in the configuration file, you will have an address record that associates the name of that particular server to a specific IP address. So the MX record, relatively simple, but very important if you want to be able to receive your emails.
Another useful DNS record is the Pointer record. You can think of this as the opposite of an address record. An address record took a name and provided you with an IP address. A Pointer record means that you can provide an IP address and come up with a name. And offhand, this doesn’t seem like something that you would use a lot. There are certain applications that use this capability to be able to transfer information between services.
You can see this information in a reverse map zone file that I have here. And really, it’s this part down at the bottom, where you’re adding in an IP address for a particular subnet. Here’s our IN for internet, the PTR designation for the Pointer record, and then you’re simply assigning names where you happen to have an IP address for that particular subnet.
Hopefully, that’s given you an idea of what you can expect if you look at the configuration of a DNS server. Should be able to now recognize some of the most popular records, and be able to understand what those records are doing inside of that server.