[GTER] CBQ Limitando somente a 2Kbps
Lucas Willian Bocchi
lucas.bocchi at gmail.com
Thu Oct 23 09:13:07 -02 2014
CBQ? Esse negócio já caiu em desuso faz tempo.
Por quê não migra pro HTB?
2014-10-22 21:09 GMT-02:00 Rafael Sapata <rafael at grupouds.com.br>:
> Prezados,
>
> Possuo um ambiente 64 bits com Centos rodando Quagga com BGP , utilizo o CBQ com a regra abaixo para limitar o download em um IP específico:
>
> DEVICE=enp4s0,1000Mbit,100Mbit
>
>
> RATE=2Mbit
> WEIGHT=200Kbit
> PRIO=5
> RULE=13x.16x.7x.1x
> BOUNDED=yes
> ISOLATED=yes
>
> Abaixo a regra após um compile do cbq
>
>
>
> /sbin/tc qdisc del dev enp4s0 root
> /sbin/tc qdisc add dev enp4s0 root handle 1 cbq bandwidth 1000Mbit avpkt 1000 cell 8
> /sbin/tc class change dev enp4s0 root cbq weight 100Mbit allot 1514
>
> /sbin/tc class add dev enp4s0 parent 1: classid 1:1001 cbq bandwidth 1000Mbit rate 2Mbit weight 200Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000 bounded isolated
> /sbin/tc qdisc add dev enp4s0 parent 1:1001 handle 1001 tbf rate 2Mbit buffer 10Kb/8 limit 15Kb mtu 1500
> /sbin/tc filter add dev enp4s0 parent 1:0 protocol ip prio 100 u32 match ip dst 131.161.72.10 classid 1:1001
>
>
>
> Já realizei a substituição da placa de rede mas independente da configuração sempre que limito o download a velocidade fica fixa a 2kbps, o que não acontece quando faço a mesma regra para outra interface onde limito o upload (funciona normalmente)
>
> Abaixo o stats do cbq
>
>
> ### enp2s0: queueing disciplines
>
> qdisc pfifo_fast 0: root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
> Sent 49277506970 bytes 67589512 pkt (dropped 0, overlimits 0 requeues 92)
> backlog 0b 0p requeues 92
>
> ### enp4s0: queueing disciplines
>
> qdisc cbq 1: root refcnt 2 rate 1000Mbit (bounded,isolated) prio no-transmit
> Sent 512906 bytes 3458 pkt (dropped 0, overlimits 0 requeues 0)
> backlog 0b 0p requeues 0
> borrowed 0 overactions 0 avgidle 125 undertime 0
> qdisc tbf 1001: parent 1:1001 rate 2000Kbit burst 10Kb lat 20.5ms
> Sent 368 bytes 5 pkt (dropped 0, overlimits 0 requeues 0)
> backlog 0b 0p requeues 0
>
> ### enp4s0: traffic classes
>
> class cbq 1:1001 parent 1: leaf 1001: rate 2000Kbit (bounded,isolated) prio 5
> Sent 368 bytes 5 pkt (dropped 0, overlimits 0 requeues 0)
> backlog 0b 0p requeues 0
> borrowed 0 overactions 0 avgidle 1.77039e+06 undertime 0
> class cbq 1: root rate 1000Mbit (bounded,isolated) prio no-transmit
> Sent 512720 bytes 3444 pkt (dropped 0, overlimits 0 requeues 0)
> backlog 0b 0p requeues 0
> borrowed 0 overactions 0 avgidle 125 undertime 0
> class tbf 1001:1 parent 1001:
>
>
> ### enp4s0: filtering rules
>
> filter parent 1: protocol ip pref 100 u32
> filter parent 1: protocol ip pref 100 u32 fh 800: ht divisor 1
> filter parent 1: protocol ip pref 100 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1001 (rule hit 3331 success 5)
> match 83a1480a/ffffffff at 16 (success 5 )
>
> ### enp5s0: queueing disciplines
>
> qdisc pfifo_fast 0: root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
> Sent 15383886 bytes 174087 pkt (dropped 0, overlimits 0 requeues 1)
> backlog 0b 0p requeues 1
>
>
>
>
> Alguma ideia ? Grato.
>
>
> Atenciosamente,
>
>
>
> --
> gter list https://eng.registro.br/mailman/listinfo/gter
More information about the gter
mailing list