LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 01-06-2012, 03:00 PM   #1
dafydd2277
Member
 
Registered: Mar 2010
Posts: 58

Rep: Reputation: 5
"host" works, "dig" fails... what?


So, I just added a new subnet and subdomain to my DNS environment. "host" sees the new just fine, but "dig" fails? In fact, dig even fails to a subdomain that has been around a while. (The new subnet is next to the old one, and they've been combined with a 23-bit netmask.)

...

What? They're both making the same query to the same DNS server based on the same resolv.conf file.


Existing subdomain/subnet:
Code:
[root@admin ~]# host abc012
abc012.old.sub.dom has address 192.168.22.192

[root@admin ~]# dig abc012
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_5.3 <<>> abc0012
;; global options:  printcmd
;; connection timed out; no servers could be reached
New subdomain/subnet:
Code:
[root@admin ~]# host def005
def005.new.sub.dom has address 192.168.23.107

[root@admin ~]# dig def005
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_5.3 <<>> def005
;; global options:  printcmd
;; connection timed out; no servers could be reached
It gets even weirder! Ping and ssh split the difference. They see the old one, but not the new one.
Code:
[root@admin ~]# ping abc012
PING abc012.old.sub.dom (192.168.22.192) 56(84) bytes of data.
64 bytes from abc012.old.sub.dom (192.168.22.192): icmp_seq=1 ttl=64 time=0.127 ms
64 bytes from abc012.old.sub.dom (192.168.22.192): icmp_seq=2 ttl=64 time=0.110 ms
64 bytes from abc012.old.sub.dom (192.168.22.192): icmp_seq=3 ttl=64 time=0.102 ms

--- abc012.old.sub.dom ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 0.102/0.111/0.127/0.009 ms

[root@admin ~]# ping def005
ping: unknown host def005
Dubya Tee Eff, Ovah? ;-)

Any ideas out there?

dafydd
 
Old 01-06-2012, 04:10 PM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,905

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
Hi,

By default digs needs a FQDN, unless using the +search option (or +se). In that case it looks in /etc/resolv.conf for the domains defined by the search directive.
Since host can resolve both old and new subdomains, I guess they are both present in the search line of /etc/resolv.conf.
Try :
Code:
dig abc012 +se
to see if it works

Regards
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
evdev/xorg help? USB mouse/kbd: 2.6.24="just works">2.6.25="unplug/replug to work". GrapefruiTgirl Linux - Hardware 4 12-13-2012 02:23 PM
[SOLVED] "C preprocessor "/lib/cpp" fails sanity check" every single time. masmddr Linux - Software 3 08-03-2010 10:37 AM
glibc 2.9 "make check" fails on rt/tst-cputimer with "timer sig[12] invoked to soon" shachter Linux - Software 2 02-14-2009 01:24 PM
"dig mx" and "ping google" do not work when bind9 runs.. why? alexxxis Linux - Software 4 01-07-2007 03:16 AM
"dig mx" or "ping" not working because of bind9? alexxxis Debian 4 01-06-2007 11:26 PM


All times are GMT -5. The time now is 02:14 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration