wuruxu

ipv6 环境下使用 wireguard, mtu 最好配置为 1280

  •  
  •   wuruxu · May 24, 2024 · 3021 views
    This topic created in 753 days ago, the information mentioned may be changed or developed.

    openwrt 环境下配置 /etc/config/network 类似如下:

    config interface 'wg0'
        option proto 'wireguard'
        option mtu '1280'
        option private_key 'xyzkjkfdkjfdlajfkdaCL22Nnv2gC3bbvmsE='
        list addresses '192.139.75.188'
        list addresses 'fed:aaaa:aaaa:aa01:d:0:b:4aa1'
    
    7 replies    2025-07-17 02:47:16 +08:00
    xqzr
        1
    xqzr  
       May 24, 2024   ❤️ 3
    最保守的。

    标准以太网
    IPv6 endpoint 1420
    IPv4 endpoint 1440

    PPPoE 下 减少 8
    IPv6 endpoint 1412
    IPv4 endpoint 1432
    Fred0410
        2
    Fred0410  
       May 24, 2024
    什么原因
    wuruxu
        3
    wuruxu  
    OP
       May 24, 2024
    @Fred0410 我的路由器不是直接拨号,二级的路由器,后来我也测试了,1400 也是可以的
    cyyself
        4
    cyyself  
       May 25, 2024   ❤️ 1
    @xqzr #1 需要注意的是,WireGuard over IPv6 over PPPoE 实际只能 1408 ,用 1412 依然会分片,因为 payload 需要 8 字节对齐
    shikkoku
        5
    shikkoku  
       May 27, 2024
    @cyyself #4 如果是 1500 标准以太网接入填多少?
    rulagiti
        6
    rulagiti  
       Sep 12, 2024
    @cyyself wg 官方脚本 1500 mtu 设置 wg mtu 为 1420 啊,pppoe 不就是 1412 吗
    xqzr
        7
    xqzr  
       Jul 17, 2025
    > IPv4 endpoint 1432

    补充:
    如果对端 >1432 (例如 1440 ),需要 1424 。否则,接收包会超出 1432
    因为:1432 除以 8 是整数,但不是偶数
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5316 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 80ms · UTC 08:59 · PVG 16:59 · LAX 01:59 · JFK 04:59
    ♥ Do have faith in what you're doing.