Migrating from Gargoyle - Bandwidth Management

Awesome! Let us know how the rest of it works for you.

I just have the one subnet. But I think I saw once that if more than one, they all goes on the one option line but the separator is odd. I see you tried comma. Maybe space or semicolon?

For more then one subnet, the filter may also have to change. Again, I have not tried it. Once you get it working, please post your config here. Thanks!

I'm working on an edit to the README that avoids the (dopey) mistake I made. I'll create a Pull Request when it's ready and you can review it. THANKS!

Thanks. I did try space colon dash splat (all failed).

I’ll pick my way through the different options and permutations. I understand the filter origin and syntax - good heads-up on that.

May be possible via procd init by setting separate instances for each separate subnets.

I’ll advise.

On my test device, I just tried a space as delimiter. It appears to have taken it. The service started and it generated files in /www/bandwidthd. It also gives me a subnet selection in index.html. However, I don't have anything generating traffic on a second subnet. So I can't do much more testing.

uci set bandwidthd.@bandwidthd[0].subnets=''
uci commit bandwidthd
/etc/init.d/bandwidthd restart

If anyone is interested, I just added a sample hourly script that generates a report and limits bandwidth if over quota. You would have to modify it a great deal for your network and needs. But it is a place to start.

Once you have the bandwidthd subnets and filter settings figured out, you'll need to look at bandwidth_shape.sh. It assumes just one subnet. You'll have to create a new version. All commands that reference $BWSUBNET will likely have to become a for loop and perform same for each subnet. Best of luck!

I may have a simple solution for you. Since all your subnets are part of one larger subnet, just use That way no modification to bandwidth_shape.sh should needed.

1 Like

I assume this doesn’t support groups of devices like Gargoyle?
Looking through the code it didn’t look too hard to achieve given the sql queries.

I also used groups in Gargoyle. The --include and --exclude should allow you to do something like Gargoyle groups. I tried to demonstrate that in sample_report_hourly.sh. I recently added that to the Github. See what you think.

Why do you need QoS on such a fast connection? If you have a cable connection with a highly asymmetrical upload you can enable SmartQueue on the Edgerouter on just the upload to manage bufferbloat.

Thank you for the question. I should make it clear that this post is really about limiting access to the Internet. It's not about bufferbloat or fairness. I have Mediacom. They have a data cap per month that is expensive to exceed. The primary devices consuming my Internet bandwidth are smart TVs and streaming via Chromecasts. Most of these services don't have a built in method to limit data usage. So, I want to automate the process of tracking the device's data usage and slowing down their data consumption when it gets out of hand.


Not quite a month tracking this process and subnets appear to be working - space delimited in the config.

This is the filter I came up with that appears to accurately capture all subnets, 10,10.3.0/24, and

option filter 'ip and ether host 60:xx:xx:xx:xx:AF and not host or ether host 00:25:xx:xx:xx:99 and not host and not host or ether host 02:25:xx:xx:xx:99 and not host and not host

I've also taken the liberty to co-opt your bandwidth_used.sh script for a somewhat different use. I wanted to see total bandwidth over a span that showed each ip as a percentage of the span total.

1 Like