Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have issues with slow internet and by changing mtu works fine for me.

I use Ubuntu 9.10 64bit system.

I have dynamic ip address setup

All the time after system bootup, I need to do the following command to make mtu setting take effect.

sudo ifconfig eth0 mtu 1492

Are there any way I can set it up using startup program.

As you know, sudo prompt me root password.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

If you need to adjust your MTU permanently, do the following:

sudo vim /etc/network/interfaces

If you are using a static address then find the interface you need and simply add the MTU line:

iface eth0 inet static
address 192.168.0.1 
network 192.168.0.0
gateway 192.168.0.254
netmask 255.255.255.0
mtu 1492

If you are using DHCP addresses then you need to set this before the interface comes up, by adding this line:

iface eth0 inet dhcp
pre-up /sbin/ifconfig $IFACE mtu 1492

Then release and renew (or up and down) the interface:

sudo ifdown eth0
sudo ifup eth0

(from UbuntuForums)

share|improve this answer
    
note this is pretty much the entire contents of the link Iain posted in his earlier answer. @Kevin, please include a link back to your source when possible. welcome to super user! –  quack quixote Mar 28 '10 at 5:14
add comment

See these instructions at the Ubuntu forums.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.