回复 2# chenyx
能ping通内网,再ifconfig 有收有发。
[MiniBoard]# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
64 bytes from 192.168.0.1: seq=0 ttl=64 time=2.899 ms
64 bytes from 192.168.0.1: seq=1 ttl=64 time=2.411 ms
64 bytes from 192.168.0.1: seq=2 ttl=64 time=6.500 ms
[MiniBoard]# ifconfig
eth0 Link encap:Ethernet HWaddr 70:64:66:75:66:6C
inet addr:192.168.0.66 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2732 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:233661 (228.1 KiB) TX bytes:476 (476.0 B)
RX bytes:233661 (228.1 KiB) TX bytes:476 (476.0 B)
可是设置默认网关时
[MiniBoard]# route add default gw 10.10.105.20 eth0
route: SIOCADDRT: Network is unreachable
[MiniBoard]# nameserver 202.119.230.8
-/bin/sh: nameserver: not found
[MiniBoard]# ping
www.baidu.com ping: bad address 'www.baidu.com'