Link to home
Start Free TrialLog in
Avatar of gskortz
gskortzFlag for United States of America

asked on

RHEL Name Resolution Local Host file and DNS

Unable to get name resolution from RHEL 5 /etc/hosts.

/etc/nsswitch.conf includes:

hosts: files dns

Example: /etc/hosts contains:
172.113.100.1       testsservername

host testservername returns: Host testsservername not found: 3(NXDOMAIN)

Thanks
GSK
ASKER CERTIFIED SOLUTION
Avatar of farzanj
farzanj
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What is in your /etc/host.conf ?

It should contain:

order hosts,bind
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gskortz

ASKER

Responding to several comments:
/etc/hosts.conf does contain expect order = hosts,bind

ping does resolve to the expected address so /etc/nsswitch.conf or host.conf acting as expected.

getent hosts [hostname] provides what I need.