Microsoft has integrated DNS into Active Directory and in turn, AD depends on DNS. We will look at this interdependence but focus on DNS. We will look at troubleshooting DNS using Windows utilities and PowerShell. We will explore how AD zones are stored in DNS and what they mean. We look at recursive resolvers, stub resolvers, forwarders, delegation, subdomain, glue records, and a review of the dcdiag.exe for troubleshooting DNS. We will explore DNS benchmarking.
Hello, my name is Lowell Vanderpool and this channel is dedicated to IT students,
IT professionals, and anyone who enjoys learning technical subjects.
Integrate it into your Active Directory domain controllers. So when we talk about DNS,
understand it's a globally distributed, loosely coherent, scalable, reliable,
dynamic DNS name to IP address database. Okay, Mr. Vanderpool, what are you talking about,
loosely coherent? Well, a distributive database means there's no single point of control.
DNS is loosely coherent because there's no guarantee that all the name servers on the
internet have the same information about any one domain name. They usually do,
but it is not a guarantee. It also means that loosely coherent nature of the system,
that you can have issues and delays. So that's what we mean by loosely coherent.
So when we think of DNS, what functions does it perform? Well, obviously it translates domain
names to IP addresses, host names to IP address, load balancing, email routing, reverse DNS lookup,
I know the IP address and I need to know the domain name, caching, zone transfers,
and authentication. DNS servers come in all sizes from monsters to tiny. Often for students in IT,
they haven't quite grasped what DNS is. Well, what it is not, it's not an operating system.
It is software running on either Windows, BSD, or Linux. Now the most de facto standard DNS
software is known as BIND, B-I-N-D, and the latest version is 9. Now there are many other versions of
DNS software. CoreDNS, KnotsDNS, Secure64DNS, Microsoft has their own DNS software. There are
many, many free and open source versions of DNS software. We'll get into this, but many times
it makes sense for a company to buy a DNS server appliance like the three that I've got on this
slide. Blue Cat Networks has a DNS appliance. Now that has the operating system, the software,
and those are pricey. Some of these are $8,000 each plus yearly maintenance fees. Some of the
appliance, this DNS box, runs about $3,000 plus yearly maintenance fees. You can buy a DNS
appliance and we'll talk about why you would want to do this versus setting up your own DNS servers.
Here's a common DNS server interface for one of those appliance servers. DNS server software,
not your client DNS software, but your DNS server. It's called test-connect-computer-name
and then the name of your domain controller, which will have DNS on it, dash port 53. And
that's a TCP ping to that port. And it will come back, TCP test succeeded is true. That means
there's software that's responding to that ping of the software. So that's a quick test in PowerShell
for your DNS server software. DNS is a client server application and typically runs as a service
in Windows and a daemon in Linux. And it can run on just about any type of computer.
Requests and responses are normally sent via UDP port 53. But when I'm copying my DNS database from
one DNS server to another DNS server, those are called zone transfers and those use TCP port 53.
So we have DNS servers out on the internet. You're using them every day. And then we have
DNS that's integrated into Active Directory. So what's the difference between those two DNS
servers? Well, let's take a look. Now the DNS server that you run on your domain controller
is integrated with Active Directory. DNS leverages Active Directory's security features,
authentication and authorization to DNS records. DNS automatically replicates DNS records using
AD replication services. And DNS scales as configured on each domain controller. So as
you deploy more domain controllers, DNS grows and scales and can be configured for load balancing
and failover. Simplified administration via GUI, command line or PowerShell tools across
a Active Directory force makes administering DNS in Active Directory very straightforward.
Let's talk about basic DNS terms and concepts. One of the terms is called a stub resolver. And
that's the DNS software that's on your Android phone, on your PC, on your Linux box, on your
Mac OS. That's called a stub resolver. The first DNS server that you talk to is called a recursive
resolver. And that's typically where Active Directory and DNS on a domain controller sits
right there. We're going to have a DNS root name server and a DNS top level domain name server,
and then an authoritative DNS server. Now as an employee of a company, you're going to probably
deal with many types of DNS servers. The DNS recursive resolver, which is going to be your
DNS software integrated into Active Directory on your domain controller. You're going to have
an authoritative server that hosts important information about your company. These are two
separate types of DNS servers. They have many things that they share in common. And yet there
are many things that they are going to be very different from each other. They are DNS servers
that have a different purpose and role in your company. And we're going to cover that. One is SRV
records. Active Directory needs SRV records from DNS. It also needs to leverage the dynamic update
protocol. In all truth, Active Directory cannot function without DNS SRV records.
Active Directory needs to advertise critical AD services to clients and applications. SRV records
help clients find domain controllers, Kerberos services, LDAP services, and global catalogs,
and more. Now on a domain controller, there is a file that contains the necessary resource records
for AD to function correctly. And it's generated in the same location that your registry is found.
Let's go take a look at it. So here's my domain controller and it's got DNS. I'm going to go to
my explorer and I'm going to go to C drive. Windows. All of you should be very comfortable
as to where your registry files are located. System 32. And we'll go to the config folder.
And in there is another file that is not normally found on a Windows PC or member server. And it's
called netlogon.dns. That's a very important file. That file is used by NetLogon service on the
Windows Server Domain Controller. And it registers DNS records for Active Directory. NetLogon.dns
file should never be edited manually. So I warned you. When we say DNS is integrated into Active
Directory, and Active Directory is integrated into DNS, it's true. Active Directory is dependent
on DNS for the location of its domain control services and more. DNS dedicates a DNS zone
just for records for Active Directory. Active Directory stores DNS zones in its ntds.dit
database or its JET database. And then it uses its replication services to replicate that
information throughout the domain. Now, Active Directory supports net bias naming as well as
DNS fully qualified domain names. So up here, you can see I'm looking at the settings of my video
server, and it's got a name amdve. That's the net bias name. And yet the fully qualified DNS
name is amdve.homelab.techsavvyproductions.com. So Active Directory will support both naming
systems. Now, in the past, if I was Samsung, and I had a DNS domain name of samsung.com,
it would be natural for me to build an Active Directory forest domain name that was the same
as my DNS public facing name. That was very common in the early years of Active Directory.
Not so anymore. So whatever your public facing DNS name for your company, cocacola.com,
samsung.com, when we get to your Active Directory forest domain name, totally different. Let's take
a look at some of the reasons why. One, security. Using a different domain name for Active Directory
can help a little bit in improving security by keeping your internal network separate from
public facing networks. Legacy. A company may have started with a different domain name for
Active Directory in the past, and now it may be difficult to change it. Acquisitions. A company
acquires another company with its own Active Directory domain name, and it's probably easier
just to keep the two names separate. And then branding. I have a public facing DNS name for my
brand, and I may use a different one for my internal network. Now, one thing for sure,
as you get into DNS and Active Directory, they constantly use the word namespace.
So for DNS namespace, namespace is our way of describing the DNS hierarchical method of giving
names to groups and objects. For example, novell.com, ucll.edu, whitehouse.gov, army.mil.
They're namespaces that give the hierarchy of DNS, and they give names to groups and objects.
Now, Active Directory namespaces, which are talked a lot about in Microsoft documentation,
they use LDAP naming conventions. If you look at the graph at the top right,
those naming conventions are very different than the way that DNS uses this naming convention.
Its naming convention is based on LDAP and is deliberately different from DNS, so there is no
conflict between Active Directory namespaces and DNS namespaces.
Now, namespace for DNS is very important. Here's the fully qualified domain name for
my video server. At the end of the name is a dot that indicates the root domain,
and it is never shown and it's never written, but it is assumed you understand there is a
dot there, and that indicates the root domain. Then we have the top-level domain, which is a
.com, .mil, .org, .net, and those indicate a group of companies, organizations that use that common
top-level domain name. It's at the second-level domain name that we get uniqueness. We start
getting the company's name, the organization's name, the brand name, and then next you'll see
a dot and here's where you'll see www, say for a website. In my case, the homelab is the prefix
for my Active Directory forest domain. And then one more dot and my hostname.
One last concept of DNS namespaces is in homelab.techsavvyproductions.com.
techsavvyproductions.com is a suffix. Homelab is a prefix. Now in my case, I register to the
internet techsavvyproductions.com, my suffix. DNS zone is a portion of the DNS system namespace
that is managed by a single administrative entity. We will look at a basic Active Directory DNS
system and it has many DNS zones by default. One of them is dedicated to Active Directory.
In each of these zones are going to be resource records that DNS resolves IP addresses to names
and names to IP addresses. Now all zones begin with a start of an authority record. So you'll
always see an SOA record in every zone. Now here on the graphic on the left, I've actually
opened up the property of a zone and I've checked the tab that shows me the start of authority
record. The SOA record is DNS metadata. It stores various things that may be of interest to that
zone, like who is the email address of the guy that runs this zone or the server that resolves
this zone. It also has values that describe how or if a zone needs to be replicated. And finally,
the SOA record has a number that influences time to live values for names that don't exist.
So here is a zone in my Active Directory DNS server and it's homelab.techsavvyproductions.com.
That's the zone. And you'll notice over in the details pane, there's a start of authority record
SOA. Here's another zone in my Active Directory DNS and it's a reverse lookup table. And notice
it's a zone and in the detail page, it has an SOA record. So all zones have an SOA record.
Now, PowerShell has a great tool to pull up all your DNS zones on any domain controller.
Get-DNSServerZone-ComputerName and then, of course, your domain controller name.
And it's best to use the fully qualified domain name and voila, there's all your zones.
Now, I just did you a disservice because I just showed you a cmdlet that is part of the DNS server
PowerShell cmdlet tools. If you try to run that on your workstation, it's going to go
not work. So you're going to have to either remote desktop in your domain controller
or you can download RStat and then get those PowerShell modules to do this on your workstation,
but I'll show you a better way. So you can use the Windows PowerShell remote commands.
You can start an interactive session right on your workstation by doing enter-pssession and
then, of course, the name of the domain controller that you want to work with.
And once you get your prompt, you'll be on that DNS server and you can do whatever you want with
those DNS PowerShell commands. Now, don't forget to exit that remote PowerShell session. So,
exit-pssession will close that out. Otherwise, that session will run on the remote server until
you reboot and you don't want to do that. While we're on the topic of troubleshooting,
let's take a look at some of the built-in troubleshooting features built into the DNS
software. So I'm going to come up to the DNS software and I'm going to right mouse click
on the name of my DNS server, my domain controller, and go to properties. And here,
you have debug logging as one of the tabs in properties. And just look at the debug logging
that's available. You can look at packet direction, transport protocol, packet contents, packet type,
amazing, and other options. And you can store this on a file on another server,
say your administrative workstation, and save that log information somewhere else.
I would not save it on a DNS server or a domain controller. I would put that logging information
somewhere else. In the same properties dialog box, I have a tab that says event logging,
and I can log all events, events with warnings, and you can see the various options. So,
this gives you the ability to look at all events related to DNS. And to top it off,
another tab called monitoring. And I can actually select a test and it will actually test a simple
query against this DNS server. So, we'll go ahead and do it and it passed. I can do a recursive
to another DNS server. We'll run that test and it passed that also. So, this is simple and it
can even perform automatic testing at the following intervals. So, this is all built in,
ready to go. You don't have to add anything to your domain controller. You've got some nice
troubleshooting tools right here in the DNS software. One of the first videos that I did
for this channel was called DNS Explained, and it's all about DNS root servers. If you want to
learn more about DNS root servers, I promise if you watch it, it's a relatively short video,
you will learn things about root servers you never knew. Now, here's an interesting fact about zones.
There's only one zone guaranteed to exist on the internet, and that zone is shown in the blue.
It's actually the full name of that zone that is guaranteed to exist on the internet. Now,
in every zone, there are records. In that zone database are going to be records, A records,
which maps a hostname to an IP4 address. Then we have AAAA record, which maps a hostname to an IP6
address. And then we have CNAMEs, which are like aliases, or MX, which is our mail servers,
NS, which is our DNS servers, pointer records, and SOA. We have already talked about the SRV,
very important to Active Directory. So, these are the types of things that are found in these zone
databases. So, here's my Active Directory DNS server, and you can see my zone,
homelab.techsavvyproduction. Over in the details pane, you see A records, NS records,
CNAME records. Those are the things that you're going to find in your zones. Now, it's often
helpful to see all the resource records that are in a zone. So, PowerShell gives you that ability.
You need to run this DNS command like the one we just saw before on a DNS server. It's get DNS
server resource record-zone name, and then your zone name-computer name, your domain controller,
and it just lists all the records in that particular zone. When we talk about DNS using
DNS language, our Active Directory DNS server that are integrated together performs a function
called DNS recursive resolver. So, if we want to understand in the world of DNS terminology,
where does my Active Directory DNS server fit in? It is a DNS recursive resolver.
Now, when you go home at your house, you're using your ISP that provides a recursive resolver. Most
of us don't have a DNS server at home, so we depend on our ISP to deliver that recursive
resolver. As we look at all the types of DNS servers, the one server that does the heavy
lifting of DNS activity is the recursive resolver. It's the one that takes the request
from the client, goes to a root server, the top-level domain. It does whatever it has to do
to get an answer back to the client. It does the heavy lifting. In the world of Active Directory
recursive resolvers, for the most part, these DNS servers resolve all the requests for DNS
information within my internal network. You can configure your recursive resolver with Active
Directory and DNS to be the recursive resolver for every need of your clients, mostly internal
DNS requests. But if they need to get to Microsoft.com, you can configure your DNS server,
as you can see on the right-hand side in the graphic. I have told my DNS server, if they ask
you for something you don't have inside your internal network, you can go to any one of these
root servers and begin the request for the root server, the top-level domain, until you give them
the answer. This is an Active Directory DNS server that is designed to do exactly what we ask. The
client in our network is asking for example.com. Our DNS server is the DNS resolver. It goes to
the root server, then the top-level domain server, then it tries to find this example.com
authoritative server, then passes that information back to the client. You can set your Active
Directory DNS server to do this. This is not always preferred. In many cases, my Active Directory DNS
needs to be taking care of all the needs on my internal network. But if you want information
about www.microsoft.com, I'm going to point you to forwarders, someone else to do the internet
resolving of that domain name to IP address. You can see here on my graphic on the right,
I have configured two forwarders, one to Cloudflare and one to Quad9. So anytime a client
comes to me and says, I want Microsoft.com, I send them to Cloudflare to be a recursive
for the internet. My internal network, I'll take care of. But anything external, they go to
Cloudflare to get that resolved. So in this case, Cloudflare and Quad9 are actually my recursive
resolvers for outside my organization. Anything within my internal network, I'll give them the
answer. Anything outside of our organization, they go to Cloudflare or Quad9. To understand
DNS servers within our organization, you will have many different DNS servers in your
organization that you're required to maintain, but they have very different functions. We've
talked extensively already about our DNS servers integrated into our Active Directory and that they
typically take care of our internal network. And then if we need to resolve names to IP addresses
outside of our organization, in most cases, we'll use forwarders or another DNS server to take care
of that. Here, I've got an organization that's got an authoritative server outside of the
organization. It's beyond the company's firewalls and DMZ. And then I've got a DNS server that's
right in the DMZ between two firewalls. The DNS server in the DMZ is going to take care of things
like how to connect to your organization's email, how to connect to your VPN server, how to connect
to various functions that public facing entities, people that are on the internet, may need to be
able to discover about your organization. What I don't have on that DNS server on the DMZ is
anything about my internal network. That is reserved entirely for those Active Directory DNS
servers. This authoritative server that's outside of my entire company's network, that I may delegate
to something like we have brands, we have many website brands that need to have an authoritative
server. We have our corporate website, and then we have all these websites that represent brands
that our company offers to our customers. So those are just an example of, yes, they're all DNS servers,
but their purpose and their placement in our network is very different. Now, the way that
companies and organizations use their DNS can be from simple to complex. Here's a complex structure
of a DNS system for a company with data centers, remote offices, and if you pause, take a look at
how they've organized their DNS servers. So DNS can be complex depending on the company, as well
as just a simple DNS server. This is a design for DNS servers that includes a lot of comprehensive
load balancing, failover, and redundancy. You can see in my internal network, I've got hidden masters,
internal slaves, internal caching only. Then I see my DMZ. I've got a caching only DNS server in there.
All the blue boxes are DNS servers. Then my big bad internet, I've got a number of other external
slave DNS servers. Then in my co-location, I've got external slaves and caching only DNS servers.
Each of these are giving you examples of different designs and ways that organizations can employ DNS
servers. So here's another layout of DNS servers in a company. You can see it can get complex
depending on that organization's strategy to employ DNS services within that company.
Now, a term you don't often hear, but is important in DNS terminology is the term stub resolver.
And that means that's your DNS client software. On your Windows 10 or Windows 11, you have a
stub resolver. It's typically a service. And I've got on the left, you can see the service view.
And if you've got your DNS client, it's usually a small software module that resides on a client
device. It can be on your mobile phone, your iPad, whatever. The stub resolver does not perform
any recursive lookups itself, but still have information on how to find that recursive
resolver and ask it to do the heavy lifting, go find the information that I need.
Now, caching is very important to DNS. Caching is basically saving information that we have
discovered in our DNS queries at different points in our DNS systems. So look at my Chrome browser.
Your Chrome browser, if you use Chrome, will cache DNS information up to about 60 seconds.
Now, your Windows 11 DNS client will cache DNS information that it is requested and it's been
returned up to two hours. Now, typically a DNS recursive resolver will cache information that
it has discovered up to about one hour. So caching is very important to DNS. Now, Active Directory and
DNS integrated takes two complex software modules and puts them together. So we need a complex
diagnostic tool to help us solve this very interdependent system, Active Directory,
replication, and then DNS. And Microsoft gives us that tool. It's called DC-DIAG. I'm going to go
ahead and take a look at help. And the help of DC-DIAG is, well, you can see it's pretty extensive.
When I stood up my Active Directory here at home, I used this tool with all of its testing
to thoroughly go through my setup of Active Directory, use all the error messages that
were generated to help me solve all my misconfigurations and anything that I needed
to fix and repair so that I could get my Active Directory diagnostic to run with absolutely no
errors. Then I knew my Active Directory was properly configured. Now, I like to run this tool
probably monthly just to check the health of my Active Directory, but it's powerful in checking
DNS. So we're going to run some of the DNS tools using this diagnostic. So DC-DIAG forward slash
test colon DNS. And this is going to run just the series of tests on DNS. It's looking at connectivity
so notice right away we see it's trying to find a home server. It found the home server, which is
the one that I'm on, identified the AD forest, gathered some initial information, testing the
first server, starting with connectivity, testing the default first site server, which is again this
starting some DNS test, running partition test on the domain DNS zones, the forest DNS zones,
schema configuration on the partition of Homelab and test on the Homelab techsavvyproductions.com
and it has completed that test. So this lets me know that my DNS system is functioning correctly.
I prefer to run this same test, but a little bit different. I'm going to add the verbose. I'm going
to call up my previous command and I added a forward slash V, which is going to give me verbose
information. Now I could redirect this to a text file. Just put it in the root temporarily and I
test.txt file. Now I like to redirect the output into a text file so that I can then carefully go
through the results really easily with a good text editor. So let's go ahead and do it. And it's
running a test now and dumping it into this text file. So we can see we're done. We're back to a
prompt. We'll open up our Explorer and I'm at my root of C and there's my DNS test text file.
I'm going to open that up. Now I can take my time and walk through exactly what took place.
So I can see all the activity as it tested various zones and basic information within DNS.
It's indicating what tests I did not do. Here we're looking at all those partition tests that
ran. Previously when we ran this test, we didn't see things like this. Net logon service is running.
We also see the DNS cache service is running. So we're seeing a lot more about what it is looking
for in this basic test. Here I'm seeing the SOA record for Active Directory was found.
It also went to look at my forwarders and it looked at Cloudflare and Quad9 and said,
yep, they're valid. It tested my delegation. It also tested my dynamic update.
It looked at A records. It looked at SRV records and then a summary of the test.
So this is a very good test for DNS as well as how well it's integrating with Active Directory.
Remember DC DAG is your number one health check tool for both Active Directory and DNS.
If you're watching this at this point in the video, you are a hardcore technology person.
90% of the people who are on YouTube who watch a video that I create are gone in three minutes.
So the fact that you're watching me right now tells me you're pretty hardcore and you're the
very reason we do all the work, all the video editing, all the preparation is because of you.
You're the person we're after. You want to learn. You want to understand and you're willing to watch
25 minutes, 30 minutes of just geek stuff. And we really, really appreciate you.
One way that you can help us tremendously is support us by liking a video and subscribing.
It's simple, two clicks and it doesn't cost you anything. And it really, really helps us.
If you can join, that's great. It really does help us. It's $2 and something and a month.
That's a cup of coffee a month. We really, really appreciate it. But it's more important if you can
like and subscribe and it's the best way of supporting this channel.
Now, Microsoft integrates DNS into Active Directory and it creates special subdomains
or zones for AD. These special zones always begin with underscore MSDCS and then the name
of your zone. They will help Active Directory locate domain controllers, global catalog,
very important primary domain controller, which is a legacy concept brought in from NT4O,
and then domains using GUIDs. Now, this subdomain is used to find LDAP servers running TCP.
The name underscore MSDCS is a single keyword chosen to avoid cluttering up the DNS namespace.
Notice we have PDC, DC, GC, and they were kept very short, not to exceed the maximum
length allowed for a DNS name. Now, here I have this special zone in the graphics.
On the left-hand side, you'll see me opening up this special AD zone and I'm looking at DC,
and then I've drilled down into TCP. On the detail side of this same graphic,
you'll see the SRV records and you'll notice they also have port numbers, TCP port numbers.
Now, the Kerberos protocol for both TCP and UDP is port 88. The protocol may be used for other
ports such as 464, and that's for changing Kerberos password, and port 749 for Kerberos
administration. Now, LDAP uses TCP, UDP ports 389 for encrypted communications, and it uses
port 636 for secure communications using SSL over TLS. Now, in your zone, you will also have
site-specific DNS resource records that use a slightly different format. Now, in this example,
I'm pointing to a service record, SRV record, and this is to map the name of a service,
in this case LDAP, to a DNS computer name of a server that offers that service. And in most
cases, that's going to be a domain controller. Now, I've opened up the properties of that,
that SRV record, and you can see it points to a TCP port number, it communicates who is the LDAP
server, and it gives that name, and this record can stay in cache up to 10 minutes. So, there's a
lot of metadata in this SRV record. Also in this SRV record, we see priority, clients contact the
server with the lowest priority. Over on the weight value, that has to do with load balancing.
Now, I just showed you in the SRV record where we can give priority so that clients connect to a
specific DNS server, but we don't normally use that way. We typically will assign via DHCP server
the first DNS server in the list of DNS servers is what the client prefers to go to. We have a second
DNS server that is for failover. So, if the first DNS server is down, it knows where to find the
second one. We can also force the client to a particular DNS server in group policies. These
are probably the more preferred method of assigning clients to a DNS server. Now, I've mentioned this
before, but on your domain controller, you have a service called NetLogon. When a domain controller
starts up, the NetLogon service uses the dynamic update to register your SRV and A resource records
in the DNS database. Now, NetLogon also registers a DNS alias or a CNAME record for use by Active
Directory replication, and that value is a good value. Now, the concept of delegation is very
important in DNS. Now, here in my example, I have a parent domain called example.com,
and then I have a subdomain to my parent or a child domain, and it's called sub.example.com.
In my parent DNS servers, I have to put information in there so that other external entities are able
to locate this subdomain. And here you can see in my parent DNS server, I've added the subdomain
information as well as I've added the two DNS servers in the subdomain inside my parent,
and I've highlighted them. These records are known as glue records. This is DNS information
in the parent that points to a subdomain. Now, we have explored a little on the different
roles that DNS servers can play. Let's take a look at the roles of DNS servers as we load a
typical web page. Now, the client is not considered a DNS server. It's a stub resolver.
The first DNS server that we connect with is the DNS recursive resolver. Remember,
that's the one that's doing the heavy lifting. Then the DNS recursive resolver will then reach
out to the root name server for information about the top-level domain name server. Then we'll go
to that one. The top-level domain server will then give us some information on an authoritative
name server of the web page that we want to get to. And then we'll pass all that information back
to the client, and the client goes off and hits the web page. So, this is kind of what we have
when we go after a web page. Recursive resolver, DNS root server, top-level domain, and some
authoritative server for a company, organization, whatever. This is kind of the sequence, client to
DNS resolver, DNS resolver to root, back, and then top-level domain, back. Then ultimately,
the authoritative name server, back, passes that information to the client, and then the client
goes to the website. So, let's look at the troubleshooting of a DNS resolver. Because
if that goes south, everything else in this process is going to either fail or it gets
very, very slow. So, my first test is a utility called nslookup. And I'm going to ask nslookup,
which is a DNS tool, to look up the domain controller which has DNS on it. So, we're going
to go win. And at the top, I see it went to win2016dc3, and it gives me a fully qualified
domain name and the IP address of that DNS server. And then it gave me back the query,
because I asked it information about DC1, and it did. It gave me a fully qualified domain name
and the proper IP address. So, I queried the DNS server. It handled the query, responded with the
correct record, and displayed it. Good so far. We'll look at another domain controller. And
again, I can see the same thing. It went to a DNS server. It queried for DC2, brought that
information back. It's a fully qualified domain name. It's right. IP address, right. And one
last time, I'm going to do the third domain controller. And again, perfect. So, three
queries. Everything came back. Perfect. My recursive resolver is working, at least at this
point. Pretty doggone good. Now, I want to test the speed of my recursive resolver. Is it
resolving quickly? So, what I'm going to do is I'm going to first, this is a PC. I'm going to flush
its DNS cache. So, I'm going to do ipconfig flush dns. And what it's going to do is flush everything
that I have on this PC. So, when I start asking the recursive resolver to find things, I'm not
pulling anything out from my local cache. So, now, I'm going to do a tracer. And let's go to
cisco.com. And now, everything you see here, everything that's being resolved, hostname to
IP address, all of this information is having to be done by the recursive resolver. And I'm looking
at my tracer timeframes. And then, I'm going to flush DNS cache again and do it again and compare
one after the other to see, am I seeing significant latency problems as it tries to find these various
hops or routers in the route to cisco.com? This is giving me some idea. Am I 10 milliseconds slow
from normal? So, I'm just watching as we finish up this tracer to cisco.com. And it is complete.
And I want to look at all those timings to see, does that seem appropriate? So, what I'm going to
do right away is I'm going to go back and flush my cache again. And I'm going to go back and do this
one more time because I want to compare before and again to see, are they staying about the same?
And I can see from the top to the bottom, things are pretty much the same. And based on what I know
in my home network, that's about right. There doesn't seem to be any issues with my recursive
resolver. Now, is this a thorough test for your recursive resolver? No, but it's a basic one,
very easy to do with Windows utilities, and it's given me a sense that everything seems to be okay.
Today's environment in the workplace makes the browser the number one application for business
today. And if your browser is not getting DNS resolution quickly, your users are going to
experience slow internet and you're going to be blamed for it. It's important to do some DNS
benchmarking to make sure you've got the most performance out of your DNS resolution.
Let me show you some ways you can do that. But before I get into benchmarking,
where possible and if your company policy allows, use public facing resolvers such as Cloudflare,
Quad9. They do a lot of filtering of malicious domains, pornography, domains that have been
blacklisted, spam sites, and a lot of other bad stuff. It never will be resolved back to your
internal network. So, by using companies like Cloudflare, Quad9, you already get some real
basic protection for your users and your home if you use these public facing systems.
Now, you do want to benchmark them so you can find out which one
in your location is the best to use. So, for my domain controllers on Active Directory,
they're going to take care of all the DNS resolution for my internal account. But I'm
going to forward any external request for any external website. I'm going to send them either
to Cloudflare or Quad9 and let them filter out all the bad stuff and find me those authoritative
servers and return the proper information. But if I choose an external institution to do that,
I want to make sure I'm using a fast one. A great place to benchmark your DNS system
is go to Steve Gibson's site, www.grc.com, come under Freeware, under Utilities,
and choose DNS Benchmark. Now, Steve Gibson gives you a ton of information about what he is doing
in this benchmark. So, you're going to have to take the time to look at this and learn,
but this is a very good DNS benchmark for your system.
Now, in all honesty, if you do spend about two hours on this site, you will learn more
in two hours of studying Steve Gibson's discussion about DNS from anything I taught you. But go ahead
and click on this graphic. It's going to download dnsbenchmark.exe. Go ahead and put it in your
Downloads folder and you can then get rid of the website and let's launch the utility. This is
written in assembly. It's incredibly fast and incredibly small. I'm going to go ahead and
double-click and get everything out of the way so we can kind of watch it. And here it's already
looking at both public name servers as well as what I have configured on the client. Now, there
is a ton of information in there. All the information you need to know about how to read this
is on Steve Gibson's website. I'm not going to show you everything, but this is a great DNS
benchmark tool. I highly recommend you spend some time using it, learning it. You'll learn so much
about DNS caching and spoofing and all kinds of great stuff about DNS. Now, once it's got all the
information in your dialog box, go ahead and run the benchmark and go get a cup of coffee,
have some donuts, go visit a friend and come back, and you'll see all the information about
the various servers that are available publicly as well as your own DNS servers.
Now, the benchmarking finished and it popped up a dialog box, which I missed, and it says,
do you want to create your top 50 resolver custom list? Say yes and let it do it some more. Go get
another cup of coffee, and it's scanning 5,000 global DNS resolvers based on your location
to see which ones are the best for you. While this is running, you can look at the top here.
You can see that the fastest DNS resolvers are responding within 15 milliseconds, the slowest,
666 milliseconds. That's why you want to benchmark your DNS system. You don't want
to be connected to a 666 millisecond DNS server. Now, my benchmarking is done for my DNS servers.
You can see this is my Active Directory Domain Controller IP address. It did include my own
resolver on my domain as one of the DNS resolvers. It said Cloudflare was the best,
the fastest, and that's my forwarder. So, I use Cloudflare as one of my forwarders. I could,
in my area locally where I'm at, use Level 3. Google's public DNS servers 8.8.4.4 and 8.8.8.8
are also available. So, in my area, I could have used any of these for my public facing DNS resolvers.
I encourage you to check out Steve Gibson's DNS Benchmark.