From 5cd6b06053c0d9aa39a20a5b9c8e40d16b008ca0 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Wed, 25 Nov 2020 18:28:22 +0100 Subject: [PATCH] mesh_wg: increase the mtu so wg has to fragment --- host_vars/gw31.regensburg.freifunk.net | 2 +- roles/mesh_wg/templates/mesh_wg.conf.j2 | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/host_vars/gw31.regensburg.freifunk.net b/host_vars/gw31.regensburg.freifunk.net index 4b115e1..5d0d8f6 100644 --- a/host_vars/gw31.regensburg.freifunk.net +++ b/host_vars/gw31.regensburg.freifunk.net @@ -8,7 +8,7 @@ nextnode4: 10.90.96.1 nextnode6: fdef:f30f:1337:cafe::1 mtu: 1312 -wg_vni_id: 3120917 +vx_wg_vni: 3120917 fastd_port: 10030 diff --git a/roles/mesh_wg/templates/mesh_wg.conf.j2 b/roles/mesh_wg/templates/mesh_wg.conf.j2 index 4747b63..7d18644 100644 --- a/roles/mesh_wg/templates/mesh_wg.conf.j2 +++ b/roles/mesh_wg/templates/mesh_wg.conf.j2 @@ -3,11 +3,15 @@ # vx-{{ site_code }} auto vx-{{ site_code }} iface vx-{{ site_code }} - vxlan-id 3120917 - vxlan-learning no - vxlan-local-tunnelip6 fe80::{{ gateway_id }} - vxlan-physdev wg-ffrgb_tst + #vxlan-id {{ vx_wg_vni }} + #vxlan-local-tunnelip6 fe80::{{ gateway_id }} + #vxlan-physdev wg-ffrgb_tst + pre-up ip -6 link add vx-{{ site_code }} type vxlan id {{ vx_wg_vni }} local fe80::{{ gateway_id }} dev wg-{{ site_code }} noudpcsum dstport 8472 + up ip link set vx-{{ site_code }} up + post-up ip link set vx-{{ site_code }} mtu 1532 post-up batctl -m bat-{{ site_code }} if add vx-{{ site_code }} + down ip link set vx-{{ site_code }} down + post-down ip -6 link del vx-{{ site_code }} # wg-{{ site_code }} auto wg-{{ site_code }} @@ -15,4 +19,5 @@ iface wg-{{ site_code }} address fe80::{{ gateway_id }}/128 ipv6-addrgen no link-type wireguard + mtu 1610 pre-up wg setconf wg-{{ site_code }} /etc/wireguard/wg-{{ site_code }}.conf