Hi all,
I am a newbie and I have not played a lot with tc
utility. I have red maybe everything that has to do with massive
filtering (maybe not everything). If you can help me on this I
would appriciate that very much. I use tc utility with
iproute2-ss040831.
I want to limit bandwidth for the
192.168.0.0/16 subnet using this script.
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1: htb tc class add dev eth0 parent 1: classid 1:2 htb rate 100Mbit ceil 100MBit tc filter add dev eth0 parent 1:2 handle 2: protocol ip u32 divisor 256 tc filter add dev eth0 protocol ip parent 1: u32 match ip dst 192.168.0.0/16 hashkey mask 0x000000ff at 12 link 2: tc class add dev eth0 parent 1:2 classid 1:3 htb rate 128Kbit ceil 128Kbit j=0;
while [ $j -le 254 ]
do
i=0; while [
$i -le 254 ]
do hexi=`echo "obase=16; $i" | bc` tc filter add dev eth0 protocol ip parent 1:2 u32 ht 2:$hexi: match ip dst 192.168.$j.$i flowid 1:3 i=$((i+1)) done j=$((j+1))
done somewhere at 192.168.8.7/32 it appears on the
screen this message
RTNETLINK answers: File exists
We have an error talking to the kernel Can you tell me please what am I doing
wrong.
Thank you in advance
Valton |