I'm trying to change the MTU of the eth0
interface on my machine running Ubuntu 18.04 (Nvidia Jetson Xavier NX). Running sudo netplan apply
successfully sets the mtu
for eth0
to 1280.
Unfortunately, within a minute, my SSH connection is dropped. I notice MTU is reset to 1500 when I eventually reconnect. I can see that with ifconfig eth0
. This is not a problem for Ubuntu 20.04 (on NVIDIA AGX Orin).
I've added the following to my netplan YAML config directory (/etc/netplan/eth0.yaml
):
network:
version: 2
renderer: NetworkManager
ethernets:
eth0:
dhcp4: true
use-mtu: false
mtu: 1280
Model: NVIDIA Jetson Xavier NX Developer Kit - Jetpack 4.6 [L4T 32.6.1]
Question:
Why does the MTU reset to 1500 within a few minutes? I don't think I should follow https://unix.stackexchange.com/questions/314994/mtu-keeps-getting-reset-to-1500, since this could cause an continuous network disconnections every few minutes.
Extra detail: why I want the MTU to be 1280.
I'm using Tailscale for accessing my devices, and these devices can also use tailscale to access other services. Tailscale doesn't support 1500 MTU, I've tried it on other devices and it doesn't work. Their default is 1280
. Their release notes state:
TS_DEBUG_MTU
environment variable can be set to change the tailscale0 MTU size; has to be changed for both nodes wanting to use larger packets. Setting the MTU larger than 1468 is unlikely to work. For Linux platforms, it can be set in /etc/default/tailscaled source
My device runs microk8s with Flanneld, and the containers inside don't know which interface they'll use. Flanneld will use the host network interface to determine the MTU to use. I think they should resort to creating packets with max size of 1280 bytes, in case these bytes are destined to go via tailscale. Therefore, I need to set eth0
's mtu to 1280.
I also wrote my question on the NVIDIA forums.