freifunk-gluon / gluon

a modular framework for creating OpenWrt-based firmwares for wireless mesh nodes
https://gluon.readthedocs.io
Other
549 stars 324 forks source link

MTU issues with Telekom Hybrid / Speedport Pro Plus when using mesh-on-wan #2642

Open T-X opened 2 years ago

T-X commented 2 years ago

Bug report

What is the problem?

A Speedport Pro Plus at a Telekom Hybrid internet connection sends ICMPv6 Router Advertisements with an MTU option of 1440 bytes. This in turn breaks mesh-on-wan, causing packetloss for specific (but not the maximum, bc. of batman-adv fragmentation) byte ranges for client devices.

root@nml-wr1043nd-2:~# ip link show dev br-wan
7: br-wan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether b0:48:7a:e7:f3:1e brd ff:ff:ff:ff:ff:ff
root@nml-wr1043nd-2:~# cat /proc/sys/net/ipv6/conf/br-wan/mtu 
1440

tcpdump capture on br-wan for ICMPv6 RA:

00:05:32.191685 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 64) fe80::1 > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 64
    hop limit 255, Flags [other stateful], pref medium, router lifetime 180s, reachable time 30000ms, retrans timer 0ms
      prefix info option (3), length 32 (4): 2003:e2:e706:ec2a::/64, Flags [onlink, auto], valid time 172800s, pref. time 86400s
      mtu option (5), length 8 (1):  1440
      source link-address option (1), length 8 (1): 50:6f:0c:c7:80:a0

What is the expected behaviour?

Gluon Version:

Site Configuration:

https://git.chaotikum.org/freifunk-luebeck/site-ffhl/-/tree/v0.15.2

Edit: Ideally, the Speedport would not send this option at all. I don't like either the ICMPv6 RA MTU option or the DHCP MTU option. They are only causing trouble. If the router were only sending ICMPv6 "Packet Too Big" and ICMP "Destination unreachable - The datagram is too big." should be more reliable, sufficient and would precisely only affect internet routes. But the configuration options on the Speedport Pro Plus itself are very limited, there is not even an option to disable IPv6 or ICMPv6-RA for instance. So that's why maybe it could be useful to find a solution in Gluon or the Linux kernel for this.

mweinelt commented 2 years ago

Isn't the bug here that br-wan does not accept the advertise MTU? And if all nodes were on the same WAN they'd all use the same lower MTU, which should work, no?

T-X commented 2 years ago

@mweinelt br-wan does accept the MTU advertised by ICMPv6 RA - just not on the interface directly, which would be for all protocol families. But instead only on the IPv6 specific / for-IPv6-only interface MTU on /proc/sys/net/ipv6/conf/br-wan/mtu.

All nodes on the wan side get the same IPv6 MTU on br-wan. But the issue is that the vxlan interface still has an 1430 bytes MTU, which batman-adv will try to use, but which will not work.

rubo77 commented 2 years ago

Will this problem also occur, if we have set an MTU of 1300 in our firmware site.conf?