Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jun 2016 14:50:49 +0200
From:      Rick van der Zwet <info@rickvanderzwet.nl>
To:        freebsd-ipfw@freebsd.org
Subject:   Dummynet combined upload en download bandwidth limit per client
Message-ID:  <0ed020c5-aa22-4c33-216f-a6dc52720c68@rickvanderzwet.nl>

Next in thread | Raw E-Mail | Index | Archive | Help
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



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?0ed020c5-aa22-4c33-216f-a6dc52720c68>