V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
FreeEx
V2EX  ›  问与答

在 wireguard 隧道上建立 vxlan 隧道, iperf3 测试没速度,这是啥情况? TCP over UDP over UDP

  •  
  •   FreeEx · 2020-12-04 23:54:06 +08:00 · 836 次点击
    这是一个创建于 1210 天前的主题,其中的信息可能已经有所发展或是发生改变。

    v 站贴图不方便,复制粘贴测试结果了。

    server

    Accepted connection from 10.0.0.2, port 33854
    [  5] local 10.0.0.1 port 5201 connected to 10.0.0.2 port 33856
    [ ID] Interval           Transfer     Bitrate
    [  5]   0.00-1.00   sec  0.00 Bytes  0.00 bits/sec                  
    [  5]   1.00-2.00   sec  0.00 Bytes  0.00 bits/sec                  
    [  5]   2.00-3.00   sec  0.00 Bytes  0.00 bits/sec                  
    [  5]   3.00-4.00   sec  0.00 Bytes  0.00 bits/sec                  
    [  5]   4.00-5.00   sec  0.00 Bytes  0.00 bits/sec                  
    [  5]   5.00-6.00   sec  0.00 Bytes  0.00 bits/sec                  
    [  5]   6.00-7.00   sec  0.00 Bytes  0.00 bits/sec                  
    [  5]   7.00-8.00   sec  0.00 Bytes  0.00 bits/sec                  
    [  5]   8.00-9.00   sec  0.00 Bytes  0.00 bits/sec                  
    [  5]   9.00-10.00  sec  0.00 Bytes  0.00 bits/sec                  
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bitrate
    [  5]   0.00-10.00  sec  0.00 Bytes  0.00 bits/sec                  receiver
    

    client

    root@dubuntu:/etc/wireguard# ip netns exec ns0 iperf3 -c 10.0.0.1
    Connecting to host 10.0.0.1, port 5201
    [  5] local 10.0.0.2 port 33856 connected to 10.0.0.1 port 5201
    [ ID] Interval           Transfer     Bitrate         Retr  Cwnd
    [  5]   0.00-1.00   sec   107 KBytes   879 Kbits/sec    2   1.41 KBytes       
    [  5]   1.00-2.00   sec  0.00 Bytes  0.00 bits/sec    1   1.41 KBytes       
    [  5]   2.00-3.00   sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes       
    [  5]   3.00-4.00   sec  0.00 Bytes  0.00 bits/sec    1   1.41 KBytes       
    [  5]   4.00-5.00   sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes       
    [  5]   5.00-6.00   sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes       
    [  5]   6.00-7.00   sec  0.00 Bytes  0.00 bits/sec    1   1.41 KBytes       
    [  5]   7.00-8.00   sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes       
    [  5]   8.00-9.00   sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes       
    [  5]   9.00-10.00  sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes       
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bitrate         Retr
    [  5]   0.00-10.00  sec   107 KBytes  88.0 Kbits/sec    5             sender
    [  5]   0.00-10.00  sec  0.00 Bytes  0.00 bits/sec                  receiver
    
    iperf Done.
    
    
    第 1 条附言  ·  2020-12-05 17:37:35 +08:00
    找到原因了,我物理网卡 mtu 大小是 1500,wireguard 接口的 mtu 大小是 1420,使用 vxlan 隧道的虚拟机 mtu 大小也是 1500,导致发送的数据报文包有问题。
    把使用 vxlan 隧道的虚拟机 mtu 修改小一点就解决问题了,我这里修改为了 1300,没有做详尽的测试,可能可以设置的更大一点。
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2821 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 13:32 · PVG 21:32 · LAX 06:32 · JFK 09:32
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.