From owner-freebsd-questions@FreeBSD.ORG Tue Nov 11 04:31:38 2014 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C809D7F for ; Tue, 11 Nov 2014 04:31:38 +0000 (UTC) Received: from mail.lariat.net (mail.lariat.net [66.62.230.51]) by mx1.freebsd.org (Postfix) with ESMTP id 247B3E0F for ; Tue, 11 Nov 2014 04:31:37 +0000 (UTC) Received: from Toshi.lariat.net (IDENT:ppp1000.lariat.net@localhost [127.0.0.1]) by mail.lariat.net (8.9.3/8.9.3) with ESMTP id VAA05559 for ; Mon, 10 Nov 2014 21:31:28 -0700 (MST) Message-Id: <201411110431.VAA05559@mail.lariat.net> X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Mon, 10 Nov 2014 21:30:49 -0700 To: questions@freebsd.org From: Brett Glass Subject: Bandwidth control using Dummynet: 2A + B <= limit Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2014 04:31:38 -0000 Everyone: I have an interesting problem. I've been asked to build a bandwidth limiting ruleset that fairly limits the bandwidth a user consumes on an asymmetrical half duplex link. The limiting should be such that packets going upstream are scored as consuming twice as many resources as those going downstream, so that 2x(upstream bandwidth) + 1x(downstream bandwidth) <= limit. It's easy to make ipfw distinguish between packets flowing in the two directions and feed them into the same bandwidth-limiting pipe, but I can't figure out how to make the upstream packets count twice as much toward the limit as the downstream ones without patching Dummynet. Am I missing something? Is there a way to do this with FreeBSD's IPFW as it exists now? --Brett Glass