我尝试将我的旧 Windows Mobile 6 手机与 Ubuntu 计算机连接起来以使用手机的网络。然而,即使内核似乎可以识别手机并且将其用作网络设备,我也无法从 http 请求接收任何数据包。
以下输出来自 dmesg:
[ 230.884554] rndis_host 1-1.1:1.0: dev can't take 1558 byte packets (max 1536), adjusting MTU to 1478
[ 230.892791] rndis_host 1-1.1:1.0: RNDIS_MSG_QUERY(0x00010202) failed, -47
[ 230.910356] rndis_host 1-1.1:1.0: eth1: register 'rndis_host' at usb-0000:00:1a.0-1.1, RNDIS device, 80:00:60:0f:e8:00
[ 230.910382] usbcore: registered new interface driver rndis_host
[ 241.853911] eth1: no IPv6 routers present
因此,手机被识别为 eth1:
eth1 Link encap:Ethernet HWaddr 80:00:60:0f:e8:00
inet addr:192.168.0.57 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::8200:60ff:fe0f:e800/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1478 Metric:1
RX packets:953 errors:759 dropped:0 overruns:0 frame:0
TX packets:1223 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:197786 (197.7 KB) TX bytes:224916 (224.9 KB)
ping 互联网地址也有效:
PING www.l.google.com (173.194.69.105) 56(84) bytes of data.
64 bytes from bk-in-f105.1e100.net (173.194.69.105): icmp_req=1 ttl=40 time=299 ms
64 bytes from bk-in-f105.1e100.net (173.194.69.105): icmp_req=2 ttl=40 time=117 ms
64 bytes from bk-in-f105.1e100.net (173.194.69.105): icmp_req=3 ttl=40 time=136 ms
64 bytes from bk-in-f105.1e100.net (173.194.69.105): icmp_req=4 ttl=40 time=135 ms
64 bytes from bk-in-f105.1e100.net (173.194.69.105): icmp_req=5 ttl=40 time=344 ms
64 bytes from bk-in-f105.1e100.net (173.194.69.105): icmp_req=6 ttl=40 time=103 ms
--- www.l.google.com ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5005ms
rtt min/avg/max/mdev = 103.563/189.388/344.436/95.197 ms
但是当我尝试检索网页时它不起作用(例如 wget 请求的输出):
% wget www.google.com
--2012-01-16 18:59:12-- http://www.google.com/
Resolving www.google.com... 173.194.69.105, 173.194.69.106, 173.194.69.147, ...
Connecting to www.google.com|173.194.69.105|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://www.google.de/ [following]
--2012-01-16 18:59:12-- http://www.google.de/
Resolving www.google.de... 173.194.69.94
Connecting to www.google.de|173.194.69.94|:80... connected.
HTTP request sent, awaiting response... ^C
所以我真的很惊讶为什么这不起作用,希望这里有人知道我如何让它工作。
提前致谢。
答案1
好吧,经过一番摸索后,发现问题出在 MTU 大小上 - 将其设置为低于 1100 字节就可以解决问题,现在连接工作得非常完美。