IP fragmentation

Eitan Shefi eitans at mellanox.co.il
Sun Nov 23 09:25:12 PST 2008


Hi,
 
The IP fragmentation is not like in Linux, and is not clear to me.
 
I'm using 2 FreeBSD-6.3 hosts, connected directly.
If I change the MTU of both hosts to 5000, and send "ping" with message
size 4972 bytes ( 4972 = 5000 - 8(which is ICMP Header size) - 20 (which
is IP Header size) )
from one host to the other, the message is passed as one packet: packet
size 5000 bytes. (as expected)
But if I send "ping" with message size 4973 bytes,  the IP fragmentation
to 2 packets is not clear to me:
The first packet is with size: 4116 bytes
The second packet is with size: 905 bytes
 
I expected the first packet size to be: 4996 = 5000 - ((5000-20) Mod 8)
and the second packet size to be: 25 = 5021 - 4996
 
What is the formula being used in FreeBSD to compute the IP fragments
size?
 
 
Thanks,
Eitan
 


More information about the freebsd-net mailing list