Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

How to increase MTU size on Linux 2.6?

Is such a thing possible? If yes, which files (in /etc or elsewhere) must one edit?

share|improve this question
    
Are you talking about MTU? –  drdaeman Jun 11 '09 at 15:06
    
Yes, I am talking about MTU. –  NeoCoder22 Jun 11 '09 at 15:11
    
Which distribution are you using ? –  Dave Cheney Jun 13 '09 at 4:04

3 Answers 3

I'd warn you not not to do it unless you are really certain, that this is what you really want (like having two servers directly connected by cross-over cable over Gigabit Ethernet interfaces).

There's already PMTUD algorithm, which is able to deduce MTU size across the path. And when rising MTU above that you'll either experience some packet loss or will make network-administrating guys sad, because their routers and switches will have to fragment your packets using CPU as opposed to fast routing with ASICs.

If that's what you want, then you may want to see http://wiki.archlinux.org/index.php/Jumbo_Frames, which has some nice numbers and hints. The basic command is ip link set mtu 4000 dev eth0 (or ifconfig eth0 mtu 4000 for older ifconfig tool) for 4K packets.

share|improve this answer
    
1500 bytes is the maximum for standard ethernet. –  David Pashley Jun 12 '09 at 23:44
    
Oh and Gigabit ethernet can go up to 9000 bytes with jumbo frames. –  David Pashley Jun 12 '09 at 23:45

Assuming you mean MTU (Maximum Transmission Unit), check out this article (should be similar across Linuxen)

share|improve this answer

I think it's in the

/etc/network/interfaces

area. There will be 'iface' entries. Locate your interface and change the mtu line (or add one at the end if there is none).

Just remember that this is not magic. If you increase the MTU too much, you will have network problems.

To check without 'burning' the configuration into your /etc files, you can try

ifconfig eth0 mtu <value>

where, eth0 is your interface name. This change will be lost on reboot.

share|improve this answer
2  
/etc/network/interfaces is distribution specific. I think only debian based systems use that file. RedHat based distros use scripts in /etc/sysconfig/network-scripts/ –  JimB Jun 11 '09 at 19:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.