wuruxu

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

  •  
  •   wuruxu · May 24, 2024 · 3560 views
    This topic created in 904 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
    xqzr
    May 24, 2024❤️3
    1
    最保守的。

    标准以太网
    IPv6 endpoint 1420
    IPv4 endpoint 1440

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

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