From owner-freebsd-questions@freebsd.org Tue Oct 4 11:02:47 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74AD9AF4D89 for ; Tue, 4 Oct 2016 11:02:47 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:200:ff:fe00:b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.fagskolen.gjovik.no", Issuer "Fagskolen i Gj??vik" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0463C35D; Tue, 4 Oct 2016 11:02:46 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from mail.fig.ol.no (localhost [127.0.0.1]) by mail.fig.ol.no (8.15.2/8.15.2) with ESMTPS id u94B2ctI038964 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 4 Oct 2016 13:02:38 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by mail.fig.ol.no (8.15.2/8.15.2/Submit) with ESMTP id u94B2ciD038961; Tue, 4 Oct 2016 13:02:38 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs Date: Tue, 4 Oct 2016 13:02:38 +0200 (CEST) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= Sender: Trond.Endrestol@fagskolen.gjovik.no To: Kristof Provost cc: FreeBSD questions Subject: Re: Best practice for virtualized pf based NAT router? In-Reply-To: <2962E958-6570-4991-AC20-2A5FF39CC39C@FreeBSD.org> Message-ID: References: <2962E958-6570-4991-AC20-2A5FF39CC39C@FreeBSD.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) Organization: Fagskolen Innlandet OpenPGP: url=http://fig.ol.no/~trond/trond.key MIME-Version: 1.0 X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail.fig.ol.no Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 11:02:47 -0000 On Tue, 4 Oct 2016 12:19+0200, Kristof Provost wrote: > On 4 Oct 2016, at 11:39, Trond Endrestøl wrote: > > I'm in the process of configuring a virtualized pf based NAT router. > > The NAT router is supposed be a supplement to our pool of public IPv4 > > addresses. > > > > FreeBSD is stable/11, r306639. XenServer 7.0.0, with all known > > updates, is the virtualization environment. > > > > I'm using xn0 as the external interface, and xn1 as the internal > > interface. > > > > The xn0 interface has a /30 IPv4 address and a /64 IPv6 address. > > The xn1 interface has a /20 IPv4 address (and a /64 IPv6 address for > > symmetry). > > > > I followed ch. 29.3.3.1 of the Handbook. > > > > In theory all is well, but with iftop(8) (net-mgmt/iftop) I only see a > > throughput of merely 1 Mbit/s, yes, that's one megabit per second. > > > There have been issues with pf and checksums in Xen before. I believe that the > version you’re running has all of the relevant fixes, but it’s worth trying to > disable TSO and other features on the network interfaces anyway. > > ifconfig xn0 -rxcsum -txcsum -rxcsum6 -txcsum6 -tso6 -tso4 -lro (and the same > for xn1). That made all the difference. Thank you. > If that makes a difference I’d be very interested in both network captures and > further debugging. I'm pretty sure you ment if your proposed changes _doesn't_ make any difference, but if you want network captures, etc, I'm sure I can arrange it. Thank you again. -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+ From owner-freebsd-questions@freebsd.org Tue Oct 4 11:17:41 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 258D8AF50C1 for ; Tue, 4 Oct 2016 11:17:41 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE2F8D67 for ; Tue, 4 Oct 2016 11:17:40 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [172.16.5.2] (vega.codepro.be [IPv6:2a01:4f8:162:1127::3]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id F26FE159BD; Tue, 4 Oct 2016 13:17:37 +0200 (CEST) From: "Kristof Provost" To: "Trond =?utf-8?q?Endrest=C3=B8l?=" Cc: "FreeBSD questions" Subject: Re: Best practice for virtualized pf based NAT router? Date: Tue, 04 Oct 2016 13:17:36 +0200 Message-ID: <43E11CD6-3B19-4807-A528-546D66C58962@FreeBSD.org> In-Reply-To: References: <2962E958-6570-4991-AC20-2A5FF39CC39C@FreeBSD.org> MIME-Version: 1.0 X-Mailer: MailMate (2.0BETAr6056) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 11:17:41 -0000 On 4 Oct 2016, at 13:02, Trond Endrestøl wrote: > On Tue, 4 Oct 2016 12:19+0200, Kristof Provost wrote: >> ifconfig xn0 -rxcsum -txcsum -rxcsum6 -txcsum6 -tso6 -tso4 -lro (and >> the same >> for xn1). > > That made all the difference. Thank you. > Bah. I was hoping I’d put that bug to rest. >> If that makes a difference I’d be very interested in both network >> captures and >> further debugging. > > I'm pretty sure you ment if your proposed changes _doesn't_ make any > difference, but if you want network captures, etc, I'm sure I can > arrange it. > No, I meant if this helped. It means that a bug I thought was fully fixed is still there. The fix was done in r289316: pf: Fix TSO issues In certain configurations (mostly but not exclusively as a VM on Xen) pf produced packets with an invalid TCP checksum. The problem was that pf could only handle packets with a full checksum. The FreeBSD IP stack produces TCP packets with a pseudo-header checksum (only addresses, length and protocol). Certain network interfaces expect to see the pseudo-header checksum, so they end up producing packets with invalid checksums. To fix this stop calculating the full checksum and teach pf to only update TCP checksums if TSO is disabled or the change affects the pseudo-header checksum. PR: 154428, 193579, 198868 Relnotes: yes Sponsored by: RootBSD It’s great that you’ve got a workaround, but the problem should be completely gone, and it’s clearly not. If you’re willing to spend a bit more time on this I’d like to dig into it a bit, and try to find out what I missed. Let’s start by looking at the network capture (with the offloads turned back on, so we can reproduce the problem). I expect we’ll see incorrect TCP checksums, which is the cause of your bad performance. It’s slightly surprising that it only happens in the forwarding path, but at least that’s something to go on. Regards, Kristof From owner-freebsd-questions@freebsd.org Tue Oct 4 13:23:08 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7867BAC6FBC for ; Tue, 4 Oct 2016 13:23:08 +0000 (UTC) (envelope-from b6163e77.ld1.m9R.1n.o7cqKX+freebsd-questions=freebsd.org@bnc.mailjet.com) Received: from o64.p4.mailjet.com (o64.p4.mailjet.com [178.33.221.64]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13B2B269 for ; Tue, 4 Oct 2016 13:23:07 +0000 (UTC) (envelope-from b6163e77.ld1.m9R.1n.o7cqKX+freebsd-questions=freebsd.org@bnc.mailjet.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; q=dns/txt; d=bnc.mailjet.com; i=sales=3Dlondonvintageguitars.com@bnc.mailjet.com; s=mailjet; h=message-id:mime-version:content-type:from:reply-to:to:subject:date:precedence:list-id:list-unsubscribe:x-csa-complaints; bh=YjIUzk921TsBf8B2PjSPqDsIi7Y=; b=FYwQhTaKc8g95sYXncyAA5uIqZcJzoxcPtLTBW/68790IHv3eWeep1nID142BcuAnsO25r0P6vAg/xxZgpkvHYTn/aB+eaB3vaksUAKP5gjuTF/JtG3FOPglrVbj3XuN1KjC3Z0dSn7KwJ2952EFzUYjBNi+rGwUKHX1qkEYwBc= Message-Id: Mime-Version: 1.0 From: =?utf-8?Q?sales@londonvintageguitars.com?= Reply-To: To: freebsd-questions@freebsd.org Subject: =?utf-8?Q?VINTAGE_STUDIO_GEAR_WANTED_-_BEST_PRICES_PAID?= Date: Tue, 4 Oct 2016 14:12:50 +0100 Precedence: bulk X-CSA-Complaints: whitelist-complaints@eco.de Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 13:23:08 -0000 View online version WANTEDFAIRCHILD 660 COMPRESSOR BEST MARKET PRICES PAID FOR THE RIGHT MODEL! GET IN TOUCH CASH WAITING!!!   This email has been sent to freebsd-questions@freebsd.org , click here to unsubscribe .