LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Strange TC behaviour (http://www.linuxquestions.org/questions/linux-networking-3/strange-tc-behaviour-4175411745/)

hesisaboury 06-16-2012 03:57 AM

Strange TC behaviour
 
hello,
i'm using this config for traffic shaping
CEIL=50kbit
tc qdisc add dev eth0 root handle 1: htb default 15
tc class add dev eth0 parent 1: classid 1:1 htb rate 50kbit ceil 50kbit

tc class add dev eth0 parent 1:1 classid 1:10 htb rate 30kbit ceil 30kbit prio 1
tc class add dev eth0 parent 1:1 classid 1:12 htb rate 10kbit ceil 10kbit prio 2
tc class add dev eth0 parent 1:1 classid 1:15 htb rate 10kbit ceil ${CEIL} prio 4
tc filter add dev eth0 parent 1:0 protocol ip prio 1 handle 1 fw flowid 1:10
tc filter add dev eth0 parent 1:0 protocol ip prio 1 handle 2 fw flowid 1:12
tc filter add dev eth0 parent 1:0 protocol ip prio 6 handle 6 fw flowid 1:15

=====iptables
iptables -t mangle -A POSTROUTING -o eth0 -p tcp --sport 80 -j MARK --set-mark 2
iptables -t mangle -A POSTROUTING -o eth0 -p tcp --dport 80 -j MARK --set-mark 2
iptables -t mangle -A POSTROUTING -o eth0 -p tcp --sport 22 -j MARK --set-mark 1
iptables -t mangle -A POSTROUTING -o eth0 -p tcp --dport 22 -j MARK --set-mark 1

i just wanted to filter download and specify a dedicated bandwidth for ssh, now users can download with higher speed than i specified but by using this command (tc -s class show dev eth0) everything is ok (rate is less than what i set) ..... i want to knowe what is wrong with this code..

thanks..

unSpawn 06-16-2012 05:48 AM

You have marked your newly-created thread as [SOLVED] even if it is not. I suggest that if you do not understand a feature that you do not use it.

You also managed to create three threads (this, this and this one) on the same subject and in two of our forums. It shows you have not read the LQ Rules, it is respectless and it is a waste of your and our time. I strongly suggest you do not do that again and remain patient.

jschiwal 06-17-2012 02:20 AM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.


All times are GMT -5. The time now is 07:10 AM.