What's new

[AC87U]: Limit Bandwidth On 5GHz Band Using Script

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

dzg7pl

New Around Here
Hi everybody,

I'm trying to write a script that does the following:
  • Read a list of user/device name/mac addresses/limit
  • Check if the device is active (i.e. bandwidth is over a given threshold) - e.g. every minute
  • Count the times the device is over this threshold
  • If the device breaches the LIMIT read in for that MAC, then limit the up/down bandwidth for that device.
I have got all this working for eth1 (2.4GHz) using the tc command. However, I am unable to use tc for wifi0 - tc reports it cannot find the device.

The code I am using to limit the bandwidth is as follows:

tc qdisc add dev $IF root handle 1: htb default 30
tc class add dev $IF parent 1: classid 1:1 htb rate $DNLD
tc class add dev $IF parent 1: classid 1:2 htb rate $UPLD
U32="tc filter add dev $IF protocol ip parent 1:0 prio 1 u32"
$U32 match ip dst $IP/32 flowid 1:1
$U32 match ip src $IP/32 flowid 1:2


Can anyone help?

Cheers

Tim
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top