[Fedora-users-br] Controlar banda

Pedro Neto pedrohaneto em yahoo.com.br
Seg Mar 13 23:52:51 UTC 2006


Ola a tds,
   
  Eu montei este script para controlar banda:
  #! /bin/sh
tc class add dev eth2 root classid 1:0 htb rate 128 kbps default 30
tc class add dev eth2 parent 1:0 classid 1:10 htb rate 96kbps ceil 128kbps
tc class add dev eth2 parent 1:0 classid 1:20 htb rate 128kbps ceil 128kbps
tc class add dev eth2 parent 1:0 classid 1:30 htb rate 32kbps
tc filter add dev eth2 parent 1:0 protocol ip u32 match ip dport 80 0xffff flowid 1:10
tc filter add dev eth2 parent 1:0 protocol ip u32 match ip dport 8080 0xfff flowid 1:10
tc filter add dev eth2 parent 1:0 protocol ip u32 match ip dport 3128 0xfff flowid 1:10
tc filter add dev eth2 parent 1:0 protocol ip u32 match ip dport 22 0xfff flowid 1:20
tc filter add dev eth2 parent 1:0 protocol ip u32 match ip flowid 1:30
   
  E quando eu executo ele aparece o seguinte erro:
   
  [root em servweb teste]# ./controlebanda.sh
What is "kbps"?
Usage: ... qdisc add ... htb [default N] [r2q N]
 default  minor id of class to which unclassified packets are sent {0}
 r2q      DRR quantums are computed as rate in Bps/r2q {10}
 debug    string of 16 numbers each 0-3 {0}
  ... class add ... htb rate R1 [burst B1] [mpu B] [overhead O]
                      [prio P] [slot S] [pslot PS]
                      [ceil R2] [cburst B2] [mtu MTU] [quantum Q]
 rate     rate allocated to this class (class can still borrow)
 burst    max bytes burst which can be accumulated during idle period {computed}
 mpu      minimum packet size used in rate computations
 overhead per-packet size overhead used in rate computations
 ceil     definite upper class rate (no borrows) {rate}
 cburst   burst but for ceil {computed}
 mtu      max packet size we create rate map for {1600}
 prio     priority of leaf; lower are served first {0}
 quantum  how much bytes to serve from leaf at once {use r2q}
  TC HTB version 3.3
RTNETLINK answers: File exists
RTNETLINK answers: File exists
Illegal "match"
[root em servweb teste]#
   
  Alguem sabe como eu resolvo este erro?
   
  Grato


+-------------------------------------------------------+
| Pedro H. A. Neto 
| Analista de Tecnologia da Informatica
| MSN pedrohaneto em hotmail.com 
| UIN 196.039.600 
| Orkut http://www.orkut.com/Home.aspx?xid=2023086171787910905 
+-------------------------------------------------------+



		
---------------------------------
 ____________________________________________________ 
---------------------------------
Yahoo! Messenger com voz - Instale agora e faça ligações de graça. 
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://listman.redhat.com/archives/fedora-users-br/attachments/20060313/1ba8e08e/attachment.htm>


Mais detalhes sobre a lista de discussão Fedora-users-br