TechKnowSurge
CompTIA Network+ 1.4 Cisco CCNA 4.3 CompTIA Network+ 3.4 Cisco CCST Networking 1.5 CompTIA A+ Core 1 2.6
VideoNetworkFree

DNS Process

DNS name resolution is the process of translating a fully qualified domain name into an IP address through a hierarchical chain of servers. Starting with the local hosts file, a query travels through root servers, top-level domain servers, and authoritative name servers until the correct IP address is returned.

Complete this video to capture a CTF flag worth 1 point.

About this video

DNS name resolution converts a human-readable fully qualified domain name, or FQDN, into the IP address a machine needs to establish a network connection. The FQDN identifies a specific host on a network by combining the hostname, domain, and top-level domain into a single structured label. Before any network traffic is generated, the operating system checks a local file called the hosts file, which contains static mappings of hostnames to IP addresses. This file is consulted first and is commonly used for local testing, pre-production validation, or referencing internal resources by name without relying on external DNS infrastructure. When the hosts file contains no matching entry, the system forwards the query to a configured DNS server, which begins an iterative resolution process through a hierarchy of servers. The DNS server first contacts a root server, which does not hold the final answer but responds with a referral to the top-level domain server responsible for the domain suffix, such as .com. The TLD server similarly lacks the specific record but returns the address of the authoritative name server for the requested domain. That authoritative server holds the actual DNS zone records and looks up the requested hostname within its database. Once the authoritative server locates the correct record, it returns the IP address along with an authoritative flag set in the DNS response packet. This flag tells the requesting machine that the answer is definitive and comes directly from the server responsible for that domain. The resolved IP address is then used to establish the actual connection to the target host, completing the name resolution process from initial query to final destination.

What you'll learn

What's covered

DNS Name Resolution

Aligned to

CompTIA Network+
1.4 Explain common networking ports, protocols, services, and traffic types.
3.4 Given a scenario, implement IPv4 and IPv6 network services.
Cisco CCNA
4.3 Explain the role of DHCP and DNS within the network.
Cisco CCST Networking
1.5 Describe common network applications and protocols.
CompTIA A+ Core 1
2.6 Compare and contrast common network configuration concepts.

Key terms

Domain Name System
DNS
A hierarchical naming system that translates human-readable domain names into IP addresses.
Fully Qualified Domain Name
FQDN
The complete domain name for a host, including the hostname, all subdomains, and the top-level domain.
Top-Level Domain
TLD
The last segment of a domain name, such as .com, .org, or .net, representing the highest level of the DNS hierarchy.
Root Server
A DNS server at the top of the DNS hierarchy that responds to queries by directing resolvers to the appropriate top-level domain server.
Authoritative Name Server
A DNS server that holds the definitive DNS records for a specific domain and provides the final IP address answer to a resolution query.
Hosts File
A local file on a computer that maps hostnames to IP addresses and is checked before any DNS query is made.

Transcript

The Parts of a Domain Name

As we mentioned last time, we talked about the different components of a domain name. For instance, this first part is the top level domain. We talked about the subdomains to that. We call this last part the host, which is the specific host or specific server that we're going to be addressing. And the rest of this is the domain part of that. So we've got the domain, and we call this full thing the fully qualified domain name, or the FQDN.

The Host File

How do we translate this? What do we reference? We've talked many times about a server that we go and ask the server what is the translation. But there's a lot more to it than just that. So let's dial it back to the very basics, and that is there is a file on your machine called the host file that does exactly this. It translates names to IP addresses.

So we could actually open up that host file on that machine and then add an entry that says this is the host name and this is the IP address of that. And that is the first stop when you're doing name resolution: this machine is going to look at that host file to see if there's anything in that host file for translation.

So this would be a way to set up, like if you're testing something, it'd allow you to do some testing on it before you released it into the whole general populace, the public, until you made it go live. Or perhaps you have a reference that somehow you need to reference some sort of local resource and you want to do it by name. This is the file that you would use. So there's a few different use cases of why you would want to go into the host file, specify a name, and then the address that you want it translated to.

Asking a DNS Server

As mentioned, if your machine can't find the solution within the host file, that is it can't resolve the name that you typed in to an IP address from the host file, and most of the time it's not going to because most of the time we're not using the host file, then what it's going to do is go and look for the answer. Usually there's some sort of DNS server that's set up on your machine, and it's going to go and ask that DNS server, and then your DNS server is going to go through the process of trying to resolve the name for you and then send the information back.

Walking the Resolution Process

So I've skipped that middle machine at this point in time, and we're just going to take a look at the process. So if we're trying to resolve www.techknowsurge.com, then what it first of all needs to do is go to the root server and look up, how do I find www.techknowsurge.com? And you're asking the root server this question.

The root server is a list of, you know, sometimes your machine has a list of root servers on it. Like if you're using a Linux machine there'll be a list of root servers on it, or if you're looking at a DNS server it'll have a list of root servers that it's going to go and query and ask this question to. And it's asking, who is www.techknowsurge.com?

And the root server then will reply back and say, I don't know who the www.techknowsurge.com is, I can't give you an IP address of that, but here's an IP address of who you should check with next. And it's going to be one of many different servers. So it's going to reply back with an IP address of many different dot servers. So that is the top level domain right here. So there is a lot of different servers out there that's going to facilitate your question of who is www.techknowsurge.com.

So you've gone out to the root server. The root server replies back with here's an IP address that you should check next. You go out to the top level domain server here, and that's the dot server. So you go out to this .com server and you say, who is techknowsurge.com? And this replies back and says, I don't have the answer that you're looking for, but here's an IP address of somebody you should check next. And it knows who is responsible for the techknowsurge domain, and it replies back with the IP address for that server.

And then you go out, you check. Okay, here is the, I'm looking for www.techknowsurge.com. And this level right here says, okay, let me take a look at my files, because I am responsible for techknowsurge.com. It looks for a record within its database, and it's looking for the www record. So it's looking for the www host, and then if that is an A record, it has an IP address and sends the IP address back to this machine. So this machine then can go reach out to that IP address and say, hey, I'm looking for the site www.techknowsurge.com.

The Authoritative Answer

So once again, the process: your machine asks who is www.techknowsurge.com. It gets responded back with, okay, here's an IP address. You go to that IP address, and for the com server, and it responds back and says, okay, here's an IP address, you go to this domain right here. This time it actually has the... And so when it replies back, it's going to reply back with an IP address.

But the question is, how does your machine know that it's the IP address that it's looking for? And the answer is it gives, this machine, this server right here gives an authoritative answer. There is a bit within the DNS response. It turns that authoritative bit on, which tells this machine you are now getting the IP address for www.techknowsurge.com.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →