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.
Network and Security FAQ FAQs
- Can BMSs of Different Accounts Communicate with Each Other over an Internal Network?
- How Do Two BMSs in the Same Region But Different AZs Communicate with Each Other?
- Are My BMSs in the Same Subnet?
- Can I Associate a BMS with Multiple Security Groups?
- Can BMSs Communicate with ECSs in the Same VPC?
- What Are the Differences Between the Primary and Extension NICs of BMSs?
- Can I Bind Multiple EIPs to a BMS?
- Can I Configure the EIP?
- Will I Obtain an EIP That Has Been Released?
- What Are the Differences Between EIPs, Private IP Addresses, and Virtual IP Addresses?
- How Can I Modify the Network Configuration or Restart the Network If I Can Log In to a BMS Using Only SSH?
- How Do I Handle the Failure to Ping a CentOS 7 Extension NIC?
- What Do I Do If a Service Port Is Used by a One-Click Password Reset Plug-in?
- What Do I Do If the Communication Between the Primary NIC and Extension NIC of the BMS is Abnormal?
- How Can I Configure a Static IP Address for a BMS?
- How Do I Change the MTU Value of a Linux BMS NIC?
- How Do I Change the MTU Value of a Windows BMS NIC?
Feedback
Was this page helpful?
Provide feedbackFor any further questions, feel free to contact us through the chatbot.
Chatbotmore