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).
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
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.
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.
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.