Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-03-2009, 02:34 PM   #1
LQ Newbie
Registered: Jun 2005
Posts: 21

Rep: Reputation: 15
resolv.conf fine, but still cannot ping by host name

Using red hat and have configured ifcfg-eth0 file using both dhcp and a static IP and neither configuration works for ping by host name. Resolv.conf has only one domain list and two nameservers and they are correct. Can ping internal and internet addresses by IP just fine. Have looked at many other posts, but still cannot find answer. Any ideas?
Old 04-03-2009, 02:37 PM   #2
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
what is the result of
Old 04-03-2009, 02:43 PM   #3
LQ Newbie
Registered: Apr 2009
Posts: 27

Rep: Reputation: 17
try to dig() the host name, from the terminal.

so "dig"

also did you add "dns" to the host section of /etc/nsswitch.conf

Last edited by Recursion; 04-03-2009 at 02:49 PM.
Old 04-03-2009, 03:10 PM   #4
LQ Newbie
Registered: Jun 2005
Posts: 21

Original Poster
Rep: Reputation: 15

It was a problem with the /etc/nsswitch.conf. Thanks so much!
Old 04-03-2009, 03:12 PM   #5
LQ Newbie
Registered: Apr 2009
Posts: 27

Rep: Reputation: 17
That one always gets me to. Im glad you got it fixed.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bind9 ,host does reslove a dns name but ping says unknown host Byenary Linux - Networking 10 01-12-2011 01:33 AM
host: parse of /etc/resolv.conf failed D.A. Linux - Software 4 08-09-2007 12:30 PM
DNS Hosts.conf or resolv.conf problem mac_casey SUSE / openSUSE 0 03-26-2006 09:21 AM
PPP establish can ping the gateway router but unable to ping the host deepalalla Linux - Networking 0 11-18-2004 09:10 AM
3c509 cant ping out - others ping it fine! chosmer Linux - Newbie 1 03-04-2002 04:56 PM

All times are GMT -5. The time now is 08:06 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration