LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   why host google.com working and ping google.com not ? (http://www.linuxquestions.org/questions/linux-networking-3/why-host-google-com-working-and-ping-google-com-not-493371/)

gudneo 10-17-2006 10:59 PM

name to ip resolution is not working .. Strange Scenario ...
 
Hi All,

I am using debian and net is connected to this debian system and it is shared. I have a user account in this machine, which i use for my daytoday works. But today when i login as user i am not able to browse internet using firefox or any other browser (elinks also). But the hosts (net is shared from this system) are getting internet without any problem. I checked my resolv.conf .. it is fine. I flushed all my iptables including nat. The condition is the same.

This is the output after turning of firewall,

host google.com
google.com has address 72.14.207.99
google.com has address 64.233.167.99
google.com has address 64.233.187.99

ping google.com
ping: unknown host google.com

ping 72.14.207.99
PING 72.14.207.99 (72.14.207.99) 56(84) bytes of data.
64 bytes from 72.14.207.99: icmp_seq=1 ttl=235 time=335 ms
64 bytes from 72.14.207.99: icmp_seq=2 ttl=235 time=333 ms

elinks google.com
Host not found

elinks 72.14.207.99
Google home page.

I gave google as an example. This is the problem for all web addresses. name to ip resolution is not taking place when we use a browser.

Could you please help me to solve this strange problem.

Regards
Neo

cereal83 10-17-2006 11:03 PM

Maybe because google is down or they are slow.

gudneo 10-17-2006 11:27 PM

Hi cereal83,

I gave google.com as an example.
It is same for all web addresses. Name to ip resolution is not taking place when using a browser. But host command will return the ip address.

I can't figure out a reson for that.

Regards
Neo

gudneo 10-19-2006 12:56 AM

Hi Friends,

Thank you for posting ...

Solved the problem,


Open .. /etc/nsswitch.conf, see "hosts: files dns" is in this order.

Regards
Neo


All times are GMT -5. The time now is 01:06 PM.