Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-23-2006, 11:15 PM   #1
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 66
Fine tuning my MTU

Currently my MTU is set at the default 1500.

What is the best way of determining my optimal MTU? Is there a program that can assist? Is there a decent guide out there for accomplishing this in Linux? (99% of the guides out there are for Windows)

Thanks in advance
Old 05-24-2006, 07:11 AM   #2
Senior Member
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
There is no "optimal Maximum Transfer Unit" for all destinations.

On one path you may cross a link layer that is using cells of 500 while on others, frames of 1500 will not get fragmented.
It is dynamic. To resolve this, there is a protocol called Path MTU discovery.

Unfortunatly P-MTUD is not really working everywhere . Sometimes people put their firewall to a paranoid level which result in poor network performance. It gets even more complex when you cross a vpn or a private adress space where NAT doesn't do its job of Nating icmp packets.

When I was on PPPoE I had set my MTU to 1400 and I had a very good network performance.

MTU is a per-path parameter. Its not even a per-destination one as packets can take different paths to reach the same destination.

There is a way of determining the MTU to one destination:
#ping -M do -s <icmp_packet_size> <server>
Start with icmp packet size from 1400 and go up using dichotomy. Until you find the optimal "path to <server> maximum transfer unit".
The MTU for this server is icmp_packet_size+header(ip)+header(icmp)=icmp_packet_size+28

You can configure it like this:
#this disable path mtu discovery
sysctl -w net.ipv4.ip_no_pmtu_disc=1
#this sets interface mtu
ifconfig eth0 blablah.. mtu 1400

A website which was interesting for improving performance (have not checked lately)
A reference guide with some ideas:

Last edited by nx5000; 05-24-2006 at 07:12 AM.
Old 05-24-2006, 11:40 AM   #3
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Original Poster
Rep: Reputation: 66
I just want my mtu optimized between me and my isp gateway....Thats the only constant, and I know on this connection, it is less than 1500.

Thanks for the link, and the 'mini-guide', both usable info.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fine-tuning samba TomalakBORG Linux - Networking 5 02-01-2006 12:34 AM
Fine tuning after upgrade? Alan Lakin Slackware 1 09-14-2005 08:50 AM
squid fine tuning help!!!! veeraabose Linux - Networking 3 03-07-2005 08:31 AM
MTU tuning for 56k modem linuxbeliever SUSE / openSUSE 0 02-08-2005 02:04 AM
FTP fine tuning eidolon532 Linux - Networking 1 04-15-2003 04:33 PM

All times are GMT -5. The time now is 06:35 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration