Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 01-06-2012, 03:00 PM   #1
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:
[root@admin ~]# host abc012
abc012.old.sub.dom has address

[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:
[root@admin ~]# host def005 has address

[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.
[root@admin ~]# ping abc012
PING abc012.old.sub.dom ( 56(84) bytes of data.
64 bytes from abc012.old.sub.dom ( icmp_seq=1 ttl=64 time=0.127 ms
64 bytes from abc012.old.sub.dom ( icmp_seq=2 ttl=64 time=0.110 ms
64 bytes from abc012.old.sub.dom ( 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?

Old 01-06-2012, 04:10 PM   #2
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,821

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591

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 :
dig abc012 +se
to see if it works

1 members found this post helpful.


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 > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:36 AM.

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