hi:
Stef
>> Stef:
>> Thanks for your answer me quickly!
>> I have others question :)
>I have some problems understanding your english. Can you post your htb and
>iptabels script so I can understand what you did?
>> 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 (10Mbps)
>> 20:20 20:21 20:22 20:23 20:24
>>(20Mbps) (20Mbps) (20Mbps) (20Mbps) (20Mbps)
>> 20:22 mark with 3,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 20 to Internet.(the iptables rules like no
>>use)
>So all traffic ends up in 20:20 ??
yes.blew my scripts.
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 20: htb default 20
tc class add dev eth0 parent 20: classid 20:1 htb rate 10240kbps ceil 10240kbps
tc class add dev eth0 parent 20:1 classid 20:20 htb rate 2048kbps ceil 2048kbps
tc qdisc add dev eth0 parent 20:20 sfq
tc class add dev eth0 parent 20:1 classid 20:21 htb rate 2048kbps ceil 2048kbps
tc qdisc add dev eth0 parent 20:21 sfq
tc class add dev eth0 parent 20:1 classid 20:22 htb rate 2048kbps ceil 2048kbps
tc qdisc add dev eth0 parent 20:22 sfq
tc class add dev eth0 parent 20:1 classid 20:23 htb rate 2048kbps ceil 2048kbps
tc qdisc add dev eth0 parent 20:23 sfq
tc class add dev eth0 parent 20:1 classid 20:24 htb rate 2048kbps ceil 2048kbps
tc qdisc add dev eth0 parent 20:24 sfq
tc filter add dev eth0 parent 20: protocol ip handle 1 fw classid 20:20
tc filter add dev eth0 parent 20: protocol ip handle 2 fw classid 20:21
tc filter add dev eth0 parent 20: protocol ip handle 3 fw classid 20:22
tc filter add dev eth0 parent 20: protocol ip handle 4 fw classid 20:23
tc filter add dev eth0 parent 20: protocol ip handle 5 fw classid 20:24
iptables -t mangle -A FORWARD -p tcp -o eth0 -s 0/0 --dport 80 -d 0/0 -j MARK --set-mark 3
iptables -t mangle -A PREROUTING -p tcp -i eth0 -s 0/0 --dport 80 -d 0/0 -j MARK --set-mark 3
>You can check with iptables -L -v -n if your iptables rules are matched. If
>the iptables rule match, the byte and packet counters will increase.
when I use iptable -L -v -n -t mangle,I have below infor
PREROUTING chain:
pkts bytes target prot opt in out source destination
305 40889 MARK tcp -- eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 MARK set 0x3
FORWARD chain:
pkts bytes target prot opt in out source destination
0 0 MARK tcp -- * eth0 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 MARK set 0x3
why not stream through ForWard chain ? beacause this all traffic into 20:20(default class)?
Do You Yahoo!?
"雅虎通网络KTV, 随时随地免费卡拉OK~~"