DNS uses a hierarchy, so the servers in DNS need to know about each other. This is a two-directional process. First, all the servers in subordinate zones know where to find the root servers of the DNS hierarchy. Second, the servers of the upper-level zones need to know how to find the servers of lower-level zones. You can create your own DNS domain called mynicednsdomain.com and run your DNS server in it, but this doesn't make sense if the DNS server that is responsible for the .com domain doesn't know about it. This is because a client trying to find your server will first ask the name server of the domain above your zone if it knows where to find authoritative information for your domain. That's why DNS domain names need to be registered; only after that can the manager of the domain above you configure your name server as the responsible name server for your domain. This is called the delegation of authority.
It also helps to understand what happens when a user tries to resolve a DNS name that it doesn't know about already. The next steps describe what happens:
1. To resolve DNS names, the DNS resolver needs to be configured on the user's workstation. This is the part of the workstation where the user has configured how to find DNS servers. On a Linux system, this happens in the file /etc/resolv.conf.
2. Based on the information in the DNS resolver, the client will contact its name server and ask that server to resolve the DNS name for him, no matter what server it is and where on Earth the server is running. So if the client tries to resolve the name www.sandervanvugt.nl, it will first ask its own name server. The advantage is that the name server of the client can consult its cache to find out whether it recently already resolved that name for the client. If it knows the IP address of the requested server, the DNS name server returns that information to the client immediately.
3. If the name server of the client doesn't know the IP address of the requested server, it will check whether a forwarder is configured. A forwarder is a server that a name server contacts if it can't resolve a name by itself.
4. If no forwarder is configured, the DNS name server will contact a name server of the root domain and ask that name server how to contact the name server of the top-level domain it needs; in this case, this is the name server for the nl domain.
5. Once the name server of the client finds out the name server address of the top-level domain, it will contact that name server and ask for the IP address of the authoritative name server for the domain it is looking for, in this case the name server for sandervanvugt.nl.
6. Once the name server of the client finds out how to reach the authoritative name server for the domain the client asks for, it contacts that name server and asks to resolve the name for it. In return, the name server of the client will receive the IP address it needs.
7. Ultimately, the client returns the IP address of the server it wants to contact and can establish contact with that server.
Was this article helpful?