From owner-freebsd-net@FreeBSD.ORG Tue Jun 29 15:44:16 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A5AF16A4CE for ; Tue, 29 Jun 2004 15:44:16 +0000 (GMT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 6B69A43D48 for ; Tue, 29 Jun 2004 15:44:15 +0000 (GMT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 29 Jun 2004 16:44:14 +0100 (BST) To: Max Laier In-reply-to: Your message of "Tue, 29 Jun 2004 16:43:32 +0200." <200406291643.39705.max@love2party.net> Date: Tue, 29 Jun 2004 16:44:13 +0100 From: David Malone Message-ID: <200406291644.aa85787@salmon.maths.tcd.ie> cc: freebsd-net@freebsd.org Subject: Re: RANDOM_IP_ID sysctl? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 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, 29 Jun 2004 15:44:16 -0000 > > On Tue, Jun 29, 2004 at 02:13:38PM +0100, David Malone wrote: > > > It seems to me that RANDOM_IP_ID might be better as a sysctl rather > > > than a kernel option. Would anyone mind if I changed this? > I personally think that RANDOM_IP_ID is something that should be tweakable on > a per-interface basis (at least). I usually want randomized IDs on my uplink > interface while it could harm my GigE internal network due to faster ID reuse > cycles. Though, on your GigE internal network, you can probably use jumbograms to avoid fragmentation and avoid having to pay any attention to IP IDs ;-) There was code to only bother setting the IP ID for packets with DF set, but that caused certain odd pieces of network kit that ignored DF to be sick... > FYI, pf(4) can set randomized IDs on a per interface (and even on a per > connection) basis. pf is probably the best place for this sort of more flexable IP ID setting. > David, I'd appreciate to review your patches in order to avoid breakage of pf, > thanks. Certainly. > One would clearly transform the now present "#ifdef" with "if (sysctlvar)" > and hence this will not incur overhead (one compare is nothing to worry > about). Yes - this is exactly what I had in mind. I'm certain that the overhead of the extra "if ()" will be lost in the cost of the IP stack. Currently RANDOM_IP_ID also controls other things, such as flow id generation for IPv6. Making it a sysctl would also give us independent control over these things. David.