Most folks working in IT are familiar with using the ping
command to test network connectivity. If you are trying to test the connection between your computer and another, you can ping it from a Command Prompt and test whether or not it replies. This assumes that the firewalls in your computers and network allow the ping to respond correctly, which generally is true. If you are inside a domain network and ping a device by its name, that name resolves to an IP address, which is the device's address on the network. But what tells your computer which IP address corresponds to which name? This is where DNS comes in. Any time your computer makes a request for a name, whether it is you pinging another computer or your Outlook e-mail client requesting the name of your Exchange Server, your computer always reaches out to your network's DNS servers and asks, "How do I get to this name?".
DNS contains a list of records that tell the computers in your network what IP addresses correspond to what names. By far the most common type of DNS record is called a Host record. When the Host record resolves to an IPv4 address, such as 192.168.0.1
, it is called an A record. When the Host record resolves to an IPv6 address, such as 2003:836b:2:8100::2
, it is called an AAAA record. This is usually pronounced quad A.
Understanding how to create and troubleshoot Host records in DNS is something that every Windows server administrator needs to know. Let's take a minute to create and test one of these DNS records so that we can experience firsthand how this all works together.
We have a DC online, which also has the DNS role installed. This is all we need to create the DNS record, but we will also make use of a Windows 10 client computer and a web server to do the name resolution testing.
To create and test a DNS record, perform these steps:
Web1
. Open up Command Prompt and type ping web1
. As expected, because there is no Host record in DNS for this server yet, our ping request does not resolve to anything.
ping web1
again. You will see your output as shown in the following screenshot:
Any time a computer in a domain network requests to communicate with a hostname, DNS is the party responsible for pointing it in the right direction. If you or your applications are having trouble contacting the servers they need, this is one of the first places you will want to look into. Understanding DNS Host records is something that will be necessary when working with any networking technology. If you are working within an Active Directory integrated DNZ zone, which most of you will be, then any time you add a computer or server to the domain, their name will be automatically plugged into DNS for you. In these cases, you will not have to manually create them, but it is still important to understand how that works, in case you need to troubleshoot them later.
In this recipe, we have only talked about the most common form of DNS record, but there are others you may want to learn and test as well. In fact, take a look at our next recipe for information on another useful type of DNS record, the CNAME.
There are a couple of other name resolution functions in the Windows operating system that may cause resolution to happen before a hostname request gets to the DNS server. For example, if someone has created a static name and IP record inside a client computer's host file, it will resolve to the specified IP address, no matter what is in the DNS server. This is because the host file has priority over DNS. Also, there is a special table called the Name Resolution Policy Table (NRPT) that is used by DirectAccess client computers, and it works in a similar way. Name resolution requests pass through the host file and through the NRPT before making their way to DNS. If one of the former tables has an entry for the name that is being requested, they will resolve it before the computer sends the request to the DNS server for resolution. So if you are troubleshooting a name that doesn't resolve properly, keep those additional items in mind when looking for the answer to your problem.
18.225.56.233