第一次在国内航班体验机上WiFi

内容纲要

于2023年8月3日乘坐了厦门航空的MF8208从西安飞往厦门,执飞飞机是一架BOEING 787-8宽体型客机,上飞机后惊奇地发现座位旁有WiFi图标,而在地面上我拿手机搜索了一圈并没有看到任何非个人热点的SSID。但我依然非常期待,因为距离上一次在空中上网已经是2013年在美国使用gogoinflight了。

初见WiFi

升空后没多久,我再次刷新手机的WiFi列表,果然出现了XiamenAir,连上WiFi第一步那自然是购买然后连接,但很遗憾的是刚开始并无法完成购买,http portal页面显示“获取用户IP地址失败”。

既然想付钱都不给我付钱的渠道,那我只能试试看能不能用点白嫖手段了。发现可以使用UDP 53进行DNS查询,包括TXT记录查询,同时对公网的任意域名请求均正常,但使用53端口跑别的应用全部连不到服务器,继续测试发现我使用任意域名进行DNS查询都会返回相同的结果,且第二次换一个DNS服务器查询非常快,因此可以判定它对53端口进行了本地重定向,至此我能想到的有实用价值的白嫖网络手段全部失效(我不考虑基于txt记录做的递归查询dns tunnel,对dns缓存的负载太致命了,除非真的到了有紧急情况发生我想传个遗书到地面我才会考虑这种手段吧)。

后来,等进入了平飞阶段,客舱服务开始,此时我也拿出笔记本,在登录页面点击购买后,立刻就收到了几条微信信息,看来我朋友说的不认证能用微信是真的,我果断再次测试,portal页面里可以购买wifi服务了,只不过他们似乎做的不是很好,PC端的购买需要在手机使用微信小程序完成,但问题不大。

其中,这里的付费上网服务也可以使用积分兑换,“一鹭畅游”服务需要2800积分,我当时过于激动没有check一下我的积分是否足够就直接付了钱,后来发现是够的。

未认证阶段的HTTP互联网访问

可以看出这个CSS应该是基于的深信服的系统。

路由与延迟测试

首先是出口ip测试

 cyy@YangyuMacBook-Pro  ~  curl ip.sb | nali
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    14  100    14    0     0      7      0  0:00:02  0:00:01  0:00:01     7
36.110.115.34 [北京市 电信]

惊讶地发现,与我朋友之前使用的WiFi IP仅差1,推测是使用同一家公司的服务。

然后是TCP mtr测试(目标到我家服务器),ICMP结果差不多,ICMP应该是被劫持了:

                                My traceroute  [v0.95]
