Hi everybody,
I'm trying to write a script that does the following:
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
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.
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