LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Unable to ping : ping: unknown host (https://www.linuxquestions.org/questions/linux-networking-3/unable-to-ping-ping-unknown-host-594221/)

PKumar 10-24-2007 09:43 AM

Unable to ping : ping: unknown host
 
Unable to ping google.com or ant other site or even localhost
[root@ps4 lib]# ping google.com
ping: unknown host google.com

[root@ps4 lib]# ping localhost
ping: unknown host localhost,

However, ping works with IP addresses.
[root@ps4 lib]# ping 64.233.187.99
PING 64.233.187.99 (64.233.187.99) 56(84) bytes of data.
64 bytes from 64.233.187.99: icmp_seq=1 ttl=247 time=75.3 ms
64 bytes from 64.233.187.99: icmp_seq=2 ttl=247 time=75.3 ms
64 bytes from 64.233.187.99: icmp_seq=3 ttl=247 time=75.4 ms
64 bytes from 64.233.187.99: icmp_seq=4 ttl=247 time=75.2 ms
64 bytes from 64.233.187.99: icmp_seq=5 ttl=247 time=75.3 ms
64 bytes from 64.233.187.99: icmp_seq=6 ttl=247 time=75.3 ms

--- 64.233.187.99 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 4999ms
rtt min/avg/max/mdev = 75.274/75.346/75.458/0.169 ms

PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.049 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.052 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.038 ms

--- 127.0.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.038/0.046/0.052/0.008 ms


my , /etc/resolv.conf is correct nameserver because its working for other linux box.

thanks in advance.

TooSlow 10-24-2007 03:31 PM

PKumar- Localhost should be resolved by /etc/hosts so check that file to make sure it is correct. IP looks to be correct since you can ping directly from IP.

Try moving the order of your DNS servers in resolv.conf and set another one at the top, to see if it helps. If it doesn't, try to do a manual lookup from a terminal window to see if the DNS server(s) are allowing you to connect and are willing to resolve names for you. I can't remember how to do it off the top of my head. In Windows it is nslookup, can't recall how to do it in Linux. Sorry I can't be more help, but that should at least point you in the right direction.

Actually (just thought of this) also compare the /etc/hosts files on the two Linux boxes, it may point you to the problem.

PKumar 10-30-2007 04:53 AM

hi, thanks I got the sol, its problem with my ISP level. thanks :)

TooSlow 10-30-2007 07:25 AM

Pkumar - Great to hear you solved it! If you have time, could you give a bit more detail in case others do a search and come across this post? Your solution will likely help others as well!

PKumar 10-31-2007 12:43 AM

my mistake :

File name, is /etc/resolv.conf and not /etc/resolve.conf.

I made the file /etc/resolve.conf and tried hard to fix the problem, but after 2-3 days suddenly I noticed my mistake.

Once, I renamed the file then its worked.

So, moral of the story : Always check the basic thing carefully before moving to next higher step.

And thanks for your help.


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