How Do I Change the MTU Value of a Linux BMS NIC?
Maximum Transmission Unit (MTU) specifies the largest packet of data that can be transmitted on a network and ranges from 1280 to 8888 in the unit of byte. If the MTU values of two hosts are different, the transmission may be interrupted, or packet loss may occur. This section describes how to change the NIC MTU values of BMSs running SUSE Linux, CentOS, and Ubuntu.
SUSE Linux
The following operations use SUSE Enterprise Linux Server 11 SP4 64-bit as an example to describe how to change the MTU value:
- Log in to the BMS as user root.
- Run the ifconfig command to view the NIC that has a bound IP address, for example, eth0.
- Run the following command to open ifcfg-XXX.
vi /etc/sysconfig/network/ifcfg-XXX
- Press i to enter editing mode and add the following statement to set the MTU value of the NIC:
MTU=8888
- Press Esc, enter :wq!, and press Enter to save and exit the file.
- Run the following command to restart the network:
- Run the ifconfig command to check whether the MTU value has been changed.
CentOS
The following operations use CentOS 7.5 64-bit as an example to describe how to change the MTU value:
- Log in to the BMS as user root.
- Run the ifconfig command to view the NIC that has a bound IP address, for example, eth0.
- Run the following command to open ifcfg-XXX.
vi /etc/sysconfig/network-scripts/ifcfg-XXX
- Press i to enter editing mode and add the following statement to set the MTU value of the NIC:
MTU=8888
- Press Esc, enter :wq!, and press Enter to save and exit the file.
- Run the following command to restart the network:
- Run the ifconfig command to check whether the MTU value has been changed.
Ubuntu
- Log in to the BMS as user root.
- Run the following command to open the interfaces file:
vi /etc/network/interfaces
- Press i to enter editing mode and add the following statement to set the MTU value of the NIC:
post-up /sbin/ifconfig/ eth0 mtu 8888

- Press Esc, enter :wq!, and press Enter to save and exit the file.
- Run the following command to restart the network:
- Run the ifconfig command to check whether the MTU value has been changed.

Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.