Ssh flow does not go into correct class. Help!

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm a new comer. I have problems using tc+htb. I run the following commands, and expect outgoing ssh flow goes into 1:11. But actually it goes into default 12. What's wrong?
 
tc qdisc add dev eth0 root handle 1: htb default 12
 tc class add dev eth0 parent 1: classid 1:1 htb rate 1000kbit ceil 2000kbit prio 1
tc class add dev eth0 parent 1:1 classid 1:11 htb rate 100kbit ceil 100kbit prio 1
tc class add dev eth0 parent 1:1 classid 1:12 htb rate 800kbit ceil 1600kbit prio 1
tc class add dev eth0 parent 1:1 classid 1:13 htb rate 100kbit ceil 100kbit prio 1
tc qdisc add dev eth0 parent 1:11 handle 111: sfq perturb 5
tc qdisc add dev eth0 parent 1:12 handle 112: sfq perturb 5
tc qdisc add dev eth0 parent 1:13 handle 113: sfq perturb 5
 
iptables -t mangle -A PREROUTING -p tcp -m tcp --sport 22 -j MARK --set-mark 20
iptables -t mangle -A PREROUTING -p tcp -m tcp --sport 22 -j RETURN
 
tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 20 fw flowid 1:11
Thanks a lot!
CcM



Do You Yahoo!?
注册世界一流品质的雅虎免费电邮

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux