Wednesday, 28 August 2013

Tc commands not Working on Fedora 3 (kernel 2.6.9)

Tc commands not Working on Fedora 3 (kernel 2.6.9)

I use below commands to limit secureCRT, which app used port 22, to a rate
of 100kb/s. But on our server of Fedora 3 with kernel version 2.6.9, it
just doesn't work. The secureCRT still can get a file from this machine at
the speed of 10mb/s. Somebody helps?
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1: cbq avpkt 1000 bandwidth 10mbit
tc class add dev eth0 parent 1: classid 1:1 cbq rate 800kbit allot \
1500 prio 5 bounded isolated
tc class add dev eth0 parent 1:1 classid 1:10 cbq rate 800kbit \
allot 1600 prio 1 avpkt 1000
tc class add dev eth0 parent 1:1 classid 1:20 cbq rate 800kbit \
allot 1600 prio 2 avpkt 1000
tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 match \
ip sport 22 0xffff flowid 1:20
The QOS feature is opened in the /boot/config_xx file.

No comments:

Post a Comment