Solved

How the internet DNS query works

Posted on 2010-09-04
22
376 Views
Last Modified: 2012-06-27
I have internet DNS servers by which i am managing my domains.
I do also have secondary DNS services from my ISP DNS servers.
My query is when a query for any dns resolution comes to my DNS servers it checks for cache. if present it will reply. If it does not have the cache which dns server will it query it further and how.
Will it query my secondary DNS service DNS servers or some other servers.
0
Comment
Question by:SrikantRajeev
  • 9
  • 8
  • 3
  • +2
22 Comments
 
LVL 1

Expert Comment

by:ManoranjanSinha
ID: 33604419
Yes it will check from the secondary DNS servers and it will works.
0
 
LVL 1

Author Comment

by:SrikantRajeev
ID: 33604447
u mean it will check with my ISP DNS servers whose servers
0
 
LVL 1

Author Comment

by:SrikantRajeev
ID: 33604456
i thought it contacts the root server
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 3

Expert Comment

by:moonlight
ID: 33604460
it all depends on how you have setup your dns. first of all, what dns server do you have, how do the configuration files look like. You can easily check if your dns server is a resolver or not, just issue the following from any computer, to query YOUR dns:

nslookup google.com <yourdnsserver>

if its a resolver you would get googles ips, if not, it would say domain not existent
0
 
LVL 1

Author Comment

by:SrikantRajeev
ID: 33604481
it gives me query refused
0
 
LVL 3

Expert Comment

by:moonlight
ID: 33604485
instead of google.com, use one of your own domains, what does it say then?
0
 
LVL 1

Author Comment

by:SrikantRajeev
ID: 33604522
it resolves and gives the IP address
0
 
LVL 1

Author Comment

by:SrikantRajeev
ID: 33604525
if my machine inside queires for yahoo.com & if my dns server does not have cache for it which futher dns server will it query
0
 
LVL 14

Expert Comment

by:theras2000
ID: 33604528
Hi Srikant.  It all depends whether you have configured a forwarder or not.  If you configure a forwarder (e.g. your ISP's DNS) then it will look there.  Otherwise, you're correct it would go to the root servers.  Here's a neat little page with scenarios:
http://www.windowsnetworking.com/articles_tutorials/DNS_Conditional_Forwarding_in_Windows_Server_2003.html
0
 
LVL 3

Expert Comment

by:moonlight
ID: 33604557
That's not how it works really, when your machine querys a name, it querys the resolver that either you have setup in your tcp/ip settings or the settings that your ISP has pushed to your computer when you got connected to the net. If the resolver have your domain in cache, it answers it, if it does not, it goes to the root server with your domain name, the root server says, please go to this address, then the resolver goes to that one and gives the same query, and so forth, until it comes to YOUR dns server. This means your dns server does not have to be a resolver. It only needs to provide authoriative answers for your domains.

If you are inside your server and you issue a query, you will probably not use your own dns server, you are using the datacenters resolvers. to see this just write nslookup. then you will see a line saying default server.

usually domain name servers are NOT used as resolvers. So the query refused message actually makes sense.
0
 
LVL 27

Expert Comment

by:davorin
ID: 33605000
Just my 2 cents:
When you make a DNS query, first your computer will query DNS server specified in ipconfig. If that server can resolve that name you will get IP, otherwise:
a) if that server has specified DNS forwarder(s), the server will query that forwarders and if they have cached resolution you will get IP, otherwise look step b.
b) if you don't have specified forwarders or forwarders can not resolve domain name your computer will be directer to DNS root server, DNS root server will direct you to DNS server authoritative for the first level resolution of queried domain (.com, . ua, .fr,...). That server will direct you to DNS server authoritative for the second level of queried domain (eg. something.com). Normally that server will give you needed IP of queried domain www.something.com. Sometimes you will require more than two steps from root server.
You can go to http://www.dnswatch.info/ and enter a DNS lookup for certain domain name and you will see exactly which servers are queried. Your specified DNS servers in that query does not take part. The query begins in step b.
In other words theras2000 is right.
0
 
LVL 3

Expert Comment

by:moonlight
ID: 33605769
'Just for clarification, I was referreing to OP's own comment, not theras2000. somehow he came in between...
0
 
LVL 14

Expert Comment

by:theras2000
ID: 33605928
I thought that was a bit strange. ;>
0
 
LVL 1

Author Comment

by:SrikantRajeev
ID: 33606292
how can i check if my DNS server is configured as forwarder or not
0
 
LVL 14

Expert Comment

by:theras2000
ID: 33606313
There was a screenshot on my link showing you going to the server's Properties, in the DNS mgmt tool ... that's assuming it's Windows.  You haven't said what you're using.
0
 
LVL 3

Expert Comment

by:moonlight
ID: 33606665
if you are using bind, check in named.conf
0
 
LVL 1

Author Comment

by:SrikantRajeev
ID: 33609128
i have the bind config.
What exactly should i look for in it
0
 
LVL 3

Expert Comment

by:moonlight
ID: 33609418
a forwarders statement. See link for description of different statements:
http://www.zytrax.com/books/dns/ch7/queries.html
0
 
LVL 1

Author Comment

by:SrikantRajeev
ID: 33609848
can any DNS server can connect to root server or is there any hierarchy or only particular servers can connect to the root servers
0
 
LVL 3

Accepted Solution

by:
moonlight earned 500 total points
ID: 33610233
all can, since you even can do it with a nslookup from your own computer. They only answer partially though and direct you to the next name server down the hierarchy, so there is no point in query them once you know the correct name server handling a domain.
0
 
LVL 3

Expert Comment

by:moonlight
ID: 33657298
any issue left?
0
 
LVL 1

Author Closing Comment

by:SrikantRajeev
ID: 33775775
Thanks
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is intended as an extension of a blog on Aging and Scavenging by the MS Enterprise Networking Team. In brief, Scavenging is used as follows: Each record in a zone which has been dynamically registered with an MS DNS Server will have…
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question