Domain Name System (DNS) – is a system that store and deliver information about domain names, one of the key functions of this system – translate website address (URL) to an IP address when you send a specific query to it’s name server.
IP address used for computer identification for communications over the network (internet).
Domain name dock.co.nz has an IP address 184.108.40.206
When you enter URL address in your browser, you type a human-understandable word or a name, that you can read and understand, but your computer can’t. Of course it’s possible for us to enter IP address directly, like phone numbers:
- facebook.com has address 220.127.116.11
- youtube.com has address 18.104.22.168
- twitter.com has address 22.214.171.124
But we can’t remember all phone numbers of our contacts and of course we can’t remember IP addresses of every website we use.
Here Domain Name System to make our life easier
We will not dive into technical specification about DNS, as the purpose of this article is to give you the understanding of how it works.
Domain Name System “database” has hierarchical structure.
|Root domain||. (dot symbol)|
|Top-level domain (TLD)||com||net||org||nz|
Now, what happens when we enter address dock.co.nz in browser?
DNS Request step by step (Attention! This is extremely imaginative comparison!).
- Our computer send DNS request to Root domain namespace – “We need information about domain dock.co.nz”.
- Then root DNS server forward us to Top-level domain namespace – and we repeat our request to “nz” domain name – “We need information about domain dock.co.nz”.
- Now “nz” forward us to “co.nz” and until we reach Third-level domain namespace and get response to our request for domain name dock.co.nz:
DNS Records for your domain located at NS servers:
ns1.dock.co.nz. (IP: 126.96.36.199)
ns2.dock.co.nz. (IP: 188.8.131.52)
- After we receive our information about Name Server (NS) records, we connect to those servers and get needed DNS Records.
dig google.com ; <<>> DiG 9.10.3-P4-Ubuntu <<>> google.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47211 ;; flags: qr ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;google.com. IN A ;; ADDITIONAL SECTION: google.com. 168 IN A 184.108.40.206 ;; Query time: 182 msec ;; SERVER: 127.0.1.1#53(127.0.1.1) ;; WHEN: Fri Nov 10 03:56:34 NZDT 2017 ;; MSG SIZE rcvd: 55
example of DNS request using dig tool in Ubuntu (Linux).
Now DNS Records are saved at our local computer in DNS Cache. So next time we visit website dock.co.nz, until it’s expired or cleaned. Average caching time is about hour. Each DNS request takes from 3 to 150 milliseconds. Imagine what load could be without caching, because of daily produced billions of DNS requests over the internet.
Name Servers and DNS Records
Name Server is a service that handle all requests and provide needed DNS Records.