Creating an A or AAAA record in DNS

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.

Getting ready

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.

How to do it…

To create and test a DNS record, perform these steps:

  1. There is a new web server plugged into the network, but it is not yet joined to the domain and so it has not been registered to DNS. The name of this web server is 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.

    How to do it…

  2. Now head into the DNS server and open up the DNS console from the Tools menu.
  3. Inside Forward Lookup Zones, you should see your domain listed. Double-click on the name of your domain to see your existing DNS records.

    How to do it…

  4. Right-click on your domain, then click on New Host (A or AAAA)….
  5. Input the server name into the top field and the IP address where it is running into the bottom field. Then click Add Host.

    How to do it…

    Tip

    If you are running IPv6 on your network and want to create a AAAA record instead, you use this exact same process. Simply enter the IPv6 address into the IP address field, instead of the IPv4 address.

  6. Now that our new Host record has been created, let's test it out! Going back to our client computer, type ping web1 again. You will see your output as shown in the following screenshot:

    How to do it…

How it works…

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.

See also

  • The Creating and using a CNAME record in DNS recipe
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.64.178