LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-10-2011, 02:45 PM   #1
LucL
LQ Newbie
 
Registered: Mar 2007
Posts: 7

Rep: Reputation: 0
DIG, why it's behaving like this...


Quick question guys...

I'm working on a Java based DNS scanner that checks the actual name servers (ns record) for a particular domain. I've ran into a problem where some domains simply can't be checked, although they do have a name server.

Anyways, dig seems to be able to check them, but only if I run it without any paramaters...

ex:

dig ns amnhac24h.us

# dig ns amnhac24h.us

; <<>> DiG 9.3.4-P1 <<>> ns amnhac24h.us
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 29686
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;amnhac24h.us. IN NS

;; Query time: 64 msec
;; SERVER: 65.182.168.10#53(65.182.168.10)
;; WHEN: Thu Mar 10 15:09:58 2011
;; MSG SIZE rcvd: 30

but

dig amnhac24h.us


; <<>> DiG 9.3.4-P1 <<>> amnhac24h.us
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43897
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0

;; QUESTION SECTION:
;amnhac24h.us. IN A

;; ANSWER SECTION:
amnhac24h.us. 84030 IN A 174.120.120.196

;; AUTHORITY SECTION:
amnhac24h.us. 2012 IN NS SK.S5.BNS1.NS96.SEARCHREINVENTED.COM.
amnhac24h.us. 2012 IN NS SK.S5.BNS2.NS96.SEARCHREINVENTED.COM.

;; Query time: 1 msec
;; SERVER: 65.182.168.10#53(65.182.168.10)
;; WHEN: Thu Mar 10 15:10:19 2011
;; MSG SIZE rcvd: 121

Any idea why an NS lookup would fail (just on this domain), while dig lookup without any parameters works?

I checked the .us zone file, and there is a name server record for this domain.

PS, I checked 5 of the most popular DNS libraries for Java and they all fail NS loookups on certain domains (ex: amnhac24h.us, adoptanolympian.org).

Thanks,
Luc

Last edited by LucL; 03-10-2011 at 03:14 PM.
 
Old 03-10-2011, 03:12 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
can you provide more detailed output? You've got the first half of a dig for the first bit, and the second part for the second.
 
Old 03-10-2011, 03:14 PM   #3
LucL
LQ Newbie
 
Registered: Mar 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Updated with complete output from dig.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BIND9: dig <hostname> doesn't work, dig <hostname.domain.tld> does. jhwilliams Linux - Server 2 04-09-2010 01:01 PM
dig @ works, dig doesn't eelgueta Linux - Networking 6 07-09-2007 06:45 PM
my computer is not behaving right way Paxmaster Linux - General 4 06-20-2005 12:43 AM
KDE not behaving Andy@DP Linux - Newbie 1 04-21-2004 05:13 PM
Samba not behaving richcoosa19 Linux - Networking 9 07-28-2003 10:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration