From owner-freebsd-net@FreeBSD.ORG Tue Aug 28 20:52:49 2007 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 D12CC16A41B for ; Tue, 28 Aug 2007 20:52:49 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by mx1.freebsd.org (Postfix) with ESMTP id A3F4813C468 for ; Tue, 28 Aug 2007 20:52:49 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 111ED274ED; Tue, 28 Aug 2007 16:52:49 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 28 Aug 2007 16:52:49 -0400 X-Sasl-enc: J006BneSLIxbnAMf9+4Qs85y7GIVWX54oHE8FeckAkmm 1188334368 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTP id D09613B5C; Tue, 28 Aug 2007 16:52:47 -0400 (EDT) Message-ID: <46D48B1E.80405@FreeBSD.org> Date: Tue, 28 Aug 2007 21:52:46 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 2.0.0.4 (X11/20070630) MIME-Version: 1.0 To: Weiguang Shi References: <497562.45228.qm@web43137.mail.sp1.yahoo.com> In-Reply-To: <497562.45228.qm@web43137.mail.sp1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: nc captures 1024 bytes 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: Tue, 28 Aug 2007 20:52:49 -0000 Weiguang Shi wrote: > nc might be waiting on all the interfaces; enumerating MTUs and choosing the largest > sounds complicated, especially when some interfaces can be configured to receive > jumbo frames. Why not just use something like 64KB as the other user > suggested or something even larger? > That is the easy fix, yes. :^) If the socket's pcb laddr is bound to an IP, and IP to which it is bound stays on the same physical interface, then the MTU may easily be obtained. If it's INADDR_ANY, or you expect the IP to be dynamically reconfigured on another interface, then auto-tuning is not possible. regards, BMS