Though in general it is not necessary there are (rare) occasions when it is necessary to set the MTU size explicitly, generally caused by issues with path MTU discovery.
In general you want to avoid this as using a smaller MTU size that necessary as the overheads associated with each network packet will reduce network throughput.
To set the MTU size in RedHat or CentOS you need to edit the appropriate network configuration file for you network device and add an entry for the MTU size. The name of the configuration file depends on the name of the network interface so for eth0 the filename is ifcfg-eth0.
Note – On RedHat or CentOS version 7.x you will also need to comment out any IPv6 options and modify the DHCP client configuration unless you are using a static IP address.
For this change to take effect you need to reboot or stop and restart the network.
How you achieve the same thing on a Debian based distributions depends on whether or not you are using DHCP
If you have a static address you can specify the MTU size along with the network address and subnet in /etc/network/interfaces, but this won’t work if you are using DHCP as Debian assumes that the MTU size will be supplied by the DHCP server when the client requests a DHCP lease.
You can workaround this problem by specifying a command that should be run automatically after the interface comes up at the end of that interface section.
Then you need to either reboot or stop and restart the network.