Keys:  Help   Display mode   Restart stati   Packets               Pings
 Host                                      Loss%   Snt   Last   Avg  Best  Wrst StDev
 1. 172.19.248.1 [局域网 对方和您在同一内部 0.0%   372    7.9   5.2   1.5 121.8  15.5
 2. 117.30.124.150 [福建省厦门市 电信]      3.0%   371  625.7 639.3 609.8 795.9  27.6

虽然mtr不行,但traceroute是可以的,结果如下:

 ✘ cyy@YangyuMacBook-Pro  ~  traceroute -n hs.cyyself.name | nali
traceroute to ae65b3fb.cn-xam.node.tianhaiit.net (117.30.124.150), 64 hops max, 52 byte packets
 1  172.19.248.1 [局域网 对方和您在同一内部网]   2.015 ms  1.427 ms  1.411 ms
 2  10.20.160.1 [局域网 IP]   2.125 ms  2.450 ms  2.345 ms
 3  117.30.124.150 [福建省厦门市 电信]   609.198 ms  568.437 ms  572.984 ms
 4  * * *
 5  172.27.148.3 [局域网 对方和您在同一内部网]   581.940 ms  580.430 ms  688.014 ms
 6  172.27.148.4 [局域网 对方和您在同一内部网]   585.321 ms *  579.244 ms
 7  * * 172.30.148.2 [局域网 对方和您在同一内部网]   575.105 ms
 8  * 172.31.148.5 [局域网 对方和您在同一内部网]   579.538 ms  611.569 ms
 9  * 192.168.172.2 [局域网 对方和您在同一内部网]   628.166 ms *
10  * * 192.168.50.1 [局域网 对方和您在同一内部网]   583.316 ms
11  * 172.25.61.34 [局域网 对方和您在同一内部网]   576.498 ms *
12  * 172.25.60.108 [局域网 对方和您在同一内部网]   765.807 ms  587.398 ms
13  * 172.25.54.101 [局域网 对方和您在同一内部网]   656.666 ms  578.282 ms
14  192.168.54.9 [局域网 对方和您在同一内部网]   579.847 ms *  575.797 ms
15  172.25.54.12 [局域网 对方和您在同一内部网]   579.758 ms  574.284 ms *
16  * * *
17  * 36.112.175.221 [北京市 电信]   580.928 ms  611.029 ms
18  * 36.112.241.85 [北京市 电信]   576.079 ms  573.666 ms
19  202.97.46.242 [中国 电信骨干网]   596.538 ms * *
20  202.97.47.14 [中国 电信骨干网]   613.735 ms
    202.97.19.158 [中国 电信骨干网]   613.314 ms
    202.97.17.70 [中国 电信骨干网]   606.716 ms
21  * 61.154.238.94 [福建省厦门市 电信]   605.756 ms *
22  * 218.85.151.202 [福建省泉州市晋江市 电信]   614.740 ms *
23  * 117.30.124.150 [福建省厦门市 电信]   624.345 ms *

然而,我记得10年前在美国使用gogoinflight的时候延迟只有130+ms(甚至是拿着一台atom z2760 cpu的平板,网卡都只有802.11n单频1×1 20MHz),相比之下这个500+ms的延迟有些高,但除了ssh不流畅以外一般上网还行。

带宽测试

最后进行了一下iperf测试,到北京华为云(下行使用TCP BRR,上行为macOS默认的拥塞控制算法):

 cyy@YangyuMacBook-Pro  ~  iperf3 -c 114.116.x.x -R
Connecting to host 114.116.x.x, port 5201
Reverse mode, remote host 114.116.x.x is sending
[  5] local 172.19.248.29 port 63423 connected to 114.116.x.x port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   313 KBytes  2.57 Mbits/sec
[  5]   1.00-2.00   sec   464 KBytes  3.80 Mbits/sec
[  5]   2.00-3.00   sec   457 KBytes  3.75 Mbits/sec
[  5]   3.00-4.00   sec   457 KBytes  3.75 Mbits/sec
[  5]   4.00-5.00   sec   468 KBytes  3.84 Mbits/sec
[  5]   5.00-6.00   sec   468 KBytes  3.83 Mbits/sec
[  5]   6.00-7.00   sec   470 KBytes  3.85 Mbits/sec
[  5]   7.00-8.00   sec   468 KBytes  3.83 Mbits/sec
[  5]   8.00-9.00   sec   456 KBytes  3.73 Mbits/sec
[  5]   9.00-10.00  sec   452 KBytes  3.70 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.60  sec  4.74 MBytes  3.75 Mbits/sec   12             sender
[  5]   0.00-10.00  sec  4.37 MBytes  3.66 Mbits/sec                  receiver

iperf Done.
 cyy@YangyuMacBook-Pro  ~  iperf3 -c 114.116.x.x
Connecting to host 114.116.x.x, port 5201
[  5] local 172.19.248.29 port 63808 connected to 114.116.x.x port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   151 KBytes  1.23 Mbits/sec
[  5]   1.00-2.00   sec   101 KBytes   833 Kbits/sec
[  5]   2.00-3.00   sec  51.3 KBytes   419 Kbits/sec
[  5]   3.00-4.00   sec   505 KBytes  4.14 Mbits/sec
[  5]   4.00-5.00   sec   615 KBytes  5.05 Mbits/sec
[  5]   5.00-6.00   sec   841 KBytes  6.89 Mbits/sec
[  5]   6.00-7.00   sec   853 KBytes  6.98 Mbits/sec
[  5]   7.00-8.00   sec   850 KBytes  6.97 Mbits/sec
[  5]   8.00-9.00   sec   851 KBytes  6.96 Mbits/sec
[  5]   9.00-10.00  sec   851 KBytes  6.98 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.00  sec  5.54 MBytes  4.64 Mbits/sec                  sender
[  5]   0.00-10.90  sec   994 KBytes   747 Kbits/sec                  receiver

iperf Done.

我们这里发现一个问题,receiver端的接收带宽极低,但是发送端仍然尝试了很高的速率,有点像典型的TCP cubic meets long fat pipe的场景,一直使劲发包直到buffer bloat,感觉这个问题很有意思,下次还有机会装着Linux虚拟机给发送端使用不同的TCP拥塞控制算法试试看。

还测试了使用TCP Cubic算法的下行数据,结果显示没有太大区别:

 cyy@YangyuMacBook-Pro  ~  iperf3 -c 114.116.x.x -R
Connecting to host 114.116.x.x, port 5201
Reverse mode, remote host 114.116.x.x is sending
[  5] local 172.19.248.29 port 64471 connected to 114.116.x.x port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   304 KBytes  2.49 Mbits/sec
[  5]   1.00-2.00   sec   474 KBytes  3.88 Mbits/sec
[  5]   2.00-3.00   sec   471 KBytes  3.85 Mbits/sec
[  5]   3.00-4.00   sec   468 KBytes  3.83 Mbits/sec
[  5]   4.00-5.00   sec   470 KBytes  3.85 Mbits/sec
[  5]   5.00-6.00   sec   465 KBytes  3.81 Mbits/sec
[  5]   6.00-7.00   sec   435 KBytes  3.56 Mbits/sec
[  5]   7.00-8.00   sec   429 KBytes  3.50 Mbits/sec
[  5]   8.00-9.00   sec   474 KBytes  3.90 Mbits/sec
[  5]   9.00-10.00  sec   468 KBytes  3.83 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.58  sec  4.73 MBytes  3.75 Mbits/sec   35             sender
[  5]   0.00-10.00  sec  4.35 MBytes  3.65 Mbits/sec                  receiver

iperf Done.

iperf UDP 2Mbps上行测试:

Accepted connection from 36.110.115.34, port 59895
[  5] local 172.16.0.49 port 5201 connected to 36.110.115.34 port 50263
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-1.00   sec  52.8 KBytes   432 Kbits/sec  5.512 ms  0/37 (0%)
[  5]   1.00-2.00   sec   113 KBytes   923 Kbits/sec  3.777 ms  40/119 (34%)
[  5]   2.00-3.00   sec   115 KBytes   946 Kbits/sec  8.166 ms  83/164 (51%)
[  5]   3.00-4.00   sec   115 KBytes   946 Kbits/sec  3.938 ms  98/179 (55%)
[  5]   4.00-5.00   sec   111 KBytes   911 Kbits/sec  3.489 ms  94/172 (55%)
[  5]   5.00-6.00   sec   175 KBytes  1.44 Mbits/sec  7.379 ms  91/214 (43%)
[  5]   6.00-7.00   sec   114 KBytes   934 Kbits/sec  3.511 ms  45/125 (36%)
[  5]   7.00-8.00   sec   107 KBytes   876 Kbits/sec  4.752 ms  99/174 (57%)
[  5]   8.00-9.00   sec   111 KBytes   911 Kbits/sec  3.063 ms  85/163 (52%)
[  5]   9.00-10.00  sec   117 KBytes   958 Kbits/sec  3.366 ms  97/179 (54%)
[  5]  10.00-10.61  sec  71.3 KBytes   955 Kbits/sec  2.942 ms  55/105 (52%)
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[SUM]  0.0-10.6 sec  42 datagrams received out-of-order
[  5]   0.00-10.61  sec  1.18 MBytes   929 Kbits/sec  2.942 ms  787/1631 (48%)  receiver

iperf udp 800K上行测试:

Accepted connection from 36.110.115.34, port 60774
[  5] local 172.16.0.49 port 5201 connected to 36.110.115.34 port 45674
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-1.00   sec  32.8 KBytes   269 Kbits/sec  5.323 ms  0/23 (0%)
[  5]   1.00-2.00   sec   103 KBytes   841 Kbits/sec  3.044 ms  0/72 (0%)
[  5]   2.00-3.00   sec  98.4 KBytes   806 Kbits/sec  1.943 ms  0/69 (0%)
[  5]   3.00-4.00   sec  97.0 KBytes   794 Kbits/sec  1.724 ms  0/68 (0%)
[  5]   4.00-5.00   sec  98.4 KBytes   806 Kbits/sec  1.551 ms  0/69 (0%)
[  5]   5.00-6.00   sec  97.0 KBytes   794 Kbits/sec  4.950 ms  0/68 (0%)
[  5]   6.00-7.00   sec  98.4 KBytes   806 Kbits/sec  1.520 ms  0/69 (0%)
[  5]   7.00-8.00   sec  97.0 KBytes   794 Kbits/sec  1.884 ms  0/68 (0%)
[  5]   8.00-9.00   sec  98.4 KBytes   806 Kbits/sec  1.916 ms  0/69 (0%)
[  5]   9.00-10.00  sec  97.0 KBytes   794 Kbits/sec  2.349 ms  0/68 (0%)
[  5]  10.00-10.64  sec  59.9 KBytes   770 Kbits/sec  2.374 ms  0/42 (0%)
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-10.64  sec   977 KBytes   752 Kbits/sec  2.374 ms  0/685 (0%)  receiver

iperf udp 8M下行测试:

iperf3 -c 114.116.x.x -u -b 8M -R
Connecting to host 114.116.x.x, port 5201
Reverse mode, remote host 114.116.x.x is sending
[  5] local 172.19.248.29 port 50412 connected to 114.116.x.x port 5201
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-1.00   sec   492 KBytes  4.03 Mbits/sec  3.214 ms  14/359 (3.9%)
[  5]   1.00-2.00   sec   473 KBytes  3.88 Mbits/sec  3.380 ms  353/685 (52%)
[  5]   2.00-3.00   sec   466 KBytes  3.82 Mbits/sec  3.533 ms  350/677 (52%)
[  5]   3.00-4.00   sec   478 KBytes  3.91 Mbits/sec  3.397 ms  357/692 (52%)
[  5]   4.00-5.00   sec   479 KBytes  3.92 Mbits/sec  3.955 ms  691/1027 (67%)
[  5]   5.00-6.00   sec   469 KBytes  3.84 Mbits/sec  2.769 ms  335/664 (50%)
[  5]   6.00-7.00   sec   475 KBytes  3.89 Mbits/sec  3.621 ms  346/679 (51%)
[  5]   7.00-8.00   sec   469 KBytes  3.85 Mbits/sec  3.622 ms  340/669 (51%)
[  5]   8.00-9.00   sec   471 KBytes  3.86 Mbits/sec  2.905 ms  341/671 (51%)
[  5]   9.00-10.00  sec   473 KBytes  3.88 Mbits/sec  2.575 ms  338/670 (50%)
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-10.60  sec  10.1 MBytes  8.00 Mbits/sec  0.000 ms  0/7257 (0%)  sender
[SUM]  0.0-10.6 sec  7 datagrams received out-of-order
[  5]   0.00-10.00  sec  4.63 MBytes  3.89 Mbits/sec  2.575 ms  3465/6793 (51%)  receiver

iperf udp 3M下行测试:

 cyy@YangyuMacBook-Pro  ~  iperf3 -c 114.116.x.x -u -b 3M -R
Connecting to host 114.116.x.x, port 5201
Reverse mode, remote host 114.116.x.x is sending
[  5] local 172.19.248.29 port 52783 connected to 114.116.x.x port 5201
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-1.00   sec   374 KBytes  3.06 Mbits/sec  4.024 ms  0/262 (0%)
[  5]   1.00-2.00   sec   362 KBytes  2.97 Mbits/sec  4.158 ms  4/258 (1.6%)
[  5]   2.00-3.00   sec   366 KBytes  3.00 Mbits/sec  3.728 ms  0/257 (0%)
[  5]   3.00-4.00   sec   364 KBytes  2.98 Mbits/sec  3.589 ms  0/255 (0%)
[  5]   4.00-5.00   sec   365 KBytes  2.99 Mbits/sec  3.739 ms  0/256 (0%)
[  5]   5.00-6.00   sec   366 KBytes  3.00 Mbits/sec  4.124 ms  0/257 (0%)
[  5]   6.00-7.00   sec   366 KBytes  3.00 Mbits/sec  3.231 ms  0/257 (0%)
[  5]   7.00-8.00   sec   366 KBytes  3.01 Mbits/sec  4.126 ms  0/257 (0%)
[  5]   8.00-9.00   sec   369 KBytes  3.03 Mbits/sec  4.226 ms  0/259 (0%)
[  5]   9.00-10.00  sec   356 KBytes  2.91 Mbits/sec  3.983 ms  4/254 (1.6%)
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-10.60  sec  3.79 MBytes  3.00 Mbits/sec  0.000 ms  0/2722 (0%)  sender
[  5]   0.00-10.00  sec  3.57 MBytes  2.99 Mbits/sec  3.983 ms  8/2572 (0.31%)  receiver

iperf TCP双线程:

Connecting to host 114.116.x.x, port 5201
Reverse mode, remote host 114.116.x.x is sending
[  5] local 172.19.248.29 port 62192 connected to 114.116.x.x port 5201
[  7] local 172.19.248.29 port 62199 connected to 114.116.x.x port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  97.7 KBytes   800 Kbits/sec
[  7]   0.00-1.00   sec   255 KBytes  2.08 Mbits/sec
[SUM]   0.00-1.00   sec   352 KBytes  2.88 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   1.00-2.00   sec  77.0 KBytes   632 Kbits/sec
[  7]   1.00-2.00   sec   338 KBytes  2.77 Mbits/sec
[SUM]   1.00-2.00   sec   415 KBytes  3.41 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   2.00-3.00   sec   289 KBytes  2.37 Mbits/sec
[  7]   2.00-3.00   sec   243 KBytes  1.99 Mbits/sec
[SUM]   2.00-3.00   sec   532 KBytes  4.36 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   3.00-4.00   sec   233 KBytes  1.91 Mbits/sec
[  7]   3.00-4.00   sec   236 KBytes  1.93 Mbits/sec
[SUM]   3.00-4.00   sec   469 KBytes  3.84 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   4.00-5.00   sec   233 KBytes  1.90 Mbits/sec
[  7]   4.00-5.00   sec   231 KBytes  1.89 Mbits/sec
[SUM]   4.00-5.00   sec   464 KBytes  3.80 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   5.00-6.00   sec   237 KBytes  1.94 Mbits/sec
[  7]   5.00-6.00   sec   237 KBytes  1.94 Mbits/sec
[SUM]   5.00-6.00   sec   474 KBytes  3.89 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   6.00-7.00   sec   229 KBytes  1.88 Mbits/sec
[  7]   6.00-7.00   sec   230 KBytes  1.88 Mbits/sec
[SUM]   6.00-7.00   sec   459 KBytes  3.76 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   7.00-8.00   sec   234 KBytes  1.92 Mbits/sec
[  7]   7.00-8.00   sec   228 KBytes  1.86 Mbits/sec
[SUM]   7.00-8.00   sec   462 KBytes  3.78 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   8.00-9.00   sec   234 KBytes  1.92 Mbits/sec
[  7]   8.00-9.00   sec   224 KBytes  1.84 Mbits/sec
[SUM]   8.00-9.00   sec   458 KBytes  3.76 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   9.00-10.00  sec   213 KBytes  1.75 Mbits/sec
[  7]   9.00-10.00  sec   236 KBytes  1.94 Mbits/sec
[SUM]   9.00-10.00  sec   450 KBytes  3.69 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.60  sec  2.31 MBytes  1.82 Mbits/sec   45             sender
[  5]   0.00-10.00  sec  2.03 MBytes  1.70 Mbits/sec                  receiver
[  7]   0.00-10.60  sec  2.68 MBytes  2.12 Mbits/sec   39             sender
[  7]   0.00-10.00  sec  2.40 MBytes  2.01 Mbits/sec                  receiver
[SUM]   0.00-10.60  sec  4.98 MBytes  3.94 Mbits/sec   84             sender
[SUM]   0.00-10.00  sec  4.43 MBytes  3.72 Mbits/sec                  receiver

iperf双向:

iperf3 -c 114.116.x.x --bidir
Connecting to host 114.116.x.x, port 5201
[  5] local 172.19.248.29 port 64743 connected to 114.116.x.x port 5201
[  7] local 172.19.248.29 port 64754 connected to 114.116.x.x port 5201
[ ID][Role] Interval           Transfer     Bitrate
[  5][TX-C]   0.00-1.00   sec   210 KBytes  1.71 Mbits/sec
[  7][RX-C]   0.00-1.00   sec   246 KBytes  2.01 Mbits/sec
[  5][TX-C]   1.00-2.00   sec   207 KBytes  1.70 Mbits/sec
[  7][RX-C]   1.00-2.00   sec   479 KBytes  3.93 Mbits/sec
[  5][TX-C]   2.00-3.00   sec   182 KBytes  1.50 Mbits/sec
[  7][RX-C]   2.00-3.00   sec   457 KBytes  3.75 Mbits/sec
[  5][TX-C]   3.00-4.00   sec   816 KBytes  6.67 Mbits/sec
[  7][RX-C]   3.00-4.00   sec   453 KBytes  3.70 Mbits/sec
[  5][TX-C]   4.00-5.00   sec   851 KBytes  6.99 Mbits/sec
[  7][RX-C]   4.00-5.00   sec   460 KBytes  3.78 Mbits/sec
[  5][TX-C]   5.00-6.00   sec   851 KBytes  6.97 Mbits/sec
[  7][RX-C]   5.00-6.00   sec   465 KBytes  3.81 Mbits/sec
[  5][TX-C]   6.00-7.00   sec   854 KBytes  7.00 Mbits/sec
[  7][RX-C]   6.00-7.00   sec   466 KBytes  3.82 Mbits/sec
[  5][TX-C]   7.00-8.00   sec   851 KBytes  6.97 Mbits/sec
[  7][RX-C]   7.00-8.00   sec   465 KBytes  3.81 Mbits/sec
[  5][TX-C]   8.00-9.00   sec   756 KBytes  6.19 Mbits/sec
[  7][RX-C]   8.00-9.00   sec   465 KBytes  3.81 Mbits/sec
[  5][TX-C]   9.00-10.00  sec   739 KBytes  6.05 Mbits/sec
[  7][RX-C]   9.00-10.00  sec   467 KBytes  3.82 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID][Role] Interval           Transfer     Bitrate         Retr
[  5][TX-C]   0.00-10.00  sec  6.17 MBytes  5.17 Mbits/sec                  sender
[  5][TX-C]   0.00-11.96  sec  1.09 MBytes   765 Kbits/sec                  receiver
[  7][RX-C]   0.00-10.00  sec  5.38 MBytes  4.52 Mbits/sec   33             sender
[  7][RX-C]   0.00-11.96  sec  4.32 MBytes  3.03 Mbits/sec                  receiver

