Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown   Email 



TWEAKING MTU SETTINGS


As you become more experienced with Linux you maybe want to fine tune your internet connection settings . . . . .

The default of 1460 bytes per packet can vary with the connection, distro or hardware you have.
On some systems you can have better results with low MTU settings and some with high MTU settings, you will just have to see and try what works best for you.

Here is how you can change the MTU settings for your network interface:

First have a look on how the settings are now:

CODE
# ifconfig eth0

And you will get something similar to this:

QUOTE = ifconfig
eth0      Link encap:Ethernet  HWaddr 00:07:95:XX:XX:59
          inet addr:10.0.0.152  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:29861 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26784 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6378900 (6.0 Mb)  TX bytes:2889677 (2.7 Mb)
          Interrupt:11 Base address:0xd400


Now we will test another setting ( MTU 1460 ):
 
CODE
# ifconfig eth0 mtu 1460

And see if you get better results . . . No ? Well, try again
 
CODE
# ifconfig eth0 mtu 1300

or

CODE
# ifconfig eth0 mtu 1200


Now imagine you found the value you want to make permanent: MTU 1250 , pull up the file "/etc/sysconfig/network-scripts/ifcfg-eth0" and make it read:

QUOTE = /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
MTU=1250
BOOTPROTO=dhcp
NETMASK=255.255.255.0
ONBOOT=yes
METRIC=10


After the next boot the MTU settings will be on 1250

Have fun, but be careful not to break things !



Bruno


-- Mar 26 2005 ( Revised Dec 13 2005 ) --


Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown   Email