0

I am having trouble traffic shaping specific IP addresses using the HTB algorithm. I saw tutorials online about applying qdisc rules to specific devices and they all uses a command similar to what I have below.

tc filter add dev eth0 parent 1: protocol ip prio 2 u32 match ip src 192.168.8.229/32 match ip sport 80 0xffff flowid 1:11

Where they assign a class they create to the IP address of the device they are trying to adjust. The outcome of what I am getting though is that instead of applying the class I assign to the IP Address, it assigns the class below to everything.

tc class add dev eth0 parent 1:1 classid 1:10 htb rate 5mbit

My goal with this script is to be able to apply class 1:11 to the IP address 192.168.8.229. I included the full list of commands used in the script below. Any help would be greatly appreciated.

tc qdisc add dev eth0 root handle 1: htb default 30

tc class add dev eth0 parent 1: classid 1:1 htb rate 25mbit

tc class add dev eth0 parent 1:1 classid 1:10 htb rate 5mbit

tc class add dev eth0 parent 1:1 classid 1:11 htb rate 20mbit

tc filter add dev eth0 parent 1: protocol ip prio 2 u32 match ip src 192.168.8.229/32 match ip sport 80 0xffff flowid 1:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.