Discussion:
ping DNS issue! ping returns "unknown host www.yahoo.com" but ping to IP works fine.
Nikhil Gautam
2009-08-12 18:55:35 UTC
Permalink
I am trying to get the ping working in Android running on ARM.

Ping to IP addresses works fine but when I ping to name I get

"ping: unknown host www.yahoo.com"

I have already setup the default gateway:
route add default gw 192.168.0.17

Also /etc/resolv.conf is also there:
echo nameserver 4.2.2.2 > /etc/resolv.conf

And ping to nameserver works fine!

Also I have /etc/nsswitch.conf as:
echo "hosts: files dns" > /etc/nsswitch.conf

If I add entries in /etc/hosts then the ping with name works fine.

Has anyone seen this problem before?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Android Internals" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to android-internals+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/android-internals?hl=en
-~----------~----~----~----~------~----~------~--~---

Loading...