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

470 görüntüleme
İlk okunmamış mesaja atla

Nikhil Gautam

okunmadı,
12 Ağu 2009 14:55:3512.08.2009
alıcı android-...@googlegroups.com
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?
Tümünü yanıtla
Yazarı yanıtla
Yönlendir
0 yeni ileti