From owner-freebsd-net@FreeBSD.ORG Sun Nov 23 17:25:11 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8EA1106564A for ; Sun, 23 Nov 2008 17:25:11 +0000 (UTC) (envelope-from eitans@mellanox.co.il) Received: from mellanox.co.il (mail.mellanox.co.il [194.90.237.43]) by mx1.freebsd.org (Postfix) with ESMTP id 8C6608FC0A for ; Sun, 23 Nov 2008 17:25:09 +0000 (UTC) (envelope-from eitans@mellanox.co.il) Received: from Internal Mail-Server by MTLPINE1 (envelope-from eitans@mellanox.co.il) with SMTP; 23 Nov 2008 19:25:06 +0200 Content-class: urn:content-classes:message MIME-Version: 1.0 X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Sun, 23 Nov 2008 19:24:48 +0200 Message-ID: <5D49E7A8952DC44FB38C38FA0D758EAD0105450B@mtlexch01.mtl.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: IP fragmentation Thread-Index: AclNkGLMWsxOl8nETR6EdmKPzb9N6A== From: "Eitan Shefi" To: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Eitan Shefi Subject: IP fragmentation X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2008 17:25:12 -0000 Hi, =20 The IP fragmentation is not like in Linux, and is not clear to me. =20 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 =3D 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 =20 I expected the first packet size to be: 4996 =3D 5000 - ((5000-20) Mod = 8) and the second packet size to be: 25 =3D 5021 - 4996 =20 What is the formula being used in FreeBSD to compute the IP fragments size? =20 =20 Thanks, Eitan =20