iperf Done.

此外,我还测试了iperf打满带宽的时候持续ping,未观测到延迟增加,应该是限速了,但为了不影响其它乘客使用没有进行多IP负载均衡多线程测试。

最后半小时

由于降落前30分钟不允许使用大型电子设备,因此我从电脑转移到了手机,然而手机连接WiFi直接登录,迎来的却是:

仔细思考了一下,我决定尝试将我手机的IP地址改为我电脑的IP,并保持我电脑的WiFi Radio直接关闭,从而将我电脑使用的IP地址的登录状态转移到我手机。

然而,改完之后并没有网,访问http仍是302到portal登录页面,而登录页面的状态却是:

至于伪装MAC地址是没有jailbreak的iPhone无法想的事情,只能作罢了。

那既然这样不行,我把手机改回自动获取,再买一份账号给手机上网可以吗?

答案是不行。

但好在,在点击购买流量包期间会开放部分网络访问权限,微信可以用(包含公众号里的图片都可以看),Apple Push能收到推送,甚至一些加密协议的非标端口TCP也能正常使用,因此在水群中结束了我最后的空中旅程,直到降落前12分钟,Gear Down前4分钟,WiFi信号消失,服务结束。

但从这个体验也看出,或许在使用该WiFi服务时尽量关闭终端操作系统提供的随机MAC地址功能,否则可能会导致因为认证策略原因购买作废,也无法重买。

观察与总结

我也在使用期间观察了一下客舱,似乎拿出笔记本就我一个人,有亮光照脸上的基本也是玩机上娱乐系统的小孩子,由于是夜晚航班的原因中年人大多数在睡觉。也没有听到任何外放刷视频的声音,非常和谐。唯一可惜的就是我观测到机上娱乐系统是个Linux的平台,很想接个键盘上去ctrl+alt+f1看看能不能进到shell,可惜没去做这个测试。

而WiFi总体体验尚可,至少满足了基本的水群聊天要求,虽然500ms+的延迟较高,猜测走了卫星,除了ssh/rdp到别的机器工作外基本能接受。

认证方面唯一的不足在于认证信息和IP以及MAC都绑定,尽量关闭MAC地址随机化功能并在最需要使用网络的设备上登录。

也相信未来基于4G/5G ATG的空中宽带技术能带来更好的体验。

后续还想测试的事情

  • 观察TCP是否被透明代理
    我认为这样的卫星通讯高延迟场景如果在飞机上有一台强大的路由器,能为每条TCP流像反向代理一样提供一个buffer,并使用自己的拥塞控制等策略进行设置,可以相比大部分服务器直接使用的TCP Cubic等“经典”拥塞控制算法获得巨大性能提升。但这么简单的事情,只需要两边tcpdump就能观察的事情我自己忘记去做了。

  • 测试不同的TCP拥塞控制算法在这种网络场景下的性能差异
    即使被透明代理,我也可以用UDP跑一层隧道试试看。

  • 观察Packet Reorder
    之前iperf udp测试中出现了packet reorder的情况,我想要测试Reorder出现的起始带宽,以及单位时间reorder数据包数量和单位时间内数据包数量以及每个包大小的关系。

文章最初写于飞机上使用WiFi期间,并于地面上进行了最后两章节的编写以及小幅修改。

更新

8月21日乘坐了MF8101从厦门飞往北京,同样是B787-8客机。这次连上WiFi后发现出口IP变成了北京联通,与此同时似乎出方向22端口被ban,无法直连我服务器的SSH。

➜  ~ curl ip.sb | nali
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    16  100    16    0     0      9      0  0:00:01  0:00:01 --:--:--     9
114.255.102.226 [北京市 联通] 

然后由于我带了装有Debian sid的移动硬盘,因此插上mac使用不同的tcp拥塞控制算法进行了测试,结果如下:

➜  ~ iperf3 -c 114.116.x.x 
Connecting to host 114.116.x.x, port 5201
[  5] local 172.19.248.14 port 45442 connected to 114.116.x.x port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   435 KBytes  3.56 Mbits/sec    0   57.0 KBytes       
[  5]   1.00-2.00   sec   471 KBytes  3.85 Mbits/sec    0   82.7 KBytes       
[  5]   2.00-3.00   sec   307 KBytes  2.51 Mbits/sec    0   79.8 KBytes       
[  5]   3.00-4.00   sec   606 KBytes  4.97 Mbits/sec    0   85.5 KBytes       
[  5]   4.00-5.00   sec   606 KBytes  4.96 Mbits/sec    0   82.7 KBytes       
[  5]   5.00-6.00   sec   920 KBytes  7.53 Mbits/sec    0   94.1 KBytes       
[  5]   6.00-7.00   sec   912 KBytes  7.48 Mbits/sec    0   88.4 KBytes       
[  5]   7.00-8.00   sec   905 KBytes  7.42 Mbits/sec    0   82.7 KBytes       
[  5]   8.00-9.00   sec   920 KBytes  7.53 Mbits/sec    0   79.8 KBytes       
[  5]   9.00-10.00  sec   606 KBytes  4.96 Mbits/sec    0   82.7 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  6.53 MBytes  5.48 Mbits/sec    0             sender
[  5]   0.00-11.48  sec  1.18 MBytes   860 Kbits/sec                  receiver

