Welcome to the ITFreeTraining video on DNS records. This video will look at some of the
more common DNS records that are used with DNS. DNS records contain the data that is
requested by the client. Depending on the type of DNS record, this will determine the
kind of data returned to the client and what they can do with it.
There are a large number of DNS records that can be created, in this video I will look
at the following DNS records. Not a complete list but it does cover the more commonly used
DNS records that you are likely to encounter and use in your organization.
To start with I will look at the most widely used DNS record, the A record and Quad A record.
An A record stores the IP address for a DNS name. For example, if a client on the network
wanted to know the address of DC1, it would send the request to its DNS server. The DNS
Server would look to see if it had an A record to match the name DC1. If it did, it would
return the IP address contained in that A record to the client.
In order to resolve computers and devices on your network, an A record is required.
You can see why there are so many A records in a DNS Server. Each device on the network
requires one in order for other devices on the network to obtain an IP address for them.
A records are used for IPv4 addresses. The Quad A records are used for IPv6 addresses.
This is the only difference between the two. Fundamentally they perform the same requirement
of storing the IP address for a name except they do it for IPv6 addresses.
Although an A or QUAD A record can contain all the IP addresses for all the devices on
the network, you may also use them with another record type called the alias record or CName.
An alias record creates an alternative record or alias for another record. This can also
be referred to as a canonical name and thus that is where the name CName comes from.
To consider when you would use an alias, consider on the network you have a server called Web1.
It would be difficult for the users to remember the name Web1 so you create an alias record
called www. Now when a client asks for the IP address of www, they will be given the
IP address of Web1. You may be thinking, could you create another A Record for www? Although
this would work, the problem with this approach is that you now have two records that need
to be changed if the IP Address of Web1 were to change. Having an alias record instead
means that if the IP address of Web1 were to change, the alias record would not need
to be modified. The next advantage of an alias record is that
it can transparently be used to route a user to a server. For example, if you had a second
server on the network called Web2, you could at any time change the CName record to the
second server. For example, if the first server needs to be rebooted for maintenance you could
change the www alias record to point to Web2. Now all client requests for www will be given
the IP Address of Web2. Of course, an approach like this does not take into account a DNS
record being stored in the client cache and using the old IP Address until the cache expires.
The next record type that I will look at is the Mail Exchanger or MX record. An MX record
identifies a mail server for that DNS name. For example, if an MX record was created for
ITFreeTraining.com, this would contain a mail server that could process e-mails for ITFreeTraining.com.
When a mail server has an e-mail that it needs to send, it needs to locate a mail server
that is able to accept mail for that DNS name. It does this by using the MX record. The mail
server will send a query to the DNS server and ask it for the MX record for the DNS name
it is trying to send e-mail to. In this case the DNS server will respond with the MX record
for ITFreeTraining.com. The MX record will contain the server mail1.ITFreeTraining.com.
The mail server now knows to send mail for ITFreeTraining.com to the server mail1.ITFreeTraining.com.
This is how a mail server uses DNS to deliver e-mails to the internet. The MX record also
has a priority associate with it. If there are multiple MX records for the same
DNS name, the MX record with the lowest priority value is tried first. If there are two MX
records with the same priority value the choice of MX record will be random. The mail server
that is used can be any mail server that knows how to deliver mail for that DNS name.
To consider an example, this DNS server has two MX records for the DNS Name ITFreeTraining.com.
Since the left MX record has a priority of 5, mail for ITFreeTraining.com will be sent
to the server in this MX record which is mail1.ITFreeTraining.com. Notice that there is also another MX record
with a priority of 10. What will happen is this, if the mail server mail.ITFreeTraining.com
was to become unavailable, an e-mail server on the internet will still attempt to deliver
e-mail to this server. When the delivery fails, the MX record with the next highest priority
will be tried. In this case, the mail server that is tried next is mail1.HighCostTraining.com.
Notice that the mail server does not need to have the same DNS name, it only needs to
know how to deliver mail for that domain. What will happen is the mail server from HighCostTraining
will hold the e-mail for ITFreeTraining until the ITFreeTraining mail server comes back
online. When this occurs, the e-mail will be transferred. This setup is used by many
companies for fault tolerance. This helps prevent e-mail being lost during extended
outages. A service record indicates the location of
a specific service. For example, Active Directory uses DNS service records to allow clients
on the network to find servers like Domain Controllers on the network.
A service records contains data about the service, the main ones are the following:
Service, Target, Port and Priority. In most cases, service records are created automatically
by the application that requires them, assuming your DNS Server allows dynamic updates. For
example, in an Active Directory environment you could delete all the Service Records for
a Domain and they will be recreated automatically. Not something that I recommend you do in a
production environment. The next record type is the Start of Authority
or SOA record. For each zone created in DNS there is one SOA record associated with that
zone and only one. This record contains information on the primary name server for that zone.
The primary name server is the server that will hold a read/write copy of the zone and
is considered to be the DNS server with the most authority for that zone. It is also the
DNS server that is considered the most up to date server to answer queries about DNS
records for that zone. The SOA record contains the e-mail address
for an administrator for that domain. For publicly available DNS zones, this allows
an individual to retrieve this information to contact the administrator for that DNS
zone. The SOA record also contains a serial number
for that zone. Each time a change is made to the zone, the serial number is incremented.
This serial number is used in order to keep duplicate copies of the zone data known as
secondary zones in sync. If another copy of the zone has a different serial number, the
DNS server knows that it needs to update the copy of the zone data.
The last piece of data stored in the SOA record is the refresh time for that zone. Secondary
zones use this information to determine when they should check for updates for that zone.
If your zone file changers often you may want to consider using a lower value so that your
secondary zones will not be out of date for too long.
The next record type is Name Server or NS. These records contain the authority DNS Server
for that DNS name. This can be a DNS server that has a secondary zone. Even though the
secondary zone is considered a copy, it is still considered to be an authority for that
zone. Name servers are considered to be the best
source of answers for queries for that zone or, in other words, contain the source data
or data copied from the source. To put it another way, name servers do not contain cached
data for that zone. When a DNS record is resolved by a DNS server, the DNS server will contact
one of these Name Servers and keep the result in its cache for a period time. If the data
were to change, the DNS server with a cached DNS record would not be aware of the change
and thus would be giving out old inaccurate information until the cached record expired.
In order to be assured that the latest data is used to resolve DNS requests, the Name
Server records can be used to identify a DNS server that holds this information.
The last record that I will look at in this video is the Pointer or PTR record. This record
provides a mapping between an IP Address and a name. This essentially is the opposite of
an A or quad A record. This essentially means that if given an IP Address, the name associated
with that IP Address can be looked up. These records are used by reverse lookup tools.
Pointer records are useful in cases where you have an IP Address in a log file and you
want to identify which computer or device that IP Address came from.
Pointer records are not required to run day to day activities. For example, they are not
required in order to use Active Directory. Although not required, reverse pointer records
can be invaluable in troubleshooting. Thanks for watching this video from ITFreeTraining.
For more free videos please feel free to subscribe or look at our webpage or YouTube Channel.
See you next time.