You are not logged in.

#1 2023-01-20 18:20:42

justdanyul
Member
Registered: 2011-09-29
Posts: 115

Systemd-networkd MTU issues

I can't seem to get MTU set in config, regardless of what I try. If I set it manually using

ip link set mtu 9000 enp4s0

everything works great. But, if I try and use udev, as per the networking guide, or systemd-networkd directly, it won't work. More specifically, I got a rule like this

20-wired.link

[Match]
Name=enp4s0

[Link]
MTUBytes=9000

yet, I get

[daniel@server ~]$ ip addr | grep mtu
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
2: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
3: enp6s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
4: wlp5s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
5: br-4807f7c935c4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
6: br-b8ff9027fd96: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
7: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 

Last edited by justdanyul (2023-01-20 18:27:54)

Offline

#2 2023-01-20 19:03:17

just4arch
Member
Registered: 2023-01-07
Posts: 13

Re: Systemd-networkd MTU issues

Try to put that in the .network file instead of the .link:

# cat /etc/systemd/network/eno1.network
[Match]
Name=eno1

[Link]
MTUBytes=9K
...

# ip link show eno1
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9216 qdisc mq state UP mode DEFAULT group default qlen 1000
...

Offline

Board footer

Powered by FluxBB