MTU size for jumbo frames (9000) doesn't hold after reboot

I’m running Jetpack 4.2.2 for a vision application without the GUI. I set the IP address to static and MTU size to 9000 in the /etc/network/interfaces like so:

allow-hotplug eth0
auto eth0
iface eth0 inet static
address 192.168.3.219
netmask 255.255.255.0
mtu 9000

The IP address settings work but the MTU setting doesn’t. I ended up setting the MTU manually by running “ip link…” However, the MTU size reset to 1500 on reboot. What is the correct way to do this ? (I cannot use Network Manager).

Is there a path to another machine supporting jumbo frames ?

ping -M do -c 4 -s 8972 192.168.0.1

If not, it might revert to standard mtu.

Yes. The issue is the MTU size reverts to default when I reboot. MTU size of 9000 works fine as long I don’t reboot:

PING 192.168.2.229 (192.168.2.229) 8972(9000) bytes of data.
8980 bytes from 192.168.2.229: icmp_seq=1 ttl=64 time=0.140 ms
8980 bytes from 192.168.2.229: icmp_seq=2 ttl=64 time=0.127 ms
8980 bytes from 192.168.2.229: icmp_seq=3 ttl=64 time=0.133 ms
8980 bytes from 192.168.2.229: icmp_seq=4 ttl=64 time=0.208 ms

I’m away from any Jetson for a while and cannot test, but you may try to comment allow-hotplug or auto (check this).

Don’t know if it will work, but try editing “/etc/network/interfaces”. Add this line:

mtu 9000

(NetworkManager can change around which files do the job depending on whether or not the interface is considered “managed”)

We should probably ask this: Do you control the DHCP server? For example, if you have a router with admin access, then you may also have the ability to customize the options of the DHCP server there. If not, then you are limited to modifying this behavior at either the DHCP client end, or through scripting.

For the server end, if you were to do this with a Linux server, then it would go something like this for cases of having direct access to the DHCP server files:
http://www.microhowto.info/howto/change_the_mtu_of_a_network_interface_using_dhcp.html

If you have control of the server, but it is just some appliance, then there is a good chance you will be able to work in the MTU defaulting to 9000 in some obscure customization option. If not, then you have to script this.

In case you have access to the router you might need to distinguish between MTU size request to the outside world, versus for addresses assigned to the internal network. The router has a real IP address to the outside world, and you do not want to have this ask for jumbo frames; you do want the internal non-public IP addresses defaulting to MTU 9000. It is this latter which your router is most likely to support.

If you use static configuration without a router, then scripting is your only choice. I suspect you use a router since this would override each time you boot up unless the server or client have the option in it.

I also just realized the nm-connection-editor (package “network-manager-gnome”, “sudo apt-get install network-manager-gnome”) application can set this, but I don’t know where it is actually stored. If you edit the particular connection with this application, then the “Ethernet” tab has an MTU entry. Try changing that to 9000.

Really appreciate all the replies. However, I’m not using a router. This is a direct connection to another Ethernet device which already configured for 9000 MTU size. I’m not using the Networking Manager or GUI either. The static IP settings and MTU size are set in the /etc/network/interfaces file. Everything works except for the MTU. If I set the MTU using the “ip link set…” command, it works but doesn’t persistent on reboots so I’m speculating that something on boot resetting the MTU size to 1500.

“nm-connection-editor” should be able to set this, but I’m not sure which file would be edited.

Maybe something like:

/etc/NetworkManager/system-connections/Wired Connection n

It was permanently setting MTU to 9000 as expected for my nm managed connection.

Both nm-connection-editor and the file ‘/etc/NetworkManager/system-connections/Wired Connection n’ are managed by the Network Manager. My application cannot use the Network Manager and it is disabled so none of these would work.

I cannot provide a solid answer to this. However, if you look at older releases of Ubuntu, including for example admin documents for something back in the days prior Ubuntu 14.04 (or maybe at 14.04?), then NetworkManager was not used. Those out of date documents may offer a method to update for non-managed devices.

PS: I can sometimes get irritated with NetworkManager and fully understand how nice it is at times to remove nm from the equation.

I finally found an answer online. The solution is to add a script to /etc/network/if-up.d/. In the script, call ifconfig to set the mtu size:

#!/bin/sh
ifconfig eth0 mtu 9000

Make the script executable by setting its permission to 755

1 Like

That‘s SOLUTION?
Downstairs’s answer is really SOLUTION.

ehm
the issue persist
what is the soluion? GUI manager won’t work. the script either

ls -lh /etc/network/if-up.d/mtu
-rwxr-xr-x 1 root root 33 Feb 20 23:09 /etc/network/if-up.d/mtu

$ cat /etc/network/if-up.d/mtu
#!/bin/sh
ifconfig eth0 mtu 9000

after reboot

eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1466 qdisc mq state UP group default qlen 1000

A workaround here: AGX Orin - mtu 1466 - #9 by Honey_Patouceul