- 论坛徽章:
- 0
|
本帖最后由 newxzc 于 2010-11-09 23:58 编辑
一块嵌入式的板子,用的是cramfs文件系统。通过udhcpc正常获取的ip dns gw 等。
- # udhcpc -i eth1
- udhcpc (v1.14.2) started
- Sending discover...
- Sending select for 192.168.0.3...
- Lease of 192.168.0.3 obtained, lease time 86400
- deleting routers
- route: SIOCDELRT: No such process
- adding route 192.168.0.1
- adding dns 192.168.0.1
复制代码- # route
- Kernel IP routing table
- Destination Gateway Genmask Flags Metric Ref Use Iface
- 192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
- default 192.168.0.1 0.0.0.0 UG 0 0 0 eth1
复制代码 怀疑是dns解析的问题,手动加了备用dns- echo nameserver 202.106.0.20 >> /etc/resolv.conf
- export nameserver=202.106.0.20
复制代码 BAIDU的ip可以通!- # ping 61.135.169.105
- PING 61.135.169.105 (61.135.169.105): 56 data bytes
- 64 bytes from 61.135.169.105: seq=0 ttl=55 time=14.338 ms
- 64 bytes from 61.135.169.105: seq=1 ttl=55 time=4.542 ms
复制代码- # cat /etc/resolv.conf
- nameserver 192.168.0.1
- nameserver 202.106.0.20
复制代码 域名解析有问题- # ping www.google.com
- ping: bad address 'www.google.com'
- # ping www.baidu.com
- ping: bad address 'www.baidu.com'
复制代码 |
|