How Public DNS Works – Practical Simulation – InsideOut – Part I
WaheGuru G Ka Khalsa, WaheGuru G Ki Fateh
Intended Audience & Prerequisite Knowledge:
Intended Audience: This post is for Audience who want to know in depth – that:
In this Post, we will Depict and Simulate – Public DNS Infrastructure.
We will be establishing our own Internal Root Hint Servers (.), Global Top-Level Domain(GTLD) Servers (such as .COM), and Second Level Domains (such as VirtualizationMaximus.com.).
This Post has been divided into Three Parts. First Part solely relates to Prerequisite Information and Basics while Second and Third Part deal with Simulation of Public DNS Infrastructure thereby mimicking DNS Name resolution as on Public Internet.
In Part II – we will use Windows DNS Server running on Windows Server 2003, Enterprise Sp2 release.
In Part III – we will use BIND 9.3.4 running on RHEL 5.2 release.
We will be using below mentioned DNS tools to query and display DNS Info: DIG (Domain Information Groper) - The Best Tool - available for both Linux/Windows. NSLOOKUP (NameServer Lookup) - Simplistic with Interactive Prompt - available for both Linux/Windows. HOST - Linux Native / Ports for Windows available.
Now we discuss Information Concisely required for this Simulation.
DNS NameSpace Hierarchy
DNS is used primarily for mapping IP Address(es) into more desirable – Human Names. DNS naming has been organized into parts – parts that have organized and associated in Hierarchy.
On top of DNS namespace is the ROOT (aka Trailing DOT / Period), beneath ROOT are the First-Level Domains (names) such as COM. EDU. ORG. and beneath First-Level Domains (names) are the Second Level Domains (names) – such as Yahoo.com, VirtualizationMaximus.com – and these are the Domains (names) we are accustomed to.
First-Level Domains are also known as Top-Level Domains.
These Second-Level Domains – such as – VirtualizationMaximus.COM. – are thus a Combination of:
1) Root . (trailing Dot – and it is known as trailing as this Dot will always be appended to a DNS name – whether we specify or not)
2) First-Level Domain – COM.
3) Second-Level Domain name – VirtualizationMaximus
We use a DOT / PERIOD in order to separate First-Level Domains from Second-Level Domains (i.e COM from VirtualizationMaximus). [i.e. DOT is a Delimiter between ROOT & TLDs, Second Level Domains & Third Level Domains ... ...].
When we need to resolve these Domain names into IP Address(es), we will always start reading / parsing the Domain names from Right to Left.
COM, EDU, ORG are among gTLDs , while country code specific such as IN, US, AU lies within ccTLDs category.
And beneath gTLDs lies Yahoo.com. | VirtualizationMaximus.com.
Now we Concisely detail about Resource Records:
NS RR and SOA RR
RR – Resource Record – an ASCII Text entry in the DNS Zones database file which reflects vital information for the associated DNS Domain Zone.
An NS Resource Record, Stores and Displays – which DNS Server(s) / NameServers(s) holds the Data/RR records for the specific Domain. Lets says, a DNS Server which is hosting/holding DNS Records of VirtualizationMaximus.com. - then that DNS Server will be said as “NameServer for VirtualizationMaximus.com.” We can have multiple Servers (DNS Servers precisely) or better said – multiple NameServers – holding/hosting our Domain Zone(s).
A SOA Resource Record, Stores and Displays – which
The DNS Server(s) that hosts/holds Resource Records for VirtualizationMaximus.com. (be it Primary or Secondary | Master or Slave DNS Server) will be known as “Authoritative DNS Server(s)” for VirtualizationMaximus.com and Synonymously – “NameServer(s)” for VirtualizationMaximus.com.
A HOSTA / A Resource Record Stores and Displays – IPv4 Address that has been mapped to a Domain Name, and HOSTA / A RR is the only type of Resource Record that can map an IPv4 address to a Domain Name / Fully Qualified Domain Name (FQDN).
Now that we have required Information, we depict name resolution process using DIG with Iteration:
We will resolve VirtualizationMaximus.com Domain name into IP Address. First, DIG will acquire ROOT NS Servers list from 126.96.36.199 (google-public-dns-a.google.com) and thereby, DIG will go to Root NS Servers (a.root-servers.net. … …), which will point us to gTLDs NS servers (a.gtld-servers.net. … …) and gTLDs NS servers will point us to VirtualizationMaximus.com NS Servers – which in our case are - ns1.wordpress.com | ns2.wordpress.com | ns3.wordpress.com. These NS Servers will provide us IP Address(es) mapped to VirtualizationMaximus.com. Domain name.
C:\Users\Harmandeep>dig +trace VirtualizationMaximus.com @188.8.131.52 ; <<>> DiG 9.3.2 <<>> +trace VirtualizationMaximus.com @184.108.40.206 ; (1 server found) ;; global options: printcmd . 9106 IN NS a.root-servers.net. . 9106 IN NS b.root-servers.net. . 9106 IN NS c.root-servers.net. . 9106 IN NS d.root-servers.net. . 9106 IN NS e.root-servers.net. . 9106 IN NS f.root-servers.net. . 9106 IN NS g.root-servers.net. . 9106 IN NS h.root-servers.net. . 9106 IN NS i.root-servers.net. . 9106 IN NS j.root-servers.net. . 9106 IN NS k.root-servers.net. . 9106 IN NS l.root-servers.net. . 9106 IN NS m.root-servers.net. ;; Received 228 bytes from 220.127.116.11#53(18.104.22.168) in 75 ms com. 172800 IN NS a.gtld-servers.net. com. 172800 IN NS b.gtld-servers.net. com. 172800 IN NS c.gtld-servers.net. com. 172800 IN NS d.gtld-servers.net. com. 172800 IN NS e.gtld-servers.net. com. 172800 IN NS f.gtld-servers.net. com. 172800 IN NS g.gtld-servers.net. com. 172800 IN NS h.gtld-servers.net. com. 172800 IN NS i.gtld-servers.net. com. 172800 IN NS j.gtld-servers.net. com. 172800 IN NS k.gtld-servers.net. com. 172800 IN NS l.gtld-servers.net. com. 172800 IN NS m.gtld-servers.net. ;; Received 499 bytes from 22.214.171.124#53(a.root-servers.net) in 210 ms VirtualizationMaximus.com. 172800 IN NS ns1.wordpress.com. VirtualizationMaximus.com. 172800 IN NS ns2.wordpress.com. VirtualizationMaximus.com. 172800 IN NS ns3.wordpress.com. ;; Received 155 bytes from 126.96.36.199#53(a.gtld-servers.net) in 880 ms VirtualizationMaximus.com. 300 IN A 188.8.131.52 VirtualizationMaximus.com. 300 IN A 184.108.40.206 VirtualizationMaximus.com. 300 IN A 220.127.116.11 VirtualizationMaximus.com. 300 IN A 18.104.22.168 VirtualizationMaximus.com. 300 IN A 22.214.171.124 VirtualizationMaximus.com. 300 IN A 126.96.36.199 VirtualizationMaximus.com. 86400 IN NS ns1.wordpress.com. VirtualizationMaximus.com. 86400 IN NS ns2.wordpress.com. VirtualizationMaximus.com. 86400 IN NS ns3.wordpress.com. ;; Received 251 bytes from 188.8.131.52#53(ns1.wordpress.com) in 447 ms
Hope this Helps and Cheers | Your feedback is highly appreciated.
WaheGuru G Ka Khalsa, WaheGuru G Ki Fateh
Copyright © 2013
For copyright purposes, VirtualizationMaximus.com is not in the public domain. The fact that this blog owner publishes an RSS feed does not grant any rights for republication or re-use of the material except in the manner described below.
All content in this blog created by the blog owner and his guest authors is the property of the blog owner and his guest authors and protected by international copyright laws and cannot be stored on any retrieval system, reproduced, reposted, displayed, modified or transmitted in any form, electronic or otherwise without written permission of the copyright owner except as noted below.
A brief excerpt of content that does not exceed 128 words or 512 characters may be quoted as long as a link is provided back to the source page on this blog and authorship is properly attributed.
Posted on January 8, 2013, in DNS and tagged BIND, DIG, dns, domains, GTLD, hints, host, How, I, internet, iteration, iterative, level, mimic, NS Query, nslookup, Part, part I, public, Query, root, Server 2003, simulate, simulation, top, vmware, Windows DNS Server, works, workstation. Bookmark the permalink. 4 Comments.