Bug 89197

Summary: systemd-networkd: ip6tnl does not set MTU correctly without reboot
Product: systemd Reporter: nils
Component: generalAssignee: Tom Gundersen <teg>
Status: RESOLVED NOTABUG QA Contact: systemd-bugs
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description nils 2015-02-18 00:00:24 UTC
Using systemd v219 when defining an ip6tnl .netdev MTUBytes is not honoured except when the netdev is created at boot time.

Observe the MTU being set to 1452 even though 1337 is specified. After reboot, the MTU is set correctly.

# cat ip6tnl-test.netdev 
[NetDev]
Name=ip6tnl-test
Kind=ip6tnl
MTUBytes=1337
 
[Tunnel]
Mode=ip6ip6
Local=2001:db8::1
Remote=2001:db8::2
# systemctl restart systemd-networkd
# ip link show ip6tnl-test
17: ip6tnl-test@eth0: <POINTOPOINT,NOARP> mtu 1452 qdisc noop state DOWN mode DEFAULT group default 
    link/tunnel6 2001:db8::1 peer 2001:db8::2
# reboot
Connection closed.
% ssh host
# ip link show ip6tnl-test
12: ip6tnl-test@eth0: <POINTOPOINT,NOARP> mtu 1337 qdisc noop state DOWN mode DEFAULT group default 
    link/tunnel6 2001:db8::1 peer 2001:db8::2
Comment 1 Lennart Poettering 2019-03-19 12:29:44 UTC
.netdev files are only applied once, when the links are created. This is really intended. You can remove a link and then restart netwokrd to get them recreated with new settings.

You may use MTU= in the .network file to change the MTU based on configuration otherwise.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.