What is DNS?
How does DNS work? And Why do we need DNS?
DNS stand for Domain Name System
Or some would say it's Domain Name Service. I think the easiest way to think of it is that it's the very fast Internet Phonebook. Because it works like a phonebook for your computer.
Computers and other web enabled devices all "connect" to each other using thier unique IP Addresses. This is a group of numbers (IPv4) that consist of 4 sets of 3 numbers separated by periodes. Like 192.168.1.22.
Computers like numbers while us humans tend to prefer lettered names.
That is where DNS comes in. It will take the human name of a web page location like www.website.com and find the IP Address of the computer that has control of that web page. And it will do this in less than a second most of the time. Once your computer has the IP address is can connect directly to that computer which then provides the web page.
But How Does It Work?
This will seem like a lot, but bear in mind that modern computers are extremely fast at doing small tasks like this.
Now you can imagine a database filled with every possible website name and it's corisponding IP Address (the phone number if you will) would be a HUGE printed book with very small print. So to make the search process go even faster it's been distributed into smaller chunks in an organized way.
When you press enter after typing in the www.mysite.org into your browsers top address bar your computer first checks it's own "cache" to see if the "phone number" to that computer is there. If you had visited that same computer previously your computer would have stored that information in a temporary location called a cache. This sometimes gets cleared out so if it's been a long time since you've pulled up that site it may not be stored locally on your computer any more.
So the next thing your computer will do when it doesn't find the answer in it's cache is to contact the RNS (Resolving Name Server) and ask for the IP Address assigned to www.mysite.org. The RNS is like a receptionist in an office. There to help you navigate. The RNS will then contact the Root Name Server which will only look at the very last part of the name, in this case, the .org which is called the TLD (Top Level Domain). There are lots of different possible TLDs in the world and there are dedicated servers for various groups of TLDs, so the Root Name Server will contact the TLD server that is in charge of all .org TLDs.
There is one more split of information. Because different TLDs will be maintained by different Authoritative Name Servers. (ANS) So the final server in this hunt will have just the section of the phonebook that is all the .org names and so it can quickly locate the "mysite" domain and provide it's IP Address all the way back to your computer.
And anything in front of the "mysite.org" will be for the computer whos' IP Address we just got to find in it's own storage areas and direct your computer browser to it. So the "www" could be a folder on that computers hard drive for example.
I know, I know, that just seems impossible and like it would take several seconds to happen. But the reality is that is all happens in the blink of an eye.
Interesting Tidbits about DNS
- Paul Mockapetris invented DNS back in 1983.
- Originally there were only 7 TLDs available. (.arpa, .gov, .com, .net, .org, .edu, and .mil) We not have over 1500 TLDs.
- There are over 100 million registered domain names across the globe.
- DNS servers receive more hacking attempts than any other system on The Internet.
- GoDaddy is by far the leader of new domain name registrations. Nearly 5 times more than the next in line.
- In 1987 the total number of registered domain names reached 100. That means it took 2 years to get 100 domains registered. Today, that many are registered every few milliseconds.
- Domain Name Registrations were free up until 1995.
- cars.com was the most expensive domain purchase at somewhere over $870 million.
- All three-character .com domains were bought out sometime around 2001
A "cache" is simply a tempory storage. For computers it's usually data that was retreived from some external location and tucked away in a local place to faster access at some later time.
For DNS, the two most common caches are made by your browser and/or your operating system. Even though DNS lookups are lightening fast, grabbing that information from a local drive is even faster.
Caches are frequently limited by either a time span or storage space. Once either limit is reached the system start to automaticly delete the oldest accessed information as it needs room for new information coming in.
DNS Query Types
Recursive query is a type of query where the DNS server that received your query will do all the work of retrieving the answer for you. During this process, it may also query other DNS server's in the internet on your behalf, to get the answer. This is the most common type of DNS Query and what is described above.
An Iterative (or non-recursive) query is where the server may provide an answer or a partial answer (a referral) to the query (or give an error). It's technically a normal DNS query that does not request Recursive Services.
A non-recursive query is when the DNS Resolver already knows the answer. It either immediately returns an IP Address because it already has it in local cache, or queries a DNS Name Server which is authoritative for the record, meaning it definitely holds the correct IP for that hostname.
We truly want and appreciate you and your business. Your success is our success!
Need Computer Services? Check out ELLTX Computers for exceptional Computer Repair and Services!