> Yes ,that is my means :),my english is poor
No problem.
I have some remarks. Why not let the 4 classes borrow unused bandwidth from
each other? So if there is no other traffic then ftp, ftp can get 10Mbps.
But as soone as there is some other traffic, the ftp traffic goes down.
And if you want 4 isolated classes, why not just creating the 4 classes like
this :
20:1
20:200 20:201 20:210 20:211
You have to create the htb (or cbq) classes. FIltering the traffic and
placing in the classes is easy (you can filter on ports). Except maybe for
the ftp traffic because that uses dynamic ports.
Stef:
Thanks for your answer me quickly!
I have others question :)
I apologize that it will take time.
My topological look like this:
Local:192.168.1.2----------|eth0:192.168.1.1 Linux Box eth1:172.16.1.1|------Internet
I have create a default 200
20:1 (4kbps)
200:200 200:201 200:210 200:211
(1kbps) (1kbps) (1kbps) (1kbps)
I have 10Mbps on the eth1,but I want to test htb,so I do that:
tc class add dev eth0 parent 20: classid 20:1 htb rate 4kbps ceil 4kbps
200:201 mark with 7,then
iptables -t mangle -A FORWARD -p tcp -o eth0 -s 0/0 --dport 80 -d 0/0 -j MARK --set-mark 7
iptables -t mangle -A PREROUTING -p tcp -i eth0 -s 0/0 --dport 80 -d 0/0 -j MARK --set-mark 7
why all traffic from default 200 to Internet.(the iptables rules like no use)
------------------------------------------------
If I use it on eth1 interface iptables rules work!?(though I have default class 200 but all traffice
from 200:201 to Internet.) other question it that:
In this settings use Local machine 192.168.1.2 download some soft from Internet.why it rate overrun 1kbps?
Rules like this:
tc class add dev eth1 parent 20: classid 20:1 htb rate 4kbps ceil 4kbps
iptables -t mangle -A FORWARD -p tcp -o eth1 -s 0/0 --dport 80 -d 0/0 -j MARK --set-mark 7
iptables -t mangle -A PREROUTING -p tcp -i eth1 -s 0/0 --dport 80 -d 0/0 -j MARK --set-mark 7
tc can only shape outgoing traffic(My settings which is my outgoing traffic,eth1 or eth0?) Maybe I mix them
I need path kernel with IMQ?
Do You Yahoo!?
"雅虎通网络KTV, 随时随地免费卡拉OK~~"