当前位置: 代码迷 >> Wireless >> 请问:开发板能ping IP,不能ping域名…
  详细解决方案

请问:开发板能ping IP,不能ping域名…

热度:2317   发布时间:2013-02-26 00:00:00.0
请教:开发板能ping IP,不能ping域名……
在开发板上移植3G模块,交叉编译pppd拨号,将pppd和chat传到开发板上,成功连接了网络。

连接网络时分配的IP及DNS:
C/C++ code
local  IP address 172.19.18.45remote IP address 10.64.64.64primary   DNS address 210.21.196.6secondary DNS address 221.5.88.88


在/etc/resolv.conf添加DNS服务器地址
C/C++ code
# cat /etc/resolv.confnameserver 210.21.196.6nameserver 221.5.88.88


ping通百度的IP
C/C++ code
# ping 220.181.112.143   PING 220.181.112.143 (220.181.112.143): 56 data bytes64 bytes from 220.181.112.143: seq=0 ttl=46 time=1952.636 ms64 bytes from 220.181.112.143: seq=1 ttl=46 time=975.464 ms64 bytes from 220.181.112.143: seq=2 ttl=46 time=256.408 ms64 bytes from 220.181.112.143: seq=3 ttl=46 time=295.257 ms^C--- 220.181.112.143 ping statistics ---4 packets transmitted, 4 packets received, 0% packet lossround-trip min/avg/max = 256.408/869.941/1952.636 ms


不能识别百度的域名
C/C++ code
# ping www.baidu.com    ping: bad address 'www.baidu.com'


C/C++ code
# nslookup www.baidu.comServer:    210.21.196.6Address 1: 210.21.196.6nslookup: can't resolve 'www.baidu.com'#


能ping通域名服务器。


各位高手请指教指教,谢谢。




------解决方案--------------------------------------------------------
不能根据域名解析出IP,明显应该是dns的问题。