Quick Look: DNS Records

If you're in IT then you've likely heard of DNS. Most of us aren't experts in it but perhaps you'd like to know more about it. I'll go over a quick intro to how DNS works at a very high level and then wrap up with a description of the different types of records, or types of information, that comprise DNS.


First of all DNS stands for Domain Name System. Many descriptions compare it to a phonebook but for the internet. It's quite applicable since a phonebook maps names to phone numbers. DNS works very similarly mapping domain names to IP Addresses. 

Computers on the internet communicate using with one another using Internet Protocol Addresses such as 12.34.56.78. Continuing with the phonebook analogy, we don't remember people's phone numbers very often because people generally aren't great at remembering numbers. We use a phonebook that can translate the name of a person or a business to a 10- or 7-digit phone number. DNS works very similarly. In your browser, most people don't type in 216.58.219.228 to search Google. They type in www.google.com. If the browser has gone to the website before, it will store or cache the IP Address so that when you type in www.google.com, it already knows what server to go to in order to request the web page. For example, it's never gone to that website before. Your computer will ask a name server what the IP Address is for www.google.com. This name server likely belongs to your Internet Service Provider (ISP) or your company (if this is a work-owned computer). If this name server knows what the IP Address is, it will pass an answer to the query back to the browser. If it does not know what the IP Address is, it'll ask another name server. If the name server upstream knows the IP Address then it will tell the downstream name server, which will add the address to it's records and proceed to fulfill the request from the client computer that asked it in the first place.

If you're young enough to not really have much experience with a phone book (which is OK. We all have different experiences), a more modern comparison is the Contacts app in your smartphone. Human beings are terrible at remembering phone numbers so we map people's names to phone numbers. I don't think about texting/calling $number. I can only remember maybe 4-5 phone numbers off the top of my head. I just remember the name of the person I want text/call and the contact in my phone knows what number to send to or dial, respectively. 

DNS doesn't do this magically. It keeps all kinds of information about the hostnames & IP Addresses in the forms of Records. Let's look at the different kinds of records below. 

DNS Records
  • The A Record -  The A stands for Address and this is one of the most common records of DNS. Just like in our example above, this is the record that stores the IP Address of a hostname or a domain. The IP Address could be an IPv4 Address (like the example described above), or an IPv6 Address. We can discuss the differences between the two types in another discussion.
  • The CNAME Record - CNAME stands for Canonical Name and this is basically an alias. For example, if you had a server on your network with the hostname of ABCWebLin01 and but you wanted to refer to it as "web" rather than you'd create a CNAME record for that. 
  • The MX Record - The MX record stands for Mail Exchange and is essentially a list of all mail exchange servers that can be used within a domain. 
  • The PTR Record - The PTR record stands for Pointer and maps an IP Address to the CNAME of a host.
  • The NS Record - The NS record stands for Name Server and tells the domain which a name server is authoritative. (discussed in more detail below.)
  • The SOA Record - The SOA record stands for State of Authority and stores important information such as when the DNS zone was last updated, who's responsible for the domain, primary name server for the domain, etc. 
  • The SRV Record - The SRV record stands for Service and is used to indicate which servers in a domain provide certain resources, such as which servers are Active Directory servers in a Microsoft environment. 
  • The TXT Record - A TXT lets an Administrator insert any text they'd like to into a DNS record. These are often used for Sender Policy Framework, DomainKeys, or Zero-configuration networking DNS-based service Discovery (each of which could be their own posts). 
Some additional info about the records info above. 
  • DNS and a name server aren't the same thing. DNS, as stated above, is Domain Name System and is the whole collection of name servers within a domain. A name server is just a single name server. 
  • The name server isn't specifically authoritative or non-authoritative, but the answers to queries are. An Authoritative name server is one that returns answers to queries for the domain in which it's returning a record for. A non-authoritative name server is any other name server. In the example at the top of this post, let's say that the upstream name server was one that belonged to Google. That answer from that name server would be considered authoritative. If it were any other name server (like the one that belongs to your ISP) then the answer would be non-authoritative. Another example would be if you asked me my home address, my answer would be the authoritative answer. Other people can still tell you my home address but their answer won't be the authoritative one. On the other hand, if you asked me my friend's home address, I might be able to tell you the answer but it would be a non-authoritative answer. Only that friend would be able to provide you the authoritative answer to that query. 

Comments

Popular posts from this blog

Installing CentOS 7 on a Raspberry Pi 3

Modifying the Zebra F-701 & F-402 pens

How to fix DPM Auto-Protection failures of SQL servers