[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Disable ipv4 fragmentation



Le mardi 24 avril 2007 à 11:33 -0700, Steve Langasek a écrit :
> > I'm working with sockets in a debian with a version of kernel 2.6.x, and 
> > I'd like to disable the fragmentation of the ipv4 introduce.
> > I have read that there was the option of modified the file 
> > /proc/sys/net/ipv4/ip_always_defrag but it doesn't exist.
> > So I'm totally lost and I need to disable that fragmentation or change the 
> > size to the maximum of 65535.
> > Anyone can help me?
> 
> What do you expect the system to do with oversized packets instead of
> fragmenting them?  Discard them?
> 
> Fragmentation is used any time a given packet is too large to fit inside a
> single frame of the underlying transport, as determined by the network
> interface's MTU.

Practically speaking, packets coming from a Linux host are never
fragmented because Linux sets the DF bit. Which means, oversized packets
are actually rejected so that the endpoint shortens its packet size to
fit the smallest MTU on the whole path.

As a result, your packets are limited by the various MTU sizes. On
Ethernet links, the MTU is set to 1500 by default but you can increase
it (using the "mtu" keyword in /etc/network/interfaces) up to 9000 on
most hardware, and 15000 with some rare hardware. You also need
switch-side configuration and support with high-end hardware.

Cheers,
-- 
 .''`.
: :' :      We are debian.org. Lower your prices, surrender your code.
`. `'       We will add your hardware and software distinctiveness to
  `-        our own. Resistance is futile.



Reply to: