我在与一家特定的DSL提供商进行互联网连接时遇到了一个问题,经过大量的研究,我们可以归纳如下。
假设有两个提供商A和B通过PPPoE连接(在Ubuntu 14.04上,相同的configuration选项,相同的标准MTU 1492)
提供者:A
ppp0 Link encap:Point-to-Point Protocol inet addr:192.168.100.1 PtP:192.168.100.2 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1 RX packets:422406 errors:0 dropped:0 overruns:0 frame:0 TX packets:383588 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:410702336 (410.7 MB) TX bytes:76099873 (76.0 MB)
提供者:B
ppp0 Link encap:Point-to-Point Protocol inet addr:192.168.200.1 PtP:192.168.200.2 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1 RX packets:3519252 errors:0 dropped:0 overruns:0 frame:0 TX packets:2547278 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 RX bytes:4506505131 (4.5 GB) TX bytes:337199879 (337.1 MB)
这里是两个提供者的tcpdump摘录:
提供者:A( 成功的 IMAP连接尝试)
10:58:33.085863 IP provider-1.example.com.56892 > imap.example.net.imaps: Flags [SEW], seq 3899194038, win 8192, options [**mss 1452**,nop,wscale 8,nop,nop,sackOK], length 0 10:58:33.133981 IP imap.example.net.imaps > provider-1.example.com.56892: Flags [SE], seq 2576858288, ack 3899194039, win 29200, options [mss 1452,nop,nop,sackOK,nop,wscale 9], length 0 10:58:33.134472 IP provider-1.example.com.56892 > imap.example.net.imaps: Flags [.], ack 1, win 516, length 0 10:58:33.134989 IP provider-1.example.com.56892 > imap.example.net.imaps: Flags [P.], seq 1:156, ack 1, win 516, length 155 10:58:33.244366 IP imap.example.net.imaps > provider-1.example.com.56892: Flags [.], ack 156, win 60, length 0 10:58:33.252382 IP imap.example.net.imaps > provider-1.example.com.56892: Flags [.], seq 1:1453, ack 156, win 60, length 1452 10:58:33.253614 IP imap.example.net.imaps > provider-1.example.com.56892: Flags [.], seq 1453:2905, ack 156, win 60, length 1452 10:58:33.254268 IP provider-1.example.com.56892 > imap.example.net.imaps: Flags [.], ack 2905, win 516, length 0 10:58:33.255073 IP imap.example.net.imaps > provider-1.example.com.56892: Flags [.], seq 2905:4357, ack 156, win 60, length 1452 10:58:33.255392 IP imap.example.net.imaps > provider-1.example.com.56892: Flags [P.], seq 4357:4996, ack 156, win 60, length 639 10:58:33.255778 IP provider-1.example.com.56892 > imap.example.net.imaps: Flags [.], ack 4996, win 516, length 0 10:58:33.277521 IP provider-1.example.com.56892 > imap.example.net.imaps: Flags [P.], seq 156:282, ack 4996, win 516, length 126 10:58:33.344742 IP imap.example.net.imaps > provider-1.example.com.56892: Flags [P.], seq 4357:4996, ack 156, win 60, length 639 10:58:33.345176 IP provider-1.example.com.56892 > imap.example.net.imaps: Flags [.], ack 4996, win 516, options [nop,nop,sack 1 {4357:4996}], length 0 10:58:33.392306 IP imap.example.net.imaps > provider-1.example.com.56892: Flags [P.], seq 4996:5047, ack 282, win 60, length 51 10:58:33.425148 IP provider-1.example.com.56892 > imap.example.net.imaps: Flags [.], ack 5047, win 515, length 0
提供程序:B(IMAP连接尝试失败 )
10:11:45.242953 IP provider-2.example.com.44741 > imap.example.net.imaps: Flags [SEW], seq 3877989337, win 8192, options [**mss 1460**,nop,wscale 8,nop,nop,sackOK], length 0 10:11:45.264231 IP imap.example.net.imaps > provider-2.example.com.44741: Flags [S.], seq 3355386868, ack 3877989338, win 29200, options [mss 1460,nop,nop,sackOK,nop,wscale 9], length 0 10:11:45.264962 IP provider-2.example.com.44741 > imap.example.net.imaps: Flags [.], ack 1, win 513, length 0 10:11:45.271981 IP provider-2.example.com.44741 > imap.example.net.imaps: Flags [P.], seq 1:156, ack 1, win 513, length 155 10:11:45.294039 IP imap.example.net.imaps > provider-2.example.com.44741: Flags [.], ack 156, win 60, length 0 10:11:45.300146 IP imap.example.net.imaps > provider-2.example.com.44741: Flags [P.], seq 4381:4996, ack 156, win 60, length 615 10:11:45.300727 IP provider-2.example.com.44741 > imap.example.net.imaps: Flags [.], ack 1, win 513, options [nop,nop,sack 1 {4381:4996}], length 0 10:11:55.293705 IP imap.example.net.imaps > provider-2.example.com.44741: Flags [F.], seq 4996, ack 156, win 60, length 0 10:11:55.294414 IP provider-2.example.com.44741 > imap.example.net.imaps: Flags [.], ack 1, win 513, options [nop,nop,sack 1 {4381:4996}], length 0
我发现的是,如果我手动设置TCP MSS的值为1452,在提供者B的Linux Box上使用mss clmaping (在tcpdump输出处可以看到1460),则连接成功build立。
我的问题是,为什么一个提供商tcp设置mss值为1452(这似乎也正确的PPPoE与MTU 1492),而其他没有。 这些机器是相同的,并且具有相同内核和相同OS版本的相同图像。 就我所知,一切都是一样的。 提供者是否可以控制这个或我应该在哪里看?
我真的想知道,我已经尝试了所有手动更改之前。