Linux MTU Change Size

Linux MTU Change Size

To change the Maximum Transmission Unit (MTU) size on a Linux system, you can follow these steps:

  1. Identify the name of the network interface that you want to change the MTU size for. You can use the ip link command to list the available network interfaces:
re‮t ref‬o:lautturi.com
ip link

This will display a list of the available network interfaces, along with their names and state.

  1. Change the MTU size for the network interface using the ip command. For example, to change the MTU size for the eth0 interface to 1400:
ip link set eth0 mtu 1400

This will change the MTU size for the eth0 interface to 1400.

  1. To make the change permanent, you will need to update the configuration file for the network interface. The location of the configuration file depends on the distribution and version of Linux that you are using. For example, on a CentOS or Red Hat Enterprise Linux (RHEL) system, you can update the /etc/sysconfig/network-scripts/ifcfg-eth0 file by adding the following line:
MTU=1400

This will set the MTU size to 1400 when the network interface is started.

  1. Restart the network interface to apply the changes. For example:
ifdown eth0
ifup eth0

This will bring down the eth0 interface and then bring it back up, applying the changes to the MTU size.

Note: The MTU size is the maximum size of a single packet that can be transmitted over a network. Setting the MTU size can affect the performance of the network, depending on the size of the packets and the available bandwidth. Consult the documentation for your network hardware and the ip command for more information on how to set the MTU size.

Note: It is important to be careful when changing the MTU size, as there is a risk of disrupting the network if the MTU size is not set correctly. It is a good idea to test the MTU.

Created Time:2017-10-16 14:38:52  Author:lautturi