What is DNS and How DNS Works

download What is DNS and How DNS Works

of 8

Transcript of What is DNS and How DNS Works

  • 8/18/2019 What is DNS and How DNS Works

    1/8

    4/22/2016 W hat i s D NS and How D NS W or ks? ( Dom ai n Nam e Ser ver Fundam ental s)

    http://www.thegeekstuff.com/2013/12/dns-basics/ 1/8

    53   39ถกใจ

    ≡ Menu

    HomeFree eBook Start HereContactAbout

    What is DNS and How DNS Works? (Domain Name

    Server Fundamentals)

     by Lakshmanan Ganapathy on December 5, 2013

    Tweet

    DNS stands f or Domain Name System, or Domain Name Server.

    DNS resolves an IP address to a hostname or vice versa.

    DNS is basically a large database which resides on various computers that contains the names and IP addressesof various hosts/domains. Other than ip-address DNS also associates various information with the domainnames.

    Structure of a DNS

    DNS uses a hierarchical tree based name structure. At top of the tree is the “root” ( represented as a dot (.) )followed by the TLD ( Top Level Domain ), then by the domain-name and any number of lower level sob-

    domains separated by a dot.

    The Top Level Domains are divided into 2 categories:

    1. Generic TLD (gTLD)2. Country Code TLD (ccTLD)

    Below are some of the common Generic Top Level Domains:

    .com – comercial web sites

    .org – non profit organizations web sites

    .edu – restricted to schools and institutions.

    .net – originally for network infrastructures, now unrestricted

    Below are some fo the Country Code Top Level Domains:

    https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fwww.thegeekstuff.com%2F2013%2F12%2Fdns-basics%2F&ref_src=twsrc%5Etfw&text=What%20is%20DNS%20and%20How%20DNS%20Works%3F%20(Domain%20Name%20Server%20Fundamentals)&tw_p=tweetbutton&url=http%3A%2F%2Fwww.thegeekstuff.com%2F2013%2F12%2Fdns-basics%2Fhttp://www.thegeekstuff.com/about/http://www.thegeekstuff.com/best-of-the-blog/http://www.thegeekstuff.com/http://www.thegeekstuff.com/http://www.thegeekstuff.com/http://www.thegeekstuff.com/2012/01/ip-address-fundamentals/https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fwww.thegeekstuff.com%2F2013%2F12%2Fdns-basics%2F&ref_src=twsrc%5Etfw&text=What%20is%20DNS%20and%20How%20DNS%20Works%3F%20(Domain%20Name%20Server%20Fundamentals)&tw_p=tweetbutton&url=http%3A%2F%2Fwww.thegeekstuff.com%2F2013%2F12%2Fdns-basics%2Fhttp://www.thegeekstuff.com/about/http://www.thegeekstuff.com/contact/http://www.thegeekstuff.com/best-of-the-blog/http://www.thegeekstuff.com/linux-101-hacks-ebook/http://www.thegeekstuff.com/http://www.thegeekstuff.com/

  • 8/18/2019 What is DNS and How DNS Works

    2/8

    4/22/2016 W hat i s D NS and How D NS W or ks? ( Dom ai n Nam e Ser ver Fundam ental s)

    http://www.thegeekstuff.com/2013/12/dns-basics/ 2/8

    .us – United States

    .in – India

    .uk – United Kingdom

    .ru – Russia

    The following shows a sample representation of the structure of the DNS tree:

    Authority, Delegation and Zone

    The Authority for the root domain and gTLD lies with Internet Corporation for Assigned Numbers and Names(ICANN). ccTLD’s are delegated to individual countries for administration purpose. Each level in the hierarchymay delegate the authoritative control to the next lower level. There is a DNS server running in every level of the hierarchy and the responsibility of running the DNS server lies with the Authority at that level.

    For Example, when the root domain gets a DNS query for www.example.com, the root will delegateresponsibility for resolving to its lower level “.com”, which in-turn will delegate to “example”. Finally the DNSserver in the “example” will respond with the IP address of the hostname “www”.

    A zone is simply a portion of a domain. For example, the domain example.com may contain all the informationfor a.example.com, b.example.com and c.example.com. However, the zone example.com contains onlyinformation for example.com and delegates the responsibility to the authoritative name servers for the

    subdomains. In general, if there are no subdomains, then the zone and domain are essentially the same.

    Resource Records

    A DNS zone database is made up of a collection of resource records. Each resource record specifies information

    Need faster DNS?

    High-performance DNScache, low TCO DNS cachefrom $3,461. Contact us.

    https://www.googleadservices.com/pagead/aclk?sa=L&ai=CAnZBw8MZV_vGH8_VBeK1jvADl8rb_wa33YzCogLAjbcBEAEgooHXC2D91ZyGwCCgAfWK9fwDyAEBqQKbmRiHRRC4PqgDAcgDwwSqBIkBT9CKdq_31mBZYckAYMaeKQhdJnpLGRrWqeb2mhXHE8RCjNg3a4pFOGZirjip9D3CGFu1zoJPbT2lu-qa1mfmfvFbQ5yaaizsGsiM1BKdHmi1e0LAWE4MpftkfmdDIZxA1lc5q-6qo5lB9E6HoRyKwCr2o0Z8QLvwlF5_--mbwwtwlLVaJGu5DOGIBgGAB_P0igOoB6a-G9gHAQ&num=1&cid=CAASEuRoFGVqzEhoiXhKZ1G9vYPWpQ&sig=AOD64_0KRigKlIfBABfucTPaEsLi56YP9g&client=ca-pub-8090601437064582&adurl=http://dnscache.appliansys.com/https://www.googleadservices.com/pagead/aclk?sa=L&ai=CAnZBw8MZV_vGH8_VBeK1jvADl8rb_wa33YzCogLAjbcBEAEgooHXC2D91ZyGwCCgAfWK9fwDyAEBqQKbmRiHRRC4PqgDAcgDwwSqBIkBT9CKdq_31mBZYckAYMaeKQhdJnpLGRrWqeb2mhXHE8RCjNg3a4pFOGZirjip9D3CGFu1zoJPbT2lu-qa1mfmfvFbQ5yaaizsGsiM1BKdHmi1e0LAWE4MpftkfmdDIZxA1lc5q-6qo5lB9E6HoRyKwCr2o0Z8QLvwlF5_--mbwwtwlLVaJGu5DOGIBgGAB_P0igOoB6a-G9gHAQ&num=1&cid=CAASEuRoFGVqzEhoiXhKZ1G9vYPWpQ&sig=AOD64_0KRigKlIfBABfucTPaEsLi56YP9g&client=ca-pub-8090601437064582&adurl=http://dnscache.appliansys.com/

  • 8/18/2019 What is DNS and How DNS Works

    3/8

    4/22/2016 W hat i s D NS and How D NS W or ks? ( Dom ai n Nam e Ser ver Fundam ental s)

    http://www.thegeekstuff.com/2013/12/dns-basics/ 3/8

    53   Tweet   39ถกใจ

    about a particular object. The DNS server uses these records to answer queries for hosts in its zone. For example, address mapping (A) record, map a host name to an IP address, and reverse-lookup pointer (PTR)records map an IP address to a host name. Here are some of commonly used Resource Records.

    A Record: The ‘A’ record specifies the IP address of a host. ‘A’ record will have the details of thedomainname and its associated IP address. When a Query is given to resolve domainname, DNS server will refer the ‘A’ record and answer with the IP address present in the record.PTR Record: A PTR record maps the IP address to a specific host.NS Record: An NS record or name server record maps a domain name to a list of DNS

    servers authoritative for that domain. Delegations depend on NS records.MX Record: An MX record or mail exchange record maps a domain name to a list of mail exchangeservers for that domain. For example, when you send a mail to [email protected], the mail will berouted to the Mail Server as specified in MX record.

    You can use dig command to query DNS server and view the above information.

    DNS Queries

    A DNS query would be something like ‘what is the IP address of a.example.com’. A DNS server may receivesuch a query for any domain, to which it has no information about. The DNS server will respond is different

    ways for which it has no information about.

    The following are the three types of DNS queries:

    Recursive queryIterative queryInverse query

    In Recursive query, the following are the steps involved when a host queries its local DNS server for ‘a.example.com’.

    Host sends query ‘what is the IP address of a.example.com’ to locally configured DNS server.DNS server looks up a.example.com in local tables – not foundDNS sends query to a root-server for the IP of a.example.comThe root-server replies with a referral to the TLD servers for .comThe DNS server sends query ‘what is the IP address a.example.com’ to one of the .com TLD servers.The TLD server replies with a referral to the name servers for example.comThe DNS server sends query ‘what is the IP address a.example.com’ to name server for example.com.Zone file defines a A record which shows ‘a”s IP address is x.x.x.x.DNS returns the A record for ‘a’.

    In Iterative query, if the DNS server doesn’t know the answer, it will refer other DNS server as response. So theclient which initiates the query will once again contact the DNS server which came in as response.

    In Inverse query, an IP address will be provided and a hostname will be asked.

    > Add your comment

    If you enjoyed this article, you might also like..

    1. 50 Linux Sysadmin Tutorials2. 50 Most Frequently Used Linux Commands (With

    Examples)3. Top 25 Best Linux Performance Monitoring andDebugging Tools

    4. Mommy, I found it! – 15 Practical Linux FindCommand Examples

    5. Linux 101 Hacks 2nd Edition eBook  

    Awk Introduction – 7 Awk Print ExamplesAdvanced Sed Substitution Examples

    8 Essential Vim Editor NavigationFundamentals25 Most Frequently Used Linux IPTablesRules ExamplesTurbocharge PuTTY with 12 Powerful Add-Ons

    http://www.thegeekstuff.com/2008/08/turbocharge-putty-with-12-powerful-add-ons-software-for-geeks-3/http://www.thegeekstuff.com/2011/06/iptables-rules-examples/http://www.thegeekstuff.com/2009/03/8-essential-vim-editor-navigation-fundamentals/http://www.thegeekstuff.com/2009/10/unix-sed-tutorial-advanced-sed-substitution-examples/http://www.thegeekstuff.com/2010/01/awk-introduction-tutorial-7-awk-print-examples/http://www.thegeekstuff.com/linux-101-hacks-ebook/http://www.thegeekstuff.com/2009/03/15-practical-linux-find-command-examples/http://www.thegeekstuff.com/2011/12/linux-performance-monitoring-tools/http://www.thegeekstuff.com/2010/11/50-linux-commands/http://www.thegeekstuff.com/2010/12/50-unix-linux-sysadmin-tutorials/http://www.thegeekstuff.com/2012/02/dig-command-examples/https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Fwww.thegeekstuff.com%2F2013%2F12%2Fdns-basics%2F&ref_src=twsrc%5Etfw&text=What%20is%20DNS%20and%20How%20DNS%20Works%3F%20(Domain%20Name%20Server%20Fundamentals)&tw_p=tweetbutton&url=http%3A%2F%2Fwww.thegeekstuff.com%2F2013%2F12%2Fdns-basics%2F

  • 8/18/2019 What is DNS and How DNS Works

    4/8

  • 8/18/2019 What is DNS and How DNS Works

    5/8

  • 8/18/2019 What is DNS and How DNS Works

    6/8

    4/22/2016 W hat i s D NS and How D NS W or ks? ( Dom ai n Nam e Ser ver Fundam ental s)

    http://www.thegeekstuff.com/2013/12/dns-basics/ 6/8

    Vim 101 Hacks eBook  - Practical Examples for Becoming Fast and Productive in Vim Editor  Nagios Core 3 eBook  - Monitor Everything, Be Proactive, and Sleep Well

    เปนคนแรกในกล มเพ อนของคณท ถกใจส    งน  

    he Geek Stuff 14,479 จานวนคนท ถกใจ

    ถกใจเพจ แชร

    POPULAR POSTS

    12 Amazing and Essential Linux Books To Enrich Your Brain and Library50 UNIX / Linux Sysadmin Tutorials50 Most Frequently Used UNIX / Linux Commands (With Examples)How To Be Productive and Get Things Done Using GTD30 Things To Do When you are Bored and have a Computer Linux Directory Structure (File System Structure) Explained with ExamplesLinux Crontab: 15 Awesome Cron Job ExamplesGet a Grip on the Grep! – 15 Practical Grep Command ExamplesUnix LS Command: 15 Practical Examples15 Examples To Master Linux Command Line HistoryTop 10 Open Source Bug Tracking System

    Vi and Vim Macro Tutorial: How To Record and PlayMommy, I found it! -- 15 Practical Linux Find Command Examples15 Awesome Gmail Tips and Tricks15 Awesome Google Search Tips and TricksRAID 0, RAID 1, RAID 5, RAID 10 Explained with DiagramsCan You Top This? 15 Practical Linux Top Command ExamplesTop 5 Best System Monitoring ToolsTop 5 Best Linux OS DistributionsHow To Monitor Remote Linux Host using Nagios 3.0Awk Introduction Tutorial – 7 Awk Print ExamplesHow to Backup Linux? 15 rsync Command Examples

    The Ultimate Wget Download Guide With 15 Awesome ExamplesTop 5 Best Linux Text EditorsPacket Analyzer: 15 TCPDUMP Command ExamplesThe Ultimate Bash Array Tutorial with 15 Examples3 Steps to Perform SSH Login Without Password Using ssh-keygen & ssh-copy-idUnix Sed Tutorial: Advanced Sed Substitution ExamplesUNIX / Linux: 10 Netstat Command ExamplesThe Ultimate Guide for Creating Strong Passwords6 Steps to Secure Your Home Wireless Network Turbocharge PuTTY with 12 Powerful Add-Ons

    CATEGORIES

    Linux TutorialsVim Editor Sed ScriptingAwk Scripting

    http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/http://www.thegeekstuff.com/category/sed/http://www.thegeekstuff.com/category/awk/http://www.thegeekstuff.com/category/sed/http://www.thegeekstuff.com/category/vim-2/http://www.thegeekstuff.com/category/linux/http://www.thegeekstuff.com/2008/08/turbocharge-putty-with-12-powerful-add-ons-software-for-geeks-3/http://www.thegeekstuff.com/2008/08/6-steps-to-secure-your-home-wireless-network/http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/http://www.thegeekstuff.com/2010/03/netstat-command-examples/http://www.thegeekstuff.com/2009/10/unix-sed-tutorial-advanced-sed-substitution-examples/http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/http://www.thegeekstuff.com/2010/06/bash-array-tutorial/http://www.thegeekstuff.com/2010/08/tcpdump-command-examples/http://www.thegeekstuff.com/2009/07/top-5-best-linux-text-editors/http://www.thegeekstuff.com/2009/09/the-ultimate-wget-download-guide-with-15-awesome-examples/http://www.thegeekstuff.com/2010/09/rsync-command-examples/http://www.thegeekstuff.com/2010/01/awk-introduction-tutorial-7-awk-print-examples/http://www.thegeekstuff.com/2008/06/how-to-monitor-remote-linux-host-using-nagios-30/http://www.thegeekstuff.com/2009/06/top-5-best-linux-os-distributions/http://www.thegeekstuff.com/2009/09/top-5-best-network-monitoring-tools/http://www.thegeekstuff.com/2010/01/15-practical-unix-linux-top-command-examples/http://www.thegeekstuff.com/2010/08/raid-levels-tutorial/http://www.thegeekstuff.com/2009/06/expertise-in-google-search/http://www.thegeekstuff.com/2009/07/best-gmail-tips-and-tricks/http://www.thegeekstuff.com/2009/03/15-practical-linux-find-command-examples/http://www.thegeekstuff.com/2009/01/vi-and-vim-macro-tutorial-how-to-record-and-play/http://www.thegeekstuff.com/2010/08/bug-tracking-system/http://www.thegeekstuff.com/2008/08/15-examples-to-master-linux-command-line-history/http://www.thegeekstuff.com/2009/07/linux-ls-command-examples/http://www.thegeekstuff.com/2009/03/15-practical-unix-grep-command-examples/http://www.thegeekstuff.com/2009/06/15-practical-crontab-examples/http://www.thegeekstuff.com/2010/09/linux-file-system-structure/http://www.thegeekstuff.com/2010/03/30-things-to-do-when-you-are-bored-and-have-a-computer/http://www.thegeekstuff.com/2010/08/gtd-getting-things-done/http://www.thegeekstuff.com/2010/11/50-linux-commands/http://www.thegeekstuff.com/2010/12/50-unix-linux-sysadmin-tutorials/http://www.thegeekstuff.com/2009/01/12-amazing-and-essential-linux-books-to-enrich-your-brain-and-library/https://www.facebook.com/thegeekstuff/https://www.facebook.com/sharer/sharer.php?app_id=776730922422337&u=https%3A%2F%2Fwww.facebook.com%2Fthegeekstuff%2F&display=popup&ref=plugin&src=pagehttps://www.facebook.com/thegeekstuff/https://www.facebook.com/thegeekstuff/https://www.facebook.com/falex3232https://www.facebook.com/sasireka.thangavelhttps://www.facebook.com/basim.alyhttps://www.facebook.com/mohanmocsehttps://www.facebook.com/michael.b.whalenhttps://www.facebook.com/vamsikrishna.gattupallihttp://www.thegeekstuff.com/nagios-core-ebook/http://www.thegeekstuff.com/vim-101-hacks-ebook/

  • 8/18/2019 What is DNS and How DNS Works

    7/8

    4/22/2016 W hat i s D NS and How D NS W or ks? ( Dom ai n Nam e Ser ver Fundam ental s)

    http://www.thegeekstuff.com/2013/12/dns-basics/ 7/8

    Bash Shell Scripting Nagios MonitoringOpenSSHIPTables FirewallApache Web Server MySQL DatabasePerl ProgrammingGoogle TutorialsUbuntu TutorialsPostgreSQL DBHello World ExamplesC ProgrammingC++ ProgrammingDELL Server TutorialsOracle DatabaseVMware Tutorials

    Ramesh Natarajan

    ตดตาม

    About The Geek Stuff 

     My name is Ramesh Natarajan. I will be posting instruction guides, how-to, troubleshootingtips and tricks on Linux, database, hardware, security and web. My focus is to write articles that will either teach you or help you resolve a problem. Read more about Ramesh Natarajan and the blog.

    Contact Us

    Email Me : Use this Contact Form to get in touch me with your comments, questions or suggestions about thissite. You can also simply drop me a line to say hello!.

    Follow us on Google+ 

    Follow us on Twitter  

    Become a fan on Facebook  

    Support Us

    Support this blog by purchasing one of my ebooks.

    Bash 101 Hacks eBook  

    Sed and Awk 101 Hacks eBook  

    Vim 101 Hacks eBook  

    http://www.thegeekstuff.com/vim-101-hacks-ebook/http://www.thegeekstuff.com/sed-awk-101-hacks-ebook/http://www.thegeekstuff.com/bash-101-hacks-ebook/http://www.facebook.com/thegeekstuffhttp://twitter.com/thegeekstuffhttps://plus.google.com/112493711428194838421/postshttp://www.thegeekstuff.com/contacthttp://www.thegeekstuff.com/about/https://plus.google.com/+RameshNatarajan?prsrc=5http://www.thegeekstuff.com/category/vmware/http://www.thegeekstuff.com/category/oracle/http://www.thegeekstuff.com/category/dell-2/http://www.thegeekstuff.com/category/c-plus-plus/http://www.thegeekstuff.com/category/c-programming/http://www.thegeekstuff.com/category/hello-world/http://www.thegeekstuff.com/category/postgresql/http://www.thegeekstuff.com/category/ubuntu/http://www.thegeekstuff.com/category/google/http://www.thegeekstuff.com/category/perl/http://www.thegeekstuff.com/category/mysql/http://www.thegeekstuff.com/category/apache/http://www.thegeekstuff.com/category/iptables/http://www.thegeekstuff.com/category/openssh-2/http://www.thegeekstuff.com/category/nagios-2/http://www.thegeekstuff.com/category/bash-2/

  • 8/18/2019 What is DNS and How DNS Works

    8/8

    4/22/2016 W hat i s D NS and How D NS W or ks? ( Dom ai n Nam e Ser ver Fundam ental s)

    http://www.thegeekstuff.com/2013/12/dns-basics/ 8/8

     Nagios Core 3 eBook 

    Copyright © 2008–2015 Ramesh Natarajan. All rights reserved | Terms of Service

    http://www.thegeekstuff.com/copyrighthttp://www.thegeekstuff.com/nagios-core-ebook/