iperf Done.
➜  ~ sudo sysctl net.ipv4.tcp_congestion_control   
net.ipv4.tcp_congestion_control = bbr
➜  ~ sudo sysctl -w net.ipv4.tcp_congestion_control=cubic
net.ipv4.tcp_congestion_control = cubic
➜  ~ iperf3 -c 114.116.x.x                           
Connecting to host 114.116.x.x, port 5201
[  5] local 172.19.248.14 port 55006 connected to 114.116.x.x port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   205 KBytes  1.68 Mbits/sec    0   35.6 KBytes       
[  5]   1.00-2.00   sec  71.3 KBytes   584 Kbits/sec    0   35.6 KBytes       
[  5]   2.00-3.00   sec   421 KBytes  3.45 Mbits/sec    0   31.4 KBytes       
[  5]   3.00-4.00   sec   342 KBytes  2.80 Mbits/sec    0   32.8 KBytes       
[  5]   4.00-5.00   sec   827 KBytes  6.77 Mbits/sec    0   32.8 KBytes       
[  5]   5.00-6.00   sec   756 KBytes  6.19 Mbits/sec    0   32.8 KBytes       
[  5]   6.00-7.00   sec   841 KBytes  6.89 Mbits/sec    0   32.8 KBytes       
[  5]   7.00-8.00   sec   820 KBytes  6.72 Mbits/sec    0   32.8 KBytes       
[  5]   8.00-9.00   sec   841 KBytes  6.89 Mbits/sec    0   32.8 KBytes       
[  5]   9.00-10.00  sec   834 KBytes  6.83 Mbits/sec    0   32.8 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  5.82 MBytes  4.88 Mbits/sec    0             sender
[  5]   0.00-11.44  sec  1.22 MBytes   897 Kbits/sec                  receiver

