How to shape IP to a slower speed after the IP has used 20G?



  • Hi There,

    Just wondering if it is possible to setup a policy that will allow a user full speed till they reach 20G and after that shaped down to a 64kbps connection speed till the end of the month and resets back the next month? would be good if it was based of IP address but happy to look into PPPoE or radius or captive portal user accounts.

    Cheers,

    Josh



  • Are you trying to reduce congestion or reduce data usage?



  • Just basically just slow there connection down until they reach there next billing cycle



  • Linux iptables (using standard modules) has this ability but not BSD, unless you script something yourself. A script, using python, perl, or even simple shell scripting, should be easy, but I would probably choose iptables.



  • @j-servers:

    Just basically just slow there connection down until they reach there next billing cycle

    Of course you're trying to slow them down, I was asking why. There are two popular reasons, but congestion is a bad reason because it doesn't make a large difference on average and there are better ways to fight congestion. Data usage, there's not much else you can do but to slow them down.



  • The manual (could be automated) scheme I use (with the limiter) is to review use in bandwidthd and put the winners into a lower-priority queue - this is by writing IP addresses to an alias, and the LAN rules run the alias through the appropriate queue.

    For your scheme you could put them into a limiter queue that was speed-limited per pipe (rather than my scheme of a queue that has a lower priority, but no actual numerical limit, if nobody else is using BW.)

    I think the portal has a built in setup to simply cut them off after X amount (I have not used the portal myself)