DNS Name lookup test failed

Hi All.

I am able to resolve dns names using nslookup on my linux but if I ping a domain name it says unkown host..!!!!!!

any clue???
Who is Participating?
jlevieConnect With a Mentor Commented:
Check the contents of /etc/resolv.conf and make sure that it specifies valid "nameserver"s. Also check /etc/nsswitch.conf to be sure that "hosts" includes at least "files dns".
If you ping by ip then does that work ?
lastAuthor Commented:
yes I can ping the IP.
Then it should work if you can do this things:
1. Do a nslookup of a ip.
2. Ping the ip
then the ping domain name will work too, because it does just these steps.

pablouruguayConnect With a Mentor Commented:
here is an example of /etc/resolv.conf

[pablo@omega Mail]$ cat /etc/resolv.conf
search antel.com

and is nsswitch,.conf you need to have this

#hosts:     db files nisplus nis dns
hosts:      files dns

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.