From owner-freebsd-ipfw@freebsd.org Mon Jun 20 12:50:59 2016 Return-Path: Delivered-To: freebsd-ipfw@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 4C4C7AC451D for ; Mon, 20 Jun 2016 12:50:59 +0000 (UTC) (envelope-from info@rickvanderzwet.nl) Received: from pzwet.vanderzwet.net (pzwet.vanderzwet.net [IPv6:2a01:4f8:190:8221::1:1]) by mx1.freebsd.org (Postfix) with ESMTP id 0EC8E2976 for ; Mon, 20 Jun 2016 12:50:58 +0000 (UTC) (envelope-from info@rickvanderzwet.nl) Received: from rvdzwet-asus.vanderzwet.net (5ED2849E.cm-7-3c.dynamic.ziggo.nl [94.210.132.158]) by pzwet.vanderzwet.net (Postfix) with ESMTPSA id 7FDE611124A3 for ; Mon, 20 Jun 2016 12:50:49 +0000 (UTC) To: freebsd-ipfw@freebsd.org From: Rick van der Zwet Subject: Dummynet combined upload en download bandwidth limit per client Message-ID: <0ed020c5-aa22-4c33-216f-a6dc52720c68@rickvanderzwet.nl> Date: Mon, 20 Jun 2016 14:50:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jun 2016 12:50:59 -0000 Hi Folks, I would like to be able to limit bandwidth (upload + download) per client using dummynet. Yet I fail to create dynamic pipes which matches both upload and download at the same time. re2 is the interface on which the the clients are connected in network 192.168.0.0/24. I am able to limit download (300Mbit/s) with dynamic pipes using: ${fwcmd} pipe 1 config bw 300Kbit/s mask dst-ip 0xffffffff ${fwcmd} add 60000 pipe 1 ip from not me to 192.168.0.0/24 via re2 out I am able to limit upload (300Mbit/s) with dynamic pipes using: ${fwcmd} pipe 1 config bw 300Kbit/s mask src-ip 0xffffffff ${fwcmd} add 60000 pipe 1 ip from 192.168.0.0/24 to not me via re2 in I am able to limit upload+download (total 300Mbit/s) for single (192.168.0.10) IP using: ${fwcmd} pipe 1 config bw 300Kbit/s ${fwcmd} add 60000 pipe 1 ip from not me to 192.168.0.10/32 via re2 out ${fwcmd} add 60000 pipe 1 ip from 192.168.0.10/32 to not me via re2 in Yet duplicating the last one for all client IPs addresses 'feels' wrong and is a bit verbose. Am I able to limit upload+download bandwidth for multiple IPs without pre-creation of 1 pipe per client and the required rules? Best regards, /Rick