您使用手机的数据连接而不是通过主机的 USB 连接到互联网。因此,您的设备和主机之间没有网络连接。此外,由于您的主机没有公共 IP 地址(它位于多级 NAT 的后面,从 IP 中可以看出至少一级),因此设备不可能通过公共互联网 ping 您的主机。
至于检查网络连接,您可以尝试以下方法:
输出:
/ $ ping -c1 www.google.com
PING www.google.com (74.125.236.51) 56(84) bytes of data.
64 bytes from www.google.com (74.125.236.51): icmp_seq=1 ttl=55 time=40.8 ms
64 bytes from www.google.com (74.125.236.51): icmp_seq=2 ttl=55 time=47.1 ms
--- www.google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 40.850/43.999/47.148/3.149 ms
- 检查网络连接:
busybox ifconfig -a
输出(剪掉一点):
eth0 Link encap:Ethernet HWaddr 5C:4C:A9:FC:B0:C0
inet addr:192.168.2.3 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::5e4c:a9ff:fefc:b0c0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:359 errors:0 dropped:0 overruns:0 frame:0
TX packets:275 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:87543 (85.4 KiB) TX bytes:48382 (47.2 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:620 errors:0 dropped:0 overruns:0 frame:0
TX packets:620 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:74037 (72.3 KiB) TX bytes:74037 (72.3 KiB)
rmnet0 Link encap:Ethernet HWaddr 9E:43:B5:97:81:B1
inet addr:106.197.224.94 Bcast:106.197.224.95 Mask:255.255.255.252
BROADCAST MULTICAST MTU:2000 Metric:1
RX packets:54337 errors:0 dropped:0 overruns:0 frame:0
TX packets:59160 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:32720935 (31.2 MiB) TX bytes:8334589 (7.9 MiB)
<snipped value="rmnet1,rmnet2" />
sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
<snipped value="tunl0,usb0" />