View Full Version : Permanently setting MTU
veloct
October 25th, 2005, 09:14 PM
My MTU is set to 1492. I can do > sudo ifconfig eth0 mtu 1500 and it will make the change. How can I make this permanent?
Also, I would like to tweak my internet performance. Any suggestions?
Thanks.
mgor
October 26th, 2005, 03:15 AM
check /etc/network/interfaces.
options that go in there are found in
man 5 interfaces
veloct
October 26th, 2005, 07:16 AM
Thank you, that did the trick.
jnoreiko
December 17th, 2005, 03:37 AM
veloct, could you post the changes you made to that file please?
veloct
December 17th, 2005, 04:43 AM
I won't post the whole thing but only the part that was changed. I ended up setting a static ip since I have a router between my DSL modem and my PC but it works just fine if you just use dhcp also. I opened my favorite editor as sudo ('sudo kedit /etc/network/interfaces') and added the mtu line.
# The primary network interface
iface eth0 inet static
address 192.168.2.7
netmask 255.255.255.0
gateway 192.168.2.1
mtu 1500
Then saved the change I made. Back in the terminal window I entered the following commands:
sudo ifdown eth0 - this brings the network down, you can verify by issuing 'ifconfig' without the quotation marks.
sudo ifup eth0 - pretty straight forward, I brought the network back up
ifconfig - it should show the new mtu value plus all the other information related to eth0
HTH
BTW, the lines after the iface command have a couple spaces in front of them. Makes it easier to see.
Lambert
December 17th, 2005, 09:15 AM
Also, I would like to tweak my internet performance. Any suggestions?
Thanks.
Are you using a broad band connection? If so see this thread for some tweaks.
http://www.ubuntuforums.org/showthread.php?t=104371
Also look into disabling ipv6 in firefox and system wide. Some of claimed improvements with this. there's a small section in the WTG that's linked in my signature on how to do this.
jnoreiko
December 21st, 2005, 05:12 PM
it works just fine if you just use dhcp also
I'm not sure it does.
The manual page for that file seems to sugget the mtu line can only go on after an interface listed with the static method.
I've tried this:
iface eth0 inet dhcp
mtu 1400
and it doesn't work.
jnoreiko
January 12th, 2006, 10:58 AM
Update: found a fix on another thread here. This is apparently a known bug.
eXisor
August 3rd, 2006, 10:48 AM
I know this is an old thread, but it took me ages to find the simple answer for DHCP, ie. requiring no boot script. It was originally posted by mlonker, but is buried in a thread
http://glasnost.beeznest.org/articles/290
jefferz
April 8th, 2008, 12:30 AM
link is broken...
DHCP and manual MTU setting is needed for my Hauwei E220 on GSM (1500 is to high works good on 576)
Can someone post this info
Thanks
vBulletin® v3.8.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.