setup mtu automatically after system reboot

3

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.

Gopalakrishnan Subramani

Posted 2010-02-14T05:46:59.197

Reputation: 229

Answers

3

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)

Kevin

Posted 2010-02-14T05:46:59.197

Reputation: 271

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 – 2010-03-28T05:14:48.933

-1

See these instructions at the Ubuntu forums.

Iain

Posted 2010-02-14T05:46:59.197

Reputation: 4 399