Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jun 2000 11:00:55 +0200
From:      Neil Blakey-Milner <nbm@mithrandr.moria.org>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        Hans Huebner <hans@Huebner.ORG>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: IP prepaid accounting
Message-ID:  <20000608110055.A38991@mithrandr.moria.org>
In-Reply-To: <31777.960398287@critter.freebsd.dk>; from phk@critter.freebsd.dk on Wed, Jun 07, 2000 at 07:18:07PM %2B0200
References:  <Pine.BSF.4.20.0006071902420.16831-100000@huebner.org> <31777.960398287@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed 2000-06-07 (19:18), Poul-Henning Kamp wrote:
> It should be possible to say say
> 
>            ipfw deny all ip from any to any exquota any
> 
> as well as:
> 
>            ipfw deny all ip from any to any exquota guest

How about:

ipfw quota 1 config quota 10MB  (and similar conversions as pipe for MB,
Mb, kB, kb, &c.)
ipfw quota 2 config quota 20MB  (and similar conversions as pipe for MB,
Mb, kB, kb, &c.)

ipfw add quota 1 ip from any to any (add to quota 1's count)
ipfw add quota 2 ip from any to any (add to quota 2's count)

ipfw add allow ip from any to any uquota 1 (allow unhindered ip when
under quota)

ipfw add deny ip from any to any oquota 2 (deny ip when over high quota)
ipfw add pipe 1 ip from any to any oquota 1 (dummynet ip when over low quota)

Possibly also rules like:

ipfw add pipe 1 ip from any to any oquota 1 uquota 2 (dummynet middle quota)
ipfw add pipe 2 ip from any to any oquota 2 uquota 3 (get even slower)
ipfw add deny ip from any to any oquota 3 (total stop)

(allowing for slower and slower service instead of just two levels)

Neil
-- 
Neil Blakey-Milner
Sunesi Clinical Systems
nbm@mithrandr.moria.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000608110055.A38991>