Why does nslookup/dig/host not resolve hostnames mentioned in /etc/hosts file in Red Hat Enterprise Linux ?
Issue
nslookupordigorhostdoes not resolve hostnames mentioned in/etc/hostsfile- Performing a DNS lookup of a system in
/etc/hostsfails with the following message:
# nslookup server1
Server: 10.x.x.x
Address: 10.x.x.x#53
** server can't find server1: SERVFAIL
Environment
- Red Hat Enterprise Linux 4
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
