bom dia,

estou com problemas na implantação do cbq,

estou usando o cl10,

na pasta /etc/sysconfig/cbq/

fiz uma regra cbq-0002.porta21-out e cbq-0003.porta21-in (e varias outras portas, mas essas eh a mais importante..)

o conteudo delas..

##### cbq-0002.porta21-out

DEVICE=eth0,100Mbit,10Mbit ## eth0 faz ligação com o modem
RATE=10K
WEIGHT=1Kbit
PRIO=8
RULE=172.17.0.0/16:21,
BOUNDED=yes
ISOLATED=yes

##### cbq-0007.porta21-in

DEVICE=eth1,100Mbit,10Mbit ## eth1 faz a ligação com a rede interna 172.17.0.0/16
RATE=10K
WEIGHT=1Kbit
PRIO=8
RULE=172.17.0.0/16:21
BOUNDED=yes
ISOLATED=yes

deixei o limite baixo soh pra testar.. mas o ftp continua a mais de 100 kbps por sergundo..

abaixo o comando service cbq compile,

se alguém puder ajudar..

valeu,

cleiton

service cbq compile

tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1 cbq bandwidth 100Mbit avpkt 1000 cell 8
tc class change dev eth0 root cbq weight 10Mbit allot 1514

tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1 cbq bandwidth 100Mbit avpkt 1000 cell 8
tc class change dev eth1 root cbq weight 10Mbit allot 1514

tc class add dev eth0 parent 1: classid 1:2 cbq bandwidth 100Mbit rate 100Kbit weight 10Kbit prio 3 allot 1514 cell 8 maxburst 20 avpkt 1000 isolated
tc qdisc add dev eth0 parent 1:2 handle 2 tbf rate 100Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src 172.17.0.0/16 match ip sport 80 0xffff classid 1:2

tc class add dev eth1 parent 1: classid 1:3 cbq bandwidth 100Mbit rate 100Kbit weight 10Kbit prio 3 allot 1514 cell 8 maxburst 20 avpkt 1000 isolated
tc qdisc add dev eth1 parent 1:3 handle 3 tbf rate 100Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst 172.17.0.0/16 match ip dport 80 0xffff classid 1:3

tc class add dev eth0 parent 1: classid 1:4 cbq bandwidth 100Mbit rate 10K weight 1Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000 bounded isolated
tc qdisc add dev eth0 parent 1:4 handle 4 tbf rate 10K buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src 172.17.0.0/16 match ip sport 20 0xffff classid 1:4

tc class add dev eth1 parent 1: classid 1:5 cbq bandwidth 100Mbit rate 10K weight 1Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000 bounded isolated
tc qdisc add dev eth1 parent 1:5 handle 5 tbf rate 10K buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst 172.17.0.0/16 match ip dport 20 0xffff classid 1:5

tc class add dev eth0 parent 1: classid 1:6 cbq bandwidth 100Mbit rate 10K weight 1Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000 bounded isolated
tc qdisc add dev eth0 parent 1:6 handle 6 tbf rate 10K buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src 172.17.0.0/16 match ip sport 21 0xffff classid 1:6

tc class add dev eth1 parent 1: classid 1:7 cbq bandwidth 100Mbit rate 10K weight 1Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000 bounded isolated
tc qdisc add dev eth1 parent 1:7 handle 7 tbf rate 10K buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst 172.17.0.0/16 match ip dport 21 0xffff classid 1:7

tc class add dev eth0 parent 1: classid 1:8 cbq bandwidth 100Mbit rate 10Kbit weight 1Kbit prio 2 allot 1514 cell 8 maxburst 20 avpkt 1000 isolated
tc qdisc add dev eth0 parent 1:8 handle 8 tbf rate 10Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src 172.17.0.0/16 match ip sport 22 0xffff classid 1:8

tc class add dev eth1 parent 1: classid 1:9 cbq bandwidth 100Mbit rate 1Kbit weight 1Kbit prio 2 allot 1514 cell 8 maxburst 20 avpkt 1000 isolated
tc qdisc add dev eth1 parent 1:9 handle 9 tbf rate 1Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst 172.17.0.0/16 match ip dport 80 0xffff classid 1:9

tc class add dev eth0 parent 1: classid 1:10 cbq bandwidth 100Mbit rate 20Kbit weight 2Kbit prio 1 allot 1514 cell 8 maxburst 20 avpkt 1000 isolated
tc qdisc add dev eth0 parent 1:10 handle 10 tbf rate 20Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src 172.17.0.0/16 match ip sport 53 0xffff classid 1:10

tc class add dev eth1 parent 1: classid 1:11 cbq bandwidth 100Mbit rate 20Kbit weight 2Kbit prio 3 allot 1514 cell 8 maxburst 20 avpkt 1000 isolated
tc qdisc add dev eth1 parent 1:11 handle 11 tbf rate 20Kbit buffer 10Kb/8 limit 15Kb mtu 1500
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst 172.17.0.0/16 match ip dport 53 0xffff classid 1:11