跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • 提高跨地区跨运营商家宽 VPN 连接性能
未分類
28 7 月 2019

提高跨地区跨运营商家宽 VPN 连接性能

提高跨地区跨运营商家宽 VPN 连接性能

資深大佬 : PublicDNS 80

最近在折腾家里的群晖通过 rsync 异地同步到老家的黑群上,虽然能够成功但是同步速度远远低于预期,两端网络情况如下

A (家)联通公网 ip 100M 下 20M 上 B (老家)移动大内网 100M 下 30M 上 两个宽带的上下行测试都是达标的 B(172.16.1.3) 通过 OpenVPN 连接到 A(172.16.1.1)后,ping 不高而且基本不丢包

A> ping 172.16.1.3 PING 172.16.1.3 (172.16.1.3) 56(84) bytes of data. 64 bytes from 172.16.1.3: icmp_seq=1 ttl=63 time=30.2 ms 64 bytes from 172.16.1.3: icmp_seq=2 ttl=63 time=31.7 ms 64 bytes from 172.16.1.3: icmp_seq=3 ttl=63 time=30.3 ms 64 bytes from 172.16.1.3: icmp_seq=4 ttl=63 time=29.4 ms 64 bytes from 172.16.1.3: icmp_seq=5 ttl=63 time=30.5 ms 64 bytes from 172.16.1.3: icmp_seq=6 ttl=63 time=30.2 ms 64 bytes from 172.16.1.3: icmp_seq=7 ttl=63 time=29.9 ms 64 bytes from 172.16.1.3: icmp_seq=8 ttl=63 time=29.4 ms 64 bytes from 172.16.1.3: icmp_seq=9 ttl=63 time=30.1 ms 64 bytes from 172.16.1.3: icmp_seq=10 ttl=63 time=30.0 ms ^C --- 172.16.1.3 ping statistics --- 10 packets transmitted, 10 received, 0% packet loss, time 9010ms rtt min/avg/max/mdev = 29.412/30.224/31.747/0.646 ms  B>ping 172.16.1.1 PING 172.16.1.1 (172.16.1.1): 56 data bytes 64 bytes from 172.16.1.1: seq=0 ttl=64 time=32.672 ms 64 bytes from 172.16.1.1: seq=1 ttl=64 time=29.839 ms 64 bytes from 172.16.1.1: seq=2 ttl=64 time=29.824 ms 64 bytes from 172.16.1.1: seq=3 ttl=64 time=29.121 ms 64 bytes from 172.16.1.1: seq=4 ttl=64 time=29.644 ms 64 bytes from 172.16.1.1: seq=5 ttl=64 time=29.504 ms 64 bytes from 172.16.1.1: seq=6 ttl=64 time=29.165 ms 64 bytes from 172.16.1.1: seq=7 ttl=64 time=29.260 ms 64 bytes from 172.16.1.1: seq=8 ttl=64 time=28.944 ms 64 bytes from 172.16.1.1: seq=9 ttl=64 time=29.414 ms 64 bytes from 172.16.1.1: seq=10 ttl=64 time=29.071 ms ^C --- 172.16.1.1 ping statistics --- 11 packets transmitted, 11 packets received, 0% packet loss round-trip min/avg/max = 28.944/29.678/32.672 ms 

但是 iperf 的数字实在是太低了。

iperf -c 172.16.1.1 -t 60 ------------------------------------------------------------ Client connecting to 172.16.1.1, TCP port 5001 TCP window size: 18.4 KByte (default) ------------------------------------------------------------ [  3] local 172.16.1.3 port 33652 connected with 172.16.1.1 port 5001 [ ID] Interval       Transfer     Bandwidth [  3]  0.0-60.1 sec  10.6 MBytes  1.48 Mbits/sec 

互换角色 iperf 结果如下

iperf -c 172.16.1.3 -t 60 ------------------------------------------------------------ Client connecting to 172.16.1.3, TCP port 5001 TCP window size:  512 KByte (default) ------------------------------------------------------------ [  3] local 192.168.88.88 port 9946 connected with 172.16.1.3 port 5001 [ ID] Interval       Transfer     Bandwidth [  3]  0.0-78.8 sec   384 KBytes  39.9 Kbits/sec 

可能的原因是什么呢? 难道 A->B 的 OpenVPN UDP 包被移动 QoS 了? 各位老铁有啥建议?

  • 换 OpenVPN TCP ?
  • 加上 kcptun ?
  • 换 wireguard ?如果是 udp 被移动 qos 估计差别不大
  • 换 v2ray ?
大佬有話說 (29)

  • 資深大佬 : tia

    两地相距多远? 如果是省内的话这个延迟肯定出省了,然后鉴于移动和另外两家的互联带宽,这个点这个速度一点都不意外

  • 資深大佬 : tia

    假如是移动互联容量问题你上什么都没用

  • 資深大佬 : mason961125

    本地跨 ISP 的带宽在高峰期都可能不够,跨地区再跨 ISP 那就更…

  • 主 資深大佬 : PublicDNS

    @tia 开车 300 公里吧 但是确实跨省了。

  • 主 資深大佬 : PublicDNS

    @mason961125 准备等夜深人静的时候再测一次。

  • 資深大佬 : mason961125

    @PublicDNS #3 我建议你两边都先跑一下 iperf3 的裸 TCP 测试(不是在 OpenVPN 上跑),看看是否是链路带宽不足还是 UDP QoS。

  • 資深大佬 : cwbsw

    试一下 OpenVPN 的 TCP 模式呗,或者直接裸连测速。
    应该是被 QoS 了,据我观察 IPSec 优先级比非标 UDP 端口似乎要高一点。

  • 資深大佬 : skyeycirno

    跨运营商基本绕路吧。。你这如果直连速度不行,建议找个 BGP 的机器中转吧,比如阿里云啥的

  • 資深大佬 : cwbsw

    还有可以尝试一下 IPv6,最近我这里电信和移动 v6 互联口子很足,晚高峰 UDP 非标端口也能跑满。

  • 資深大佬 : fetich

    群晖上怎么安装 WireGuard 比较合适?

  • 資深大佬 : yulihao

    我这里是同区域移动到电信,早上 10MB/s (电信 500 对等移动 200 )
    晚上 1-7MB/s 浮动
    直接是 socks5 代理,没有 v2
    延迟不知道怎么测,通过 p2p 的

  • 資深大佬 : yulihao

    @yulihao 上了锐速的

  • 資深大佬 : brMu

    ZeroTier 不香吗?

  • 資深大佬 : ZRS

    不要用 UDP 很多家宽对 UDP 有严格的 QoS

  • 主 資深大佬 : PublicDNS

    @yulihao 直接 socks5 代理?这个怎么配置的?

  • 主 資深大佬 : PublicDNS

    @brMu zerotier 能够建立直接连接时真香. 10.144.0.0/16 为通过 zerotier 的连接

    “`
    # iperf -s
    ————————————————————
    Server listening on TCP port 5001
    TCP window size: 85.3 KByte (default)
    ————————————————————
    [ ID] Interval Transfer Bandwidth
    [ 4] local 10.144.1.1 port 5001 connected with 10.144.1.2 port 49317
    [ 4] 0.0-60.3 sec 260 MBytes 36.1 Mbits/sec
    [ 5] local 172.16.1.3 port 5001 connected with 172.16.1.1 port 13801
    [ 5] 0.0-131.0 sec 384 KBytes 24.0 Kbits/sec
    [ 4] local 10.144.1.1 port 5001 connected with 10.144.1.2 port 49429
    [ 4] 0.0-60.4 sec 274 MBytes 38.1 Mbits/sec
    [ 6] local 172.16.1.3 port 5001 connected with 172.16.1.3 port 54566
    [ 6] 0.0-78.3 sec 219 KBytes 22.9 Kbits/sec
    “`

  • 主 資深大佬 : PublicDNS

    @fetich 还没有试,也可以装在两个路由器上。

  • 資深大佬 : volks

    移动限 udp 不是常识吗,直接用 tcp 跑就行

  • 資深大佬 : fetich

    @PublicDNS
    樓主可以講一下如何部署在羣暉上的(能詳細點,就更好啦)?
    因爲我試了一下(用官網上的包)延時有點高 700ms,還有丟包,不知道是不是我哪一步沒有做的原因

  • 主 資深大佬 : PublicDNS

    @fetich 我就用的官方 spk 包,你应该是没有建立直连。

    If your network configuration is hostile to peer to peer network connectivity, most of your ZeroTier traffic will end up being relayed indirectly. This slows things down considerably.

    可以看看官方文档的
    Recommended Local Network and Internet Gateway Configuration
    Is My Device Relaying?

  • 資深大佬 : yulihao

    @PublicDNS 利用 v2ray 的代理,允许来自局域网连接,然后通过 nps 建立 tcp p2p 链接,通过 proxifer 控制走代理的 ip

  • 資深大佬 : tankren

    先试试走 TCP 呗 实践出真知 讨论都是纸面的

  • 資深大佬 : hiplon

    提高跨地区跨运营商家宽 VPN 连接性能

    Zerotier 的穿透比 tinc 快很多

  • 資深大佬 : qwvy2g

    如果能像 ipv4 那样做不同运营商的多 wan 出口策略就简单了,可是 ipv6 不知道怎么搞的,地址不固定。

  • 資深大佬 : bclerdx

    @PublicDNS 你这是怎么测试的。

  • 資深大佬 : bclerdx

    @hiplon 你这 iperf 哪里下的。

  • 資深大佬 : hiplon

    @bclerdx https://iperf.fr/iperf-download.php#windows

  • 資深大佬 : bclerdx

    @hiplon 好的,谢啦,有空试试看。

  • 資深大佬 : Songxwn

    zerotier

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具