How did you verify your real MTU?
I suppose your Ubuntu uses Netplan manager. You have asked CLI, not GUI. Here is my suggestion.
MTU verifying
Ping your default GW or another live closest node in your LAN by packets with "do not fragment" option and with specified packet size. Change packet size and find the limit size which is responded by the peer node:
ping 192.168.1.1 -c 2 -M do -s 2000
ping 192.168.1.1 -c 2 -M do -s 1500
ping 192.168.1.1 -c 2 -M do -s 1400
ping 192.168.1.1 -c 2 -M do -s 1472
ping 192.168.1.1 -c 2 -M do -s 1473
If packet size is bigger than MTU then ping response is e.g.:
ping: local error: message too long, mtu=1500
Please note that packet size you use in the ping command (-s option) must be MTU minus 18 bytes, i.e. for instance 1500-18=1472.
The response if the MTU is not exceeded is e.g.
2 packets transmitted, 2 received, 0% packet loss, time 1014ms
Setting
I will suppose your interface name is eth1.
cd /etc/netplan
ls -l
sudo cp 01-network-manager-all.yaml 02-eth1-mtu.yaml
sudo vi 02-eth1-mtu.yaml
The content example of new file 02-eth1-mtu.yaml:
network:
version: 2
renderer: NetworkManager
ethernets:
eth1:
dhcp4: true
mtu: 1000
New setting will be applied by command netplan try
. If you press Enter while executing a command, the wait will be less than 120 s.
sudo netplan try
Now it is time to verify new MTU size by method described above.
Disable new setting without deleting
sudo mv /etc/netplan/02-eth1-mtu.yaml /etc/netplan/02-eth1-mtu.yaml.bak
sudo netplan try