WireGuard interfaces do not always have proper MTU applied
When you set the mtu of an assigned wg interface, that value is not honoured. The mtu of the interface is always 1420. I need to set the mtu of my wg interfaces to 1412 to account for pppoe, but when I do even though the mtu setting in the interface config shows 1412, the mtu value displayed in Status > Interfaces and by ifconfig shows 1420.
Updated by Jim Pingle 5 months ago
- Subject changed from WireGuard interfaces do not honour mtu setting to WireGuard interfaces do not always have proper MTU applied
- Target version set to CE-Next
If you edit the assigned interface and save/apply, it does get the correct MTU applied. However, if you edit/save the WireGuard tunnel, the default MTU is reset. Also the default MTU is present at boot time, not the MTU on the assigned interface.
So when (re)configuring WireGuard it needs to check for and use the MTU from the assigned interface, if present, since the interface itself is recreated when that happens.