how do I find out which nameserver returns a DNS query?
DIG tells you which server returned the results. Look for the SERVER
line, should be third from the bottom. If you want to query specific
nameservers directly, use dig like this:
----- Message from Rudi@SoftDux.com ---------
Date: Mon, 07 Jul 2008 17:25:58 +0200
From: Rudi Ahlers <Rudi@SoftDux.com>
Reply-To: CentOS mailing list <centos@centos.org>
Subject: [CentOS] how do I find out which nameserver returns a DNS query?
To: CentOS mailing list <centos@centos.org>
Hi all
If I do a "dig mydomain.co.za" from a Linux server, how do I know which
DNS nameserver returns the queries?
I seem to have a faulty DNS server, but can't see which one, so I want
to find out which nameserver (if there's 4 - ns1.myserver,
ns2.myserver, ns3.myserver & ns4.myserver) returns the queries?
--
Kind Regards
Rudi Ahlers
CEO, SoftDux
Web: http://www.SoftDux.com
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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
----- End message from Rudi@SoftDux.com -----
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
07-07-2008, 03:38 PM
Rudi Ahlers
how do I find out which nameserver returns a DNS query?
Ken Price wrote:
DIG tells you which server returned the results. Look for the SERVER
line, should be third from the bottom. If you want to query specific
nameservers directly, use dig like this:
----- Message from Rudi@SoftDux.com ---------
Date: Mon, 07 Jul 2008 17:25:58 +0200
From: Rudi Ahlers <Rudi@SoftDux.com>
Reply-To: CentOS mailing list <centos@centos.org>
Subject: [CentOS] how do I find out which nameserver returns a DNS
query?
To: CentOS mailing list <centos@centos.org>
Hi all
If I do a "dig mydomain.co.za" from a Linux server, how do I know which
DNS nameserver returns the queries?
I seem to have a faulty DNS server, but can't see which one, so I want
to find out which nameserver (if there's 4 - ns1.myserver,
ns2.myserver, ns3.myserver & ns4.myserver) returns the queries?
I know I can dig @server - but I want to know which is the active server
that returns a result at the moment
--
Kind Regards
Rudi Ahlers
CEO, SoftDux
Web: http://www.SoftDux.com
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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
07-07-2008, 03:48 PM
Ken Price
how do I find out which nameserver returns a DNS query?
This line ...
;; SERVER: 4.2.2.1#53(4.2.2.1)
... tells you the DNS server which returned the result, which in this
case, is more than likely a caching (recursive) DNS server. If
verbose enough logging is enabled on that caching server, it should
tell you which primary DNS server returned a particular query result.
The "@ns1.myserver" feature in DIG allows you to do that test directly
from your workstation to the primary DNS server(s). Is there any
particular reason this won't work for you? Perhaps if you explained
your problem in more detail, someone on this list could offer
alternative methods of troubleshooting.
Regards,
Ken
----- Message from Rudi@SoftDux.com ---------
Date: Mon, 07 Jul 2008 17:38:22 +0200
From: Rudi Ahlers <Rudi@SoftDux.com>
Reply-To: CentOS mailing list <centos@centos.org>
Subject: Re: [CentOS] how do I find out which nameserver returns a DNS query?
To: CentOS mailing list <centos@centos.org>
I know I can dig @server - but I want to know which is the active
server that returns a result at the moment
--
Kind Regards
Rudi Ahlers
CEO, SoftDux
Web: http://www.SoftDux.com
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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
----- End message from Rudi@SoftDux.com -----
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
07-07-2008, 04:03 PM
Rudi Ahlers
how do I find out which nameserver returns a DNS query?
Ken Price wrote:
This line ...
;; SERVER: 4.2.2.1#53(4.2.2.1)
... tells you the DNS server which returned the result, which in this
case, is more than likely a caching (recursive) DNS server. If
verbose enough logging is enabled on that caching server, it should
tell you which primary DNS server returned a particular query result.
The "@ns1.myserver" feature in DIG allows you to do that test directly
from your workstation to the primary DNS server(s). Is there any
particular reason this won't work for you? Perhaps if you explained
your problem in more detail, someone on this list could offer
alternative methods of troubleshooting.
Regards,
Ken
----- Message from Rudi@SoftDux.com ---------
Date: Mon, 07 Jul 2008 17:38:22 +0200
From: Rudi Ahlers <Rudi@SoftDux.com>
Reply-To: CentOS mailing list <centos@centos.org>
Subject: Re: [CentOS] how do I find out which nameserver returns a
DNS query?
I know I can dig @server - but I want to know which is the active
server that returns a result at the moment
--
Ok, sorry, let me re-phrase.
I want to know on my own server, which of my nameservers replied to the
DNS query. In this example 4.2.2.1 is our ISP's upstream DNS server,
which is 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?
--
Kind Regards
Rudi Ahlers
CEO, SoftDux
Web: http://www.SoftDux.com
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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos