From owner-freebsd-net@FreeBSD.ORG Fri Nov 12 13:39:26 2010 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 AB01B106566B for ; Fri, 12 Nov 2010 13:39:26 +0000 (UTC) (envelope-from pieter@os3.nl) Received: from mail.thelostparadise.com (router.thelostparadise.com [IPv6:2a02:898:0:30::30:1]) by mx1.freebsd.org (Postfix) with ESMTP id 3D1748FC0C for ; Fri, 12 Nov 2010 13:39:26 +0000 (UTC) Received: by mail.thelostparadise.com (Postfix, from userid 127) id B090F7303C; Fri, 12 Nov 2010 14:39:24 +0100 (CET) Received: from localhost by mail.thelostparadise.com (Postfix) with ESMTP id 024D673038; Fri, 12 Nov 2010 14:39:21 +0100 (CET) Message-ID: <4CDD4389.5060405@os3.nl> Date: Fri, 12 Nov 2010 14:39:21 +0100 From: Pieter de Boer MIME-Version: 1.0 To: Christopher Penney References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, T_FRT_CONTACT autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on aberdeen.thelostparadise.com Cc: freebsd-net@freebsd.org Subject: Re: FreeBSD TCP Behavior with Linux NAT 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: Fri, 12 Nov 2010 13:39:26 -0000 Hi Christopher, > Before the reboot two Linux clients were mounting the FreeBSD server. They > were both using port 903 locally. On the head node clientA:903 was remapped > to headnode:903 and clientB:903 was remapped to headnode:601. There is no > activity when the reboot occurs. The head node takes a few minutes to come > back up (we kept it down for several minutes). > > When it comes back up clientA and clientB try to reconnect to the FreeBSD > NFS server. They both use the same source port, but since the head node's > conntrack table is cleared it's a race to see who gets what port and this > time clientA:903 appears as headnode:601 and clientB:903 appears as > headnode:903 (>>> they essentially switch places as far as the FreeBSD > server would see<<< ). So what you are saying is that the Linux NAT box reuses the same source_ip:source_port / destination_ip:destination_port tuple for a new connection to the FreeBSD NFS server after the Linux box has rebooted. This quickly enough that the connection on the FreeBSD NFS server has not timed out yet? Isn't there a rule in TCP you shouldn't be reusing port numbers within the MSL (or 2*MSL?) period? -- Pieter