iperf Done.
➜  ~ sudo sysctl net.ipv4.tcp_congestion_control=reno     
net.ipv4.tcp_congestion_control = reno
➜  ~ iperf3 -c 114.116.x.x 
Connecting to host 114.116.x.x, port 5201
[  5] local 172.19.248.14 port 41220 connected to 114.116.x.x port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   191 KBytes  1.56 Mbits/sec    0   28.5 KBytes       
[  5]   1.00-2.00   sec   135 KBytes  1.11 Mbits/sec    0   32.8 KBytes       
[  5]   2.00-3.00   sec   321 KBytes  2.63 Mbits/sec    0   32.8 KBytes       
[  5]   3.00-4.00   sec   385 KBytes  3.15 Mbits/sec    0   32.8 KBytes       
[  5]   4.00-5.00   sec   585 KBytes  4.79 Mbits/sec    0   32.8 KBytes       
[  5]   5.00-6.00   sec   642 KBytes  5.26 Mbits/sec    0   32.8 KBytes       
[  5]   6.00-7.00   sec   834 KBytes  6.83 Mbits/sec    0   32.8 KBytes       
[  5]   7.00-8.00   sec   863 KBytes  7.07 Mbits/sec    0   32.8 KBytes       
[  5]   8.00-9.00   sec   841 KBytes  6.89 Mbits/sec    0   32.8 KBytes       
[  5]   9.00-10.00  sec   806 KBytes  6.60 Mbits/sec    0   32.8 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  5.47 MBytes  4.59 Mbits/sec    0             sender
[  5]   0.00-11.48  sec  1.27 MBytes   926 Kbits/sec                  receiver

iperf Done.

由此可见不同的TCP拥塞控制算法没有明显区别。

同时,我还进行了一些抓包分析,未观测到TCP被透明代理的痕迹。

One Response

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

Back to Top