shapecfg, cbq, htb

Forums: 

Hola, estoy en procura de hcaer mis primeros pasos en el tema de control de ancho de banda, es asi que disponia a instalar los programas necesarios, pero me encuentro con la dificultad que mediante el yun no encuentro ninguno de ellos, existe un repositorio para centos 4.4 especial para estos programas o cual la forma de instalarlos?

gracias

JHA

CBQ es toda una teoría

Imagen de Epe

CBQ es toda una teoría respecto al manejo de colas de prioridad. Es interesante estudiarlo.

cbq.init es un script que puedes bajar de aqui:
[url]http://sourceforge.net/projects/cbqinit/[/url]

Te ayudará a comenzar en eso. copias cbq.init a /etc/init.d y después le das un chmod +x para darle derechos de ejecución. También recuerda agregarlo como servicio o llamarlo desde /etc/rc.local

Saludos
epe
--
EcuaLinux.com
Ecuador: +(593) 9 9246504, +(593) 2 3412402
USA: +1 404 795 0321

Saludos
epe

EcuaLinux.com

+(593) 9 9924 6504

Servicios en Software Libre

wget

wget http://ufpr.dl.sourceforge.net/sourceforge/cbqinit/cbq.init-v0.7.3
touch /sbin/cbq.init
cp cbq.init-v0.7.3 /sbin/cbq.init
chmo +x /sbin/cbq.init
el resto sigue aka cualkier duda vuelve a postear
http://www.szabilinux.hu/bandwidth/

Una vez mas lo vulvo y

Imagen de damage

Una vez mas lo vulvo y repito hace fuuuuu... hice un post de un Script de CBQ para control ancho de banda que le cuesta a la gente usar la opción BUSCAR.

Keep The Fire Burning.....
Stryper 1988
http://counter.li.org/

Manipular el script cbq?

Hola a todos los amigos de Ecualug, por favor alguien q este mas al tanto del cbq, necesito hacer una pequeña tarea, sera posible...creo que si... quiero que en mi wireless las redes 172.16.0.0/16 y la 200.0.28.0/22 naveguen a 10MB y que el resto 0.0.0.0/0 a 128kbps, este ultimo es la salida al mundo exterior,aun no lo entiendo muy bien, estaba tratado de modificar el script de la siguiente manera pero me pregunta que sigifica 10Mbit y 128kbit[what is 10Mbit?]..espero me puedan ayudar, es de vida o muerte!!!

PD: como podran ver, solo le puse 128 de up y Down a la eth1 hasta `poder manipular por completo el BENDITO cbq.
#!/bin/bash

# Wonder Shaper
# please read the README before filling out these values
#
# Set the following values to somewhat less than your actual download
# and uplink speed. In kilobits. Also set the device that is to be shaped.
DOWNLINK=128
UPLINK=128
DEV=eth1

# low priority OUTGOING traffic - you can leave this blank if you want
# low priority source netmasks
NOPRIOHOSTSRC=

# low priority destination netmasks
NOPRIOHOSTDST=

# low priority source ports
NOPRIOPORTSRC=

# low priority destination ports
NOPRIOPORTDST=

# Now remove the following two lines :-)

#########################################################

if [ "$1" = "status" ]
then
tc -s qdisc ls dev $DEV
tc -s class ls dev $DEV
exit
fi

# clean existing down- and uplink qdiscs, hide errors
tc qdisc del dev $DEV root 2> /dev/null > /dev/null
tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null

if [ "$1" = "stop" ]
then
exit
fi

###### uplink

# install root CBQ

tc qdisc add dev eth1 root handle 10: cbq bandwidth 10Mbit avpkt 10

# shape everything at $UPLINK speed - this prevents huge queues in your
# DSL modem which destroy latency:
# main class

tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth \
10Mbit 10Mbit allot 1514 weight 1Mbit prio 1 maxburst 20 \
avpkt 1000

# high prio class 1:10:

tc class add dev eth0 parent 10:1 classid 10:100 cbq \
bandwidth 10Mb 10Mbit allot 1514 weight 1000kbit prio 1 \
maxburst 20 avpkt 1000 bunded

# bulk and default class 1:20 - gets slightly less traffic,
# and a lower priority:

tc class add dev eth0 parent 10:1 classid 10:200 cbq \
bandwidth 10Mb 128Kbit allot 1514 weight 128Kbit prio 5 \
maxburst 20 avpkt 1000 bounded

# 'traffic we hate'

tc class add dev $DEV parent 1:1 classid 1:30 cbq rate $[8*$UPLINK/10]kbit \
allot 1600 prio 2 avpkt 1000

# all get Stochastic Fairness:
tc qdisc add dev eth0 parent 10:100 sfq quantum 1514b perturb 15
tc qdisc add dev eth0 parent 10:200 sfq quantum 1514b perturb 15
tc qdisc add dev $DEV parent 1:30 handle 30: sfq perturb 10

# start filters
# TOS Minimum Delay (ssh, NOT scp) in 1:10:
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \
match ip tos 0x10 0xff flowid 1:10

# ICMP (ip protocol 1) in the interactive class 1:10 so we
# can do measurements & impress our friends:
tc filter add dev eth0 parent 10:0 protocol ip prio 25 u32 \
match ip 200.0.28.0/22 flowid 10:10
tc filter add dev eth0 parent 10:0 protocol ip prio 25 u32 \
match ip 172.16.0.0/16 flowid 10:10
tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 \
match ip 0.0.0.0/0 flowid 10:200

# prioritize small packets (<64 bytes)

tc filter add dev $DEV parent 1: protocol ip prio 12 u32 \
match ip protocol 6 0xff \
match u8 0x05 0x0f at 0 \
match u16 0x0000 0xffc0 at 2 \
flowid 1:10

# some traffic however suffers a worse fate
for a in $NOPRIOPORTDST
do
tc filter add dev $DEV parent 1: protocol ip prio 14 u32 \
match ip dport $a 0xffff flowid 1:30
done

for a in $NOPRIOPORTSRC
do
tc filter add dev $DEV parent 1: protocol ip prio 15 u32 \
match ip sport $a 0xffff flowid 1:30
done

for a in $NOPRIOHOSTSRC
do
tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \
match ip src $a flowid 1:30
done

for a in $NOPRIOHOSTDST
do
tc filter add dev $DEV parent 1: protocol ip prio 17 u32 \
match ip dst $a flowid 1:30
done

# rest is 'non-interactive' ie 'bulk' and ends up in 1:20

tc filter add dev $DEV parent 1: protocol ip prio 18 u32 \
match ip dst 0.0.0.0/0 flowid 1:20

########## downlink #############
# slow downloads down to somewhat less than the real speed to prevent
# queuing at our ISP. Tune to see how high you can set it.
# ISPs tend to have *huge* queues to make sure big downloads are fast
#
# attach ingress policer:

tc qdisc add dev $DEV handle ffff: ingress
###########################################

tc qdisc add dev eth1 root handle 20: cbq bandwidth \
10Mbit avpkt 10
tc class add dev eth1 parent 20:0 classid 20:1 cbq \
bandwidth 10Mbit 10Mbit allot 1514 weight 1Mbit prio 5 \
maxburst 20 avpkt 1000

tc class add dev eth1 parent 20:1 classid 20:100 cbq \
bandwidth 10Mb 10Mbit allot 1514 weight 1000Kbit prio 1 \
maxburst 20 avpkt 1000 bounded

tc class add dev eth1 parent 20:1 classid 20:200 cbq \
bandwidth 10Mb 128Kbit allot 1514 weight 128Kbit prio 5 \
maxburst 20 avpkt 1000 bounded

tc qdisc add dev eth1 parent 20:100 sfq quantum 1514b \
perturb 15
tc qdisc add dev eth1 parent 20:200 sfq quantum 1514b \
perturb 15

tc filter add dev eth1 parent 20:0 protocol ip prio 25 \
u32 match ip 200.0.28.0/22 flowid 20:100

tc filter add dev eth1 parent 20:0 protocol ip prio 25 \
u32 match ip 172.16.0.0/16 flowid 20:100

tc filter add dev eth1 parent 20:0 protocol ip prio 100 \
u32 match ip 0.0.0.0/0 flowid 20:200

# filter *everything* to it (0.0.0.0/0), drop everything that's
# coming in too fast:

tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \
0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1

BUSCAR Y solamente BUSCAR,

Imagen de damage

BUSCAR Y solamente BUSCAR, aca en el foro se ha tratado muuuchas veces el tema de CBQ y HTB es mas hay un COMO, por favor usen BUSCAR o COMOS y luego las preguntas.

Creo que hay que "resaltar" con un tamaño de letra más grande estas opciones nombradas.

Keep The Fire Burning.....
Stryper 1988
http://counter.li.org/