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

Language:
English Edit question
Status:
Solved
For:
Ubuntu network-manager Edit question
Assignee:
No assignee Edit question
Solved by:
marcobra (Marco Braida)
Solved:
2007-09-29
Last query:
2007-09-29
Last reply:
2007-09-28

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

Example:
-----------------------------
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.50
netmask 255.255.255.0
gateway 192.168.1.1
mtu 1430
-----------------------------------

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

Check the new value with:
sudo ifconfig -a

HTH

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

HTH

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 elart.it, that solved my question.

Neel Shah (ndshah88) said : #6

hello,
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:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0
          inet6 addr: fe80::dad3:85ff:fe30:cf33/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          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:127.0.0.1 Mask:255.0.0.0
          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:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
          inet6 addr: fe80::72f1:a1ff:fe55:b3d4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          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