You are not logged in.

#1 2011-12-30 13:26:14

zaboleqqq
Member
Registered: 2011-12-21
Posts: 11

TC filter doesnt work?

Hello,

I have 25mbit/1mbit connection at my home. I just tried to shape my connection to 256kbps maximum download speed (for testing purpose) so I wrote something like this:


[root@myhost ~]# tc qdisc del root dev eth0
[root@myhost ~]# tc qdisc add dev eth0 root handle 1:0 htb default 4
[root@myhost ~]# tc class add dev eth0 parent 1:0 classid 1:1 htb rate 512kbps ceil 512kbps
[root@myhost ~]# tc class add dev eth0 parent 1:1 classid 1:4 htb rate 512kbps ceil 512kbps
[root@myhost ~]# tc class add dev eth0 parent 1:1 classid 1:2 htb rate 256kbps ceil 256kbps
[root@myhost ~]# tc filter add dev eth0 protocol ip parent 1:0 u32 match ip dst 10.2.4.1 flowid 1:2


10.2.4.1 is my ip address on eht0. But when Im trying download any file from the internet via web browser(for example I was downloading openoffice), my download speed is almost maxium (like 2MB/s). What its wrong with my TC??

Offline

Board footer

Powered by FluxBB