[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bandwidth-question
Hello everybody,
I'm using DiffServ on Linux with tc-tool.
I installed a script for core Router( see below )
Bandwidth I use BE-5Mbit
EF-3Mbit
AF11-4Mbit
AF21-3Mbit
If I send only BE with 5 Mbit it is ok- all packets arrive.
If I send BE with 7 Mbit, arrive about 5 Mbit(because of bounded
bandwidth)
My problem:
If I send simultaneos with 7Mbit of BE 3Mbit of EF, then
all EF packets arrive.(it's ok) But all 7Mbit of BE arrive too.(despite of
5Mbit limit)
Why ?
Is it normal behavior ?
Or it is an error in my script ?
thank u
Jan
#! /bin/bash
TC=/home/iproute2/tc/tc
dev="dev eth2"
# First a DSMARK qdisc is introduced in order to retrieve TOS from IP
header
$TC qdisc add $dev handle 1:0 root dsmark indices 64 set_tc_index
$TC filter add $dev parent 1:0 protocol ip prio 1 tcindex mask 0xffff
shift 0 \
pass_on
# Second a CBQ qdisc is used in order to support EF, AF and BE classes
$TC qdisc add $dev parent 1:0 handle 2:0 cbq bandwidth 15Mbit \
cell 8 avpkt 1500 mpu 30
$TC filter add $dev parent 2:0 protocol ip prio 1 tcindex mask \
0xf0 shift 4 pass_on
##### EF class specific setup
$TC class add $dev parent 2:0 classid 2:5 cbq bandwidth 15Mbit rate \
3Mbit avpkt 1500 prio 1 bounded isolated allot 1514 weight 1 \
maxburst 10
$TC qdisc add $dev parent 2:5 pfifo limit 5
$TC filter add $dev parent 1:0 protocol ip prio 1 handle 0x2e tcindex \
classid 1:151
$TC filter add $dev parent 2:0 protocol ip prio 1 handle 5 \
tcindex classid 2:5
##### BE class specific setup
$TC class add $dev parent 2:0 classid 2:6 cbq bandwidth 15Mbit rate \
5Mbit avpkt 1500 prio 7 bounded isolated allot 1514 weight 1 \
maxburst 21
$TC qdisc add $dev parent 2:6 red limit 60KB min 15KB max 45KB burst 20 \
avpkt 1500 bandwidth 15Mbit probability 0.4
$TC filter add $dev parent 1:0 protocol ip prio 1 handle 0x0 tcindex \
classid 1:161
$TC filter add $dev parent 2:0 protocol ip prio 1 handle \
6 tcindex classid 2:6
##### AF Class 1 specific setup
$TC class add $dev parent 2:0 classid 2:1 cbq bandwidth 15Mbit \
rate 4Mbit avpkt 1500 prio 5 bounded isolated allot 1514 weight \
1 maxburst 20
$TC filter add $dev parent 2:0 protocol ip prio 1 handle 1 tcindex \
classid 2:1
$TC qdisc add $dev parent 2:1 gred setup DPs 1 default 1 grio
# --- AF Class 1 DP 1---
$TC filter add $dev parent 1:0 protocol ip prio 1 handle 10 tcindex \
classid 1:111
$TC qdisc add $dev parent 2:1 gred limit 60KB min 15KB \
max 45KB burst 20 avpkt 1500 bandwidth 15Mbit DP 1 probability 0.02 prio 2
##### AF Class 2 specific setup
$TC class add $dev parent 2:0 classid 2:2 cbq bandwidth 15Mbit \
rate 3Mbit avpkt 1500 prio 4 bounded isolated allot 1514 weight \
1 maxburst 20
$TC filter add $dev parent 2:0 protocol ip prio 1 handle 2 tcindex \
classid 2:2
$TC qdisc add $dev parent 2:2 gred setup DPs 1 default 1 grio
# --- AF Class 2 DP 1---
$TC filter add $dev parent 1:0 protocol ip prio 1 handle 18 tcindex \
classid 1:121
$TC qdisc add $dev parent 2:2 gred limit 60KB min 15KB \
max 45KB burst 20 avpkt 1500 bandwidth 15Mbit DP 1 probability 0.02 prio 2
--
Sent through Global Message Exchange - http://www.gmx.net