LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   need advice about cbq/iproute2/bandwidth shaper setting (https://www.linuxquestions.org/questions/linux-networking-3/need-advice-about-cbq-iproute2-bandwidth-shaper-setting-5036/)

Yaukuai 08-03-2001 09:28 AM

need advice about cbq/iproute2/bandwidth shaper setting
 
Hi..

I need help and oppinion about cbq setting (listed below).
i would like to control my office network traffic.

based on adv-routing-howto, i finally can implement
cbq. but the result is not as what i expected.

If i download files from the server (linux), the
traffic can be shaped, but it takes more than 30
seconds to slow down the traffic. At first try,
the client's traffic shows 1 kbytes/sec (8192 bps)
and slowly goes down to 200 bytes/sec (1600 bps).

if during the download process, i suddenly stop,
and try to reconnect to server ( using ftp or http ),
i have to wait for about 20 seconds.
seems like there is a bottle neck from the client to server.
while this is happening, there are no other client
connected to the server.

in my oppinion, when i stop the download process,
the traffic bandwidth should be available to the
client again. So the client don't have to wait
while connecting at the second attempt.

is there anything wrong with my setting ?
where can i find other queueing method example or
at lease more detail description ?
Description in adv-routing-howto is not so informative,
or perhaps i don't understand it at all
(too tough for me).
is there anyone can advice how to use RED queueing
and TBF queueing method ?

please advice if this cbq setting is correct or not...
thanks in advance.

#******************************
#!/bin/bash
TC="/sbin/tc"
INTOUT="ppp0"
INTLAN="eth0"
BWCLIENT="1600"
BWINTLAN="100Mbit"
#*** dialup connection in my country is very badd
#*** and slowww
BWINTMODEM="33600"
#***
BWWEIGHT="3360"

# Root discipline
$TC qdisc add dev $INTLAN root handle 10: \
cbq bandwidth $BWINTLAN avpkt 1000

# main class
$TC class add dev $INTLAN parent 10:0 classid 10:1 \
cbq bandwidth $BWINTMODEM rate $BWINTMODEM \
allot 1514 weight $BWWEIGHT prio 8 maxburst 20 \
avpkt 1000 bounded

# class for 3 clients
$TC class add dev $INTLAN parent 10:1 classid 10:100 \
cbq bandwidth $BWINTMODEM rate $BWCLIENT \
allot 1514 weight $BWWEIGHT prio 5 \
maxburst 20 avpkt 1000 bounded
$TC class add dev $INTLAN parent 10:1 classid 10:200 \
cbq bandwidth $BWINTMODEM rate $BWCLIENT \
allot 1514 weight $BWWEIGHT prio 5 \
maxburst 20 avpkt 1000 bounded
$TC class add dev $INTLAN parent 10:1 classid 10:300 \
cbq bandwidth $BWINTMODEM rate $BWCLIENT \
allot 1514 weight $BWWEIGHT prio 5 \
maxburst 20 avpkt 1000 bounded

# using sfq (Stochastic Fairness Queueing)
$TC qdisc add dev $INTLAN parent 10:100 \
sfq quantum 1514b perturb 15
$TC qdisc add dev $INTLAN parent 10:200 \
sfq quantum 1514b perturb 15
$TC qdisc add dev $INTLAN parent 10:300 \
sfq quantum 1514b perturb 15

# assigning clients traffic
$TC filter add dev $INTLAN parent 10:0 protocol ip \
prio 10 u32 match ip dst 172.20.52.2 flowid 10:100
$TC filter add dev $INTLAN parent 10:0 protocol ip \
prio 10 u32 match ip dst 172.20.52.3 flowid 10:200
$TC filter add dev $INTLAN parent 10:0 protocol ip \
prio 10 u32 match ip dst 172.20.52.4 flowid 10:300

# upstream to isp using dialup is not set..


All times are GMT -5. The time now is 10:36 PM.