Bug 104143 - Ping (and other things) don't obey "search" directive in /etc/resolv.conf
Ping (and other things) don't obey "search" directive in /etc/resolv.conf
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: iputils (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Knirsch
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2003-09-10 10:24 EDT by Christopher C. Weis
Modified: 2015-03-04 20:12 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-09-10 13:56:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Christopher C. Weis 2003-09-10 10:24:27 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
When trying to ping <hostname>.<somedomain>.<somesuperdomain> using only
<hostname>, ping doesn't resolv <hostname>, even though
<somedomain>.<somesuperdomain> is listed in /etc/resolv.conf after the "search"


Let's say we have a machine named host1.mydomain.net.  If I ping
"host1.mydomain.net", it succeeds.  If I try to ping "host1", it fails, even
though in /etc/resolv.conf, I have "search mydomain.net" listed.


hosts:      files dns


order hosts,bind

This seems to be the case with other tools (such as traceroute, ssh, telnet, etc.)

Both "nslookup" and "host" do work correctly.  I.e., both "host
host1.mydomain.net" and "host host1" work.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Add the "domainname" part of a hosts's FQDN into /etc/resolv.conf's "search"
2. "ping <nodename>", where nodename is the node part of the host's FQDN

Actual Results:  (edited to remove real hostnames and IPs)

[root@serv02 root]# ping tarragon
ping: unknown host tarragon
[root@serv02 root]# host tarragon
tarragon.<mydomain> has address aaa.bbb.ccc.yyy

Expected Results:  ( from an identically configured RH9 machine )

[root@test03 tmp]# ping tarragon
PING tarragon.<mydomain> (aaa.bbb.ccc.ddd) 56(84) bytes of data.
64 bytes from tarragon.<mydomain> (aaa.bbb.ccc.ddd): icmp_seq=2 ttl=255 time=2.95 ms
64 bytes from tarragon.<mydomain> (aaa.bbb.ccc.ddd): icmp_seq=3 ttl=255
time=0.188 ms

Additional info:

Every machine that we have uses this same type of configuration and they all
work... except for the RH 2.1ES server.  I'm currently loading up another RH
2.1ES machine to do some more testing.
Comment 1 Christopher C. Weis 2003-09-10 13:56:58 EDT
Ahhh... It's called nscd, and it needs to be restarted after changes are made to

Silly me...

Note You need to log in before you can comment on or make changes to this bug.