Aug 212008
 


Maximum Transmission Unit (MTU) the size (in bytes) of the largest packet or frame that a given layer of a communications protocol can pass onwards. The MTU may be fixed by standards (as is the case with Ethernet) or decided at connect time. A higher MTU brings higher bandwidth efficiency. However, large packets can block up a slow interface for some time, increasing the lag for further packets.


The MTU for ethernet is 1500 bytes, 1492 for PPPoE and 576 for Dialup. In very rare occasions, you may need to change the MTU size due to connectivity issues with your ISPs or in a VPN environment on your openSUSE.

The following procedure should help to change the Maximum Transmission Unit (MTU) in openSUSE.

In Network Manager

If you are using Network-Manager to control the network settings in your openSUSE then

1. From the menu, click Computer – YaST.

2. Click Network Devices in the leftpane and click Network Settings

Network Settings

3. Select the Network Adapter and click Edit.

Select Network Adapter
4. Under General tab, select from the default “MTU” values or enter your own required value. Please be aware of what you are doing as an incorrect MTU size setting can cause connectivity and performance issues. Click Next and Finish to complete the settings wizard.

MTU Settings

This will set the MTU value and restart the Network Service.

In traditional Network configuration

If you are not using the Network Manager and use the traditional method of controlling network settings using ifcfg scripts then

1. Using a terminal window, change directory to /etc/sysconfig/network/

opensuse:~ # cd /etc/sysconfig/network

2. In /etc/sysconfig/network directory, you have a config file for each of your network interface card. For instance, on my laptop, I have ifcfg-eth0 (ethernet) and ifcfg-wlan0 (wireless). These hold configurations for the respective network cards. Edit the interface file and enter the line as following

opensuse:/etc/sysconfig/network # vi ifcfg-eth0

and add a line like

MTU=’1460′

So it looks something like this

opensuse11:/etc/sysconfig/network # cat ifcfg-eth0
BOOTPROTO=’dhcp’
BROADCAST=”
ETHTOOL_OPTIONS=”
IPADDR=”
MTU=’1460′
NAME=’BCM4401-B0 100Base-TX’
NETMASK=”
NETWORK=”
REMOTE_IPADDR=”
STARTMODE=’auto’
USERCONTROL=’no’

3. Restart the network service or reboot your computer for the changes to take effect.

opensuse11:/etc/sysconfig/network # /etc/init.d/network restart

Dynamically change MTU

To dynamically change the MTU, you can use the ifconfig command. To change the MTU of interface eth0,

opensuse11:~ # ifconfig eth0 mtu 1460

However, this will be lost upon reboot.