ping DNS issue! ping returns "unknown host" but ping to IP works fine.

Skip to first unread message

Nikhil Gautam

Aug 12, 2009, 2:55:35 PM8/12/09
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"

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

Also /etc/resolv.conf is also there:
echo nameserver > /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?
Reply all
Reply to author
0 new messages