zhjh0521
5.5D
V2EX  ›  WireGuard

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

  •  
  •   zhjh0521 · Oct 29, 2025 · 1959 views
    This topic created in 215 days ago, the information mentioned may be changed or developed.
    我现在使用 openwrt ,在 openwrt 上设置了 WireGuard 服务端,然后在 macbook 和 iphone 上装了 WireGuard 客户端。家里的网络速度是 2000Mbps 下载,400Mbps 上传。但在使用 mac 和 iphone 连接后,测试速度只有 7Mbps 下载和 50Mbps 上传。在 mac 和 iphone 上测试都是同样的结果,使用 wifi 和 5g 测试都是一样的。往上搜了一下,尝试更改 MTU 从 1280 到 1420 ,没有任何作用,请问还有什么可以配置的嘛?
    3 replies    2025-10-29 18:32:24 +08:00
    hxsf
        1
    hxsf  
       Oct 29, 2025
    1. 先试试纯连接的速度。知道 openwrt 的 ip 后。
    两边使用 iperf3 分别测试下 tcp/udp (重点,wg 使用 udp )的单/多线程速度。
    合理怀疑运营商 udp 限速。
    2. 看看 openwrt 的内核版本,是否原生 wg 还是用户态的。然后测 wg 速的时候看看 cpu 占用。
    zhjh0521
        2
    zhjh0521  
    OP
       Oct 29, 2025
    @hxsf 能详细解释下嘛。#1 怎么使用 iperf3 测试 tcp/udp 嘛,我知道 openwrt 的 ip 。#2 如何看是原生 wg 还是用户态的?
    zhjh0521
        3
    zhjh0521  
    OP
       Oct 29, 2025
    @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%)
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1439 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 23:57 · PVG 07:57 · LAX 16:57 · JFK 19:57
    ♥ Do have faith in what you're doing.