[CentOS] how do I find out which nameserver returns a DNS query?
Rudi at SoftDux.com
Wed Jul 9 15:07:25 UTC 2008
> On Wed, July 9, 2008 10:17 am, Michael Simpson wrote:
>>> Ok, sorry, let me re-phrase.
>>> I want to know on my own server, which of my nameservers replied to the
>>> query. In this example 126.96.36.199 is our ISP's upstream DNS server, which
>>> configured in /etc/resolv.conf - so it should technically appear there.
>>> But, let's say I query host1.myserver.co.za - and myserver.co.za is on
>>> another server, and has ns1.myserver.co.za, ns2.myserver.co.za,
>>> ns3myserver.co.za & ns4.myserver.co.za
>>> So, as far as I know, any one of those can reply (round robbin DNS?),
>>> but I
>>> would like to know which one replies for this particular dig. Is that
>>> possible? I don't want to specify a server to query, I want to find out
>>> which of the 4 returns the query. If it's a cached reply, does it mean I
>>> won't see it?
> At the end of your dig reply you will see the following..
> ;; Query time: 26 msec
> ;; SERVER: 127.0.0.1#53(127.0.0.1)
> ;; WHEN: Wed Jul 9 10:49:40 2008
> ;; MSG SIZE rcvd: 297
> That tells you which server answered the query.
I think you have missed a reply on this topic :)
That's the ISP's DNS server you see there.
dig +trace domain is what I needed
Check out my technical blog, http://blog.softdux.com for Linux or other technical stuff, or visit http://www.WebHostingTalk.co.za for Web Hosting stuff
More information about the CentOS