MTU Settings

Asked by Martin Beecroft on 2007-09-27

I need to change the MTU settings for my wireless network connection eth1 to 1430, it is currently 1500 and as a result I am unable to connect to certain websites and have a slow connection speed. I have already managed to make the necessary change on a Windows machine which now connects without a problem but have been unable to make the change on my Ubuntu machine. I am running UBUNTU 7.04. I have tried to follow the instructions in message #4630 in Network Manager, but just keep getting the error message "No such command". I apologise for the simplistic nature of my request but I am new to Linux and Ubuntu and am really stuck. This is my first attempt at system settings using terminal.Thanks

Question information

English Edit question
Ubuntu network-manager Edit question
No assignee Edit question
Solved by:
marcobra (Marco Braida)
Last query:
Last reply:

I think you can try the new MTU setting with this command (change eth0 to your device name)
sudo /sbin/ifconfig eth0 mtu 1430
to make this change at every startup of Ubuntu you can put this value into:
sudo gedit /etc/network/interfaces
add the mtu parameter

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
mtu 1430

Restart your network layer with:
sudo /etc/init.d/networking restart

Check the new value with:
sudo ifconfig -a


Martin Beecroft (martin-ronax) said : #2

I have tried the above and can change mtu using the
sudo /sbin/ifconfig eth1 mtu 1430

command. eth1 being the device. but I can't get the rest to work. I am using a wireless connection and DHCP not a static IP address. I assume this is the problem? If so is there a command for this?

Try this:
sudo gedit /etc/network/interfaces
add the mtu parameter

iface eth1 inet dhcp
pre-up /sbin/ifconfig $IFACE mtu 1430


Martin Beecroft (martin-ronax) said : #4

Problem solved. All now set and working. Thanks very much for the help.

Martin Beecroft (martin-ronax) said : #5

Thanks, that solved my question.

Neel Shah (ndshah88) said : #6

I have a similar problem.
Evolution mail, youtube-dl, PUBKEY etc. dont work on my ubuntu 10.10. The internet is connected because I can surf on the other websites simultaneously.
My mozilla firefox is also pretty slow but chrome works just fine.

What could be the possible problem?

Like Martin even am new to Ubuntu n Linuz.

Any help would be greatly appreciated.

P.S.: The reply on running the command sudo ifconfig -a is as follows: (Just for reference)
eth0 Link encap:Ethernet HWaddr d8:d3:85:30:cf:33
          inet addr: Bcast: Mask:
          inet6 addr: fe80::dad3:85ff:fe30:cf33/64 Scope:Link
          RX packets:18803 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18890 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:16695077 (16.6 MB) TX bytes:3096674 (3.0 MB)
          Interrupt:45 Base address:0xc000

lo Link encap:Local Loopback
          inet addr: Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:240 (240.0 B) TX bytes:240 (240.0 B)

pimreg Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          UP RUNNING NOARP MTU:1472 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wlan0 Link encap:Ethernet HWaddr 70:f1:a1:55:b3:d4
          inet addr: Bcast: Mask:
          inet6 addr: fe80::72f1:a1ff:fe55:b3d4/64 Scope:Link
          RX packets:63 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3606 (3.6 KB) TX bytes:6398 (6.3 KB)
          Interrupt:17 Memory:f87e0000-f87e0100