Rudi Ahlers
2008-Jul-07 15:25 UTC
[CentOS] how do I find out which nameserver returns a DNS query?
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
Ray Van Dolson
2008-Jul-07 15:28 UTC
[CentOS] how do I find out which nameserver returns a DNS query?
On Mon, Jul 07, 2008 at 05:25:58PM +0200, Rudi Ahlers wrote:> 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?Towards the end of the output there should be a ;; SERVER: line that will tell you. But you should probably just force the query to go to each of your listed servers and figure out which one is bad that way: dig @ns1.myserver query dig @ns2.myserver query etc Ray
Ken Price
2008-Jul-07 15:30 UTC
[CentOS] 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: dig @ns1.myserver domainname.com dig @ns2.myserver domainname.com etc, etc. -Ken ----- Message from Rudi at SoftDux.com --------- Date: Mon, 07 Jul 2008 17:25:58 +0200 From: Rudi Ahlers <Rudi at SoftDux.com> Reply-To: CentOS mailing list <centos at centos.org> Subject: [CentOS] how do I find out which nameserver returns a DNS query? To: CentOS mailing list <centos at 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 at centos.org > http://lists.centos.org/mailman/listinfo/centos----- End message from Rudi at SoftDux.com -----
Rudi Ahlers
2008-Jul-08 07:50 UTC
[CentOS] how do I find out which nameserver returns a DNS query? {SOLVED}
Jonathan Wright wrote:> Rudi Ahlers wrote: >> 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? >> > > Try the +trace option - it will get dig to output the details of each > request on a full resolution (bypassing any local name-server and > performing it's own lookup from the root servers onwards). > > e.g. dig +trace mydomain.co.za >It doesn't lik me :( dig +trace cp.hostfactor.co.za ; <<>> DiG 9.3.3rc2 <<>> +trace cp.hostfactor.co.za ;; global options: printcmd . 36416 IN NS E.ROOT-SERVERS.NET. . 36416 IN NS M.ROOT-SERVERS.NET. . 36416 IN NS G.ROOT-SERVERS.NET. . 36416 IN NS B.ROOT-SERVERS.NET. . 36416 IN NS F.ROOT-SERVERS.NET. . 36416 IN NS L.ROOT-SERVERS.NET. . 36416 IN NS K.ROOT-SERVERS.NET. . 36416 IN NS A.ROOT-SERVERS.NET. . 36416 IN NS D.ROOT-SERVERS.NET. . 36416 IN NS H.ROOT-SERVERS.NET. . 36416 IN NS I.ROOT-SERVERS.NET. . 36416 IN NS J.ROOT-SERVERS.NET. . 36416 IN NS C.ROOT-SERVERS.NET. ;; Received 228 bytes from 4.2.2.1#53(4.2.2.1) in 49 ms Segmentation fault hehe. That's a nice trick though, I noticed after the 3rd attempt that it goes to our domain registrars nameservers, then segment faults again. But I'm sure this will do the trick On another server it worked as expected, and I could see which nameserver returned the query. My reason for looking for this is that we run 2 nameservers, one on Linux & 1 on Windows - serving the same domain, but it's not synced, so I wanted to see what happens if records change on one server and not the other. -- 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