Thread: DNS Resolution
12-17-2016, 12:55 AM #1
What is DNS ?
DNS is the domain name system or service it translates the domains and FQDN’s (hostnames) into IP address so the server can be connected to on the network level. Without DNS everyone would need to enter an IP address into the search bar instead of a friendly easy to remember domain name such as ljshost.com.
So How Does It Work ?
It’s really quite simple there many servers around the world running a DNS service such as Bind.
These servers serve DNS information for various domains.
First thing we need to talk about is the holy of holy’s the 13 root name servers, if anything happened to these servers then no more internet for anyone they are the source from where all DNS information comes. The root servers are referenced as a single .
Now we have a starting point we can begin to explain how we get from here to .debian.com. DNS works in reverse which might seem confusing at first but will make perfect sense once you see how we get from the root servers to the next level. When you enter debian.com into your browser the following happens.
Every computer or internet connected has one or more DNS servers that it is configured to use any attempt to resolve a name will first be asked to this server, if it has the record it will return it to the user and the resolution process is complete, if not this DNS server will ask the root server.
Using the Linux dig command with a trace is a great example to show how the process works
dig +trace debian.com
This command will display the resolution process for debian.com
The first part of the output shows the root server providing the information for the GLD .com name servers
. 129258 IN NS f.root-servers.net.
. 129258 IN NS h.root-servers.net.
. 129258 IN NS l.root-servers.net.
. 129258 IN NS a.root-servers.net.
. 129258 IN NS k.root-servers.net.
. 129258 IN NS e.root-servers.net.
. 129258 IN NS d.root-servers.net.
. 129258 IN NS i.root-servers.net.
. 129258 IN NS m.root-servers.net.
. 129258 IN NS j.root-servers.net.
. 129258 IN NS b.root-servers.net.
. 129258 IN NS c.root-servers.net.
. 129258 IN NS g.root-servers.net.
;; Received 698 bytes from 22.214.171.124#53(g.gtld-servers.net) in 129 ms
com. 600 IN NS b.gtld-servers.net.
com. 600 IN NS k.gtld-servers.net.
com. 600 IN NS m.gtld-servers.net.
com. 600 IN NS d.gtld-servers.net.
com. 600 IN NS i.gtld-servers.net.
com. 600 IN NS c.gtld-servers.net.
com. 600 IN NS f.gtld-servers.net.
com. 600 IN NS e.gtld-servers.net.
com. 600 IN NS g.gtld-servers.net.
com. 600 IN NS a.gtld-servers.net.
com. 600 IN NS j.gtld-servers.net.
com. 600 IN NS l.gtld-servers.net.
com. 600 IN NS h.gtld-servers.net.
Next we can see the GLD server e.gtld-servers.net gave us the name servers for debian.com
debian.com. 172800 IN NS sec1.rcode0.net.
debian.com. 172800 IN NS sec2.rcode0.net.
debian.com. 172800 IN NS dnsnode.debian.org.
;; Received 418 bytes from 126.96.36.199#53(e.gtld-servers.net) in 117 ms
And finally dnsnode.debian.org provided the IP for debian.com
debian.com. 300 IN A 188.8.131.52
debian.com. 300 IN A 184.108.40.206
debian.com. 300 IN A 220.127.116.11
debian.com. 300 IN A 18.104.22.168
debian.com. 300 IN A 22.214.171.124
;; Received 1179 bytes from 126.96.36.199#53(dnsnode.debian.org) in 49 ms
As you see, DNS is very simple it’s just like state, city, town, name in the Telephone directory.
With the billions of DNS requests made every day this system would quickly become overloaded and fail, to solve this problem each server keep a record of all information it has served for a period of time. Each DNS record has a time limit, when this time has expired that DNS server will discard the record and begin the resolution process again from the root servers. Caching records for a period of 24 hours or more reduces the number of root level requests made to a minimum and reduces overall global DNS load.
Last edited by LJSHost; 03-24-2017 at 01:09 PM.
12-17-2016, 05:22 AM #2
Good one !!
12-17-2016, 06:00 AM #3
Is Godaddy or Cloudflare using these ways for their DNS services?
Those techniques are pretty high and I need time to read and study them.
12-17-2016, 12:11 PM #4
Godaddy and CloudFlare will use this resolution process just like any other internet user or service provider.
12-17-2016, 08:21 PM #5
12-21-2016, 06:31 AM #6
Thank you for the post, defiantly some good information in here!
12-21-2016, 06:37 AM #7
12-27-2016, 08:13 PM #8
Update: As an addtion to my DNS resolution article I thought I would expand on the topic with whois and Glue records.
How does DNS work with Whois ?
As we all know when you have a new domain or change hosting provider on an existing domain, the name servers for the domain must be updated by the domain registrar for that domain.
To expand on my previous article on how DNS resolution works I thought it would be interesting to discuss where the link between whois name server records and the DNS resolution process is made. Registered DNS operators also maintain the whois database. For example when you type debian.com into your browser the name server you are using will begin the resolution process as explained above starting with the whois server
Their is one exception to this rule which is the IP Glue record which "Glues" the name servers to the IP address in the whois record.
Glue Records which are also referred to as custom name servers. Custom nameservers are useful for many different reasons for example a VPS or dedicated server owner might like to have their own name servers to register domains under that they want to host on the server.
Custom name servers are also essential for resellers as they can register and update their customers domains under their own brand which creates the white labeled hosting that all reseller hosting providers offer.
Here is how glued and Unglued name servers appear on a whois record
Without With Glue Record
With Glue Record
Nameserver: ns1.somedomain.com. xxx.xxx.xxx.xxx
Nameserver: ns2.somedomain.com. xxx xxx xxx xxx
As you can see with a Glue record the IP of the correct name servers to ask is included in the whois record, this answer is not authoritative and only acts as a pointer allowing for the loop to be resolved.
So Why Are Glue records needed ?
If the name servers for a domain are a subdomain of the domain the resolution process with get stuck in a loop and be unable to resolve. This does sound confusing but it’s quite simple.
Lets try to visualize what is happening with all these name servers talking to each other and you will see why the glue record is needed.
1. Nameserver asks the whois server what are name servers for somedomain.com
2. Whois server - ns1.somedomain.com. ns2.somedomain.com.
3. Hi root server whats the IP for the .com name server
4. Hi .com server whats the IP for the somedomain.com name server
5 .com name servers says ask ns1.somedomain.com
6. Hi somedomain.com whats the IP for ns1.somedomain.com
7. Somedomain.com says ask ns1.somedomain.com
8. Whats the IP for ns1.somedomain.com
9. Ask ns1.somedomain.com
Without Glue records this is where we get stuck, the name servers for somedomain.com are a sub domain of somedomain.com so we can’t find out the IP addess to connect with ns1.somedomain.com Once the IP are glued to the whois record the looping problem is solved.
Replies: 9 | Views: 726Last post by HostingWaves, 02-10-2017, 02:51 AM
Replies: 10 | Views: 503Last post by SenseiSteve, 12-22-2016, 08:14 PM
By marcyslen in forum Web HostingReplies: 19 | Views: 1209Last post by WPCycle, 02-07-2017, 11:45 PM
Replies: 11 | Views: 1142Last post by LJSHost, 01-14-2017, 02:52 PM
By StartVM in forum VPS HostingReplies: 5 | Views: 451Last post by ferngullygraphics, 12-19-2016, 03:16 PM
Replies: 11 | Views: 341Last post by jerryperes, 03-23-2017, 09:31 AM
Replies: 5 | Views: 729Last post by StartVM, 12-19-2016, 04:32 AM
Replies: 4 | Views: 573Last post by HostXNow, 12-17-2016, 06:59 PM
Replies: 4 | Views: 635Last post by HostXNow, 12-17-2016, 06:45 PM
Replies: 5 | Views: 132Last post by Nixtree, 12-17-2016, 05:26 AM
By HostaPolis in forum Graphic DesignReplies: 0 | Views: 9Last post by HostaPolis, Yesterday, 11:34 PM
By HostaPolis in forum Shared Hosting OffersReplies: 0 | Views: 10Last post by HostaPolis, Yesterday, 11:30 PM
By SenseiSteve in forum Dedicated Hosting OffersReplies: 0 | Views: 10Last post by SenseiSteve, Yesterday, 05:03 PM
Replies: 1 | Views: 16Last post by HostBastic, Yesterday, 06:16 PM
Replies: 0 | Views: 12Last post by VictorVictories, Yesterday, 12:12 PM