Article 595E6 Changing size of MTU permanently - Ubuntu 20.04

Changing size of MTU permanently - Ubuntu 20.04

by
Toadman
from LinuxQuestions.org on (#595E6)
I want to change the size of the MTU permanently on my Ubuntu 20.04 system to 1452. I'm running Netdata and I get a lot of warnings like the below since my upgrade from 18.04.

Code:inbound packets dropped ratio = 0.53%
the ratio of inbound dropped packets vs the total number of received packets of the network interface, during the last 10 minutesI've done quite a bit of Googling over the past few days and have made some changes/additions to my /etc/network/interfaces and to my /etc/dhcp/dhclient.conf as suggested but none have worked after restarting the network with #/etc/init.d/networkmanager restart.

/etc/network/interfaces file
Code:# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
dns-nameservers 127.0.0.1
MTU=1452
post-up /sbin/ifconfig eth0 mtu 1452/etc/dhcp/dhclient.conf <--- marks the additions I made
Code:send host-name = gethostname();

interface "eth0" { <-----------
default interface-mtu 1452; <-----------
supercede interface-mtu 1452; <---------
} <---------

request subnet-mask, broadcast-address, time-offset, routers,I can make the change temporary with
Code:ifconfig eth0 mtu 1452however it's back to 1500 on a restart of the system of course.

I've also noticed that the highest packet size I can ping with is 68 bytes. I don't know if that's normal or not as I'm not really well versed in networking at all.
Code:ping -c5 -s68 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 68(96) bytes of data.
76 bytes from 8.8.8.8: icmp_seq=1 ttl=119 time=24.7 ms
76 bytes from 8.8.8.8: icmp_seq=2 ttl=119 time=25.0 ms
76 bytes from 8.8.8.8: icmp_seq=3 ttl=119 time=25.4 ms
76 bytes from 8.8.8.8: icmp_seq=4 ttl=119 time=25.1 ms
76 bytes from 8.8.8.8: icmp_seq=5 ttl=119 time=25.2 ms

--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 24.690/25.084/25.423/0.248 msCode:ping -c5 -s69 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 69(97) bytes of data.

--- 8.8.8.8 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4004msAny advice would be appreciated.latest?d=yIl2AUoC8zA latest?i=e5rhAPN7TCI:4MaifCeMdAM:F7zBnMy latest?i=e5rhAPN7TCI:4MaifCeMdAM:V_sGLiP latest?d=qj6IDK7rITs latest?i=e5rhAPN7TCI:4MaifCeMdAM:gIN9vFwe5rhAPN7TCI
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments