V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
zhjh0521
1.05D
V2EX  ›  WireGuard

请教一个使用 WireGuard 后速度下降的问题

  •  
  •   zhjh0521 · 14 小时 36 分钟前 · 209 次点击
    我现在使用 openwrt ,在 openwrt 上设置了 WireGuard 服务端,然后在 macbook 和 iphone 上装了 WireGuard 客户端。家里的网络速度是 2000Mbps 下载,400Mbps 上传。但在使用 mac 和 iphone 连接后,测试速度只有 7Mbps 下载和 50Mbps 上传。在 mac 和 iphone 上测试都是同样的结果,使用 wifi 和 5g 测试都是一样的。往上搜了一下,尝试更改 MTU 从 1280 到 1420 ,没有任何作用,请问还有什么可以配置的嘛?
    3 条回复    2025-10-29 18:32:24 +08:00
    hxsf
        1
    hxsf  
       14 小时 16 分钟前
    1. 先试试纯连接的速度。知道 openwrt 的 ip 后。
    两边使用 iperf3 分别测试下 tcp/udp (重点,wg 使用 udp )的单/多线程速度。
    合理怀疑运营商 udp 限速。
    2. 看看 openwrt 的内核版本,是否原生 wg 还是用户态的。然后测 wg 速的时候看看 cpu 占用。
    zhjh0521
        2
    zhjh0521  
    OP
       14 小时 8 分钟前
    @hxsf 能详细解释下嘛。#1 怎么使用 iperf3 测试 tcp/udp 嘛,我知道 openwrt 的 ip 。#2 如何看是原生 wg 还是用户态的?
    zhjh0521
        3
    zhjh0521  
    OP
       13 小时 46 分钟前
    @hxsf 用 iperf 测了一下 tcp ,速度是正常的。测了一下 udp ,完全没数据。server 打印的信息:

    [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams
    [ 5] 0.00-1.00 sec 0.00 Bytes 0.00 bits/sec 0.000 ms 0/0 (0%)
    [ 5] 1.00-2.00 sec 0.00 Bytes 0.00 bits/sec 0.000 ms 0/0 (0%)
    [ 5] 2.00-3.00 sec 0.00 Bytes 0.00 bits/sec 0.000 ms 0/0 (0%)
    [ 5] 3.00-4.00 sec 0.00 Bytes 0.00 bits/sec 0.000 ms 0/0 (0%)
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   3269 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 00:19 · PVG 08:19 · LAX 17:19 · JFK 20:19
    ♥ Do have faith in what you're doing.