Bug 187123

Summary: 'host' and 'dig' don't look up the server address in DNS
Product: [Fedora] Fedora Reporter: Russell McOrmond <russell>
Component: bindAssignee: Jason Vas Dias <jvdias>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-28 17:20:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Russell McOrmond 2006-03-28 17:06:37 UTC
Description of problem:

There is a parameter for both 'host' and 'dig' which can be used to point to a
different nameserver.   While it is possible to use the IPv4 address, it seems
to no longer be possible to specify a hostname.

Version-Release number of selected component (if applicable):
bind-utils-9.3.1-18.FC4
  - Problem only appeared with this very recent update.


How reproducible:  Always


Steps to Reproduce:

Examples using both host and dig.  In the cases where I specify the hostname of
the DNS server I expected to get the same results as when I specify the IP address.

[russell@amadpur ~]>host pns.flora.c
Host pns.flora.c not found: 3(NXDOMAIN)
[russell@amadpur ~]>host pns.flora.ca
pns.flora.ca has address 192.139.46.244
[russell@amadpur ~]>host pns.flora.ca pns.flora.ca
host: couldn't get address for 'pns.flora.ca': failure
[russell@amadpur ~]>host pns.flora.ca 192.139.46.244
Using domain server:
Name: 192.139.46.244
Address: 192.139.46.244#53
Aliases:

pns.flora.ca has address 192.139.46.244
Using domain server:
Name: 192.139.46.244
Address: 192.139.46.244#53
Aliases:

Using domain server:
Name: 192.139.46.244
Address: 192.139.46.244#53
Aliases:

[russell@amadpur ~]>

[russell@amadpur ~]>dig A pns.flora.ca

; <<>> DiG 9.3.1 <<>> A pns.flora.ca
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4040
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1

;; QUESTION SECTION:
;pns.flora.ca.                  IN      A

;; ANSWER SECTION:
pns.flora.ca.           3600    IN      A       192.139.46.244

;; AUTHORITY SECTION:
flora.ca.               3600    IN      NS      pns.flora.ca.
flora.ca.               3600    IN      NS      sns.flora.ca.

;; ADDITIONAL SECTION:
sns.flora.ca.           3600    IN      A       192.139.46.131

;; Query time: 2 msec
;; SERVER: 192.168.168.254#53(192.168.168.254)
;; WHEN: Tue Mar 28 12:09:14 2006
;; MSG SIZE  rcvd: 94

[russell@amadpur ~]>dig A pns.flora.ca @pns.floraca
dig: couldn't get address for 'pns.floraca': failure
[russell@amadpur ~]>dig A pns.flora.ca @192.139.46.244

; <<>> DiG 9.3.1 <<>> A pns.flora.ca @192.139.46.244
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25042
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1

;; QUESTION SECTION:
;pns.flora.ca.                  IN      A

;; ANSWER SECTION:
pns.flora.ca.           3600    IN      A       192.139.46.244

;; AUTHORITY SECTION:
flora.ca.               3600    IN      NS      pns.flora.ca.
flora.ca.               3600    IN      NS      sns.flora.ca.

;; ADDITIONAL SECTION:
sns.flora.ca.           3600    IN      A       192.139.46.131

;; Query time: 119 msec
;; SERVER: 192.139.46.244#53(192.139.46.244)
;; WHEN: Tue Mar 28 12:09:26 2006
;; MSG SIZE  rcvd: 94

[russell@amadpur ~]>

Comment 1 Russell McOrmond 2006-03-28 17:20:53 UTC
Apologies:  I noticed the same problem with other tools, and looked elsewhere. 
Seems that my old /etc/nsswitch.conf was referencing 'nisplus' which is not there.  

A simple:  `mv nsswitch.conf.rpmnew nsswitch.conf`  in /etc/ to use the new
default config file ended up fixing the problem.