From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreani Luca Date: Fri, 05 Sep 2003 07:22:06 +0000 Subject: [LARTC] time window in CBQ MIME-Version: 1 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C3737E.69485F10" Message-Id: List-Id: To: lartc@vger.kernel.org This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C3737E.69485F10 Content-Type: text/plain; charset="iso-8859-1" Dear list, I have two linux boxes acting as VoIP Gateway in the following configuration: IP Phone ----------+ +------------------+ +------------------+ +---------------- IP Phone |-----------eth0-| Linux BOX1 |-hdlc0----------hdlc0-| Linux BOX2 |-hdlc0-----------| PC ----------------- -+ +------------------+ +-----------------+ +--------------- PC The hdlc link is 64 kbps. I tried to make a configuration in order to guarantee the bandidth of the VoIP calls versus the data traffic between the two PCs. I used CBQ + Prio and U32 filter. The ip Phones mark the packet with TOS 0x40. I also need the entire bandidth available for data traffic when there are no calls. I used the following configuration: insmod /lib/modules/2.4.17_mvl21-sandpoint/kernel/net/sched/sch_cbq.o insmod /lib/modules/2.4.17_mvl21-sandpoint/kernel/net/sched/sch_prio.o insmod /lib/modules/2.4.17_mvl21-sandpoint/kernel/net/sched/cls_u32.o tc qdisc del dev $int root tc qdisc add dev $int root handle 1:0 cbq bandwidth $banda avpkt 1000 cell 8 tc class add dev $int parent 1:0 classid 1:1 cbq bandwidth $banda rate $banda maxburst 20 avpkt 500 tc class add dev $int parent 1:1 classid 1:2 cbq bandwidth $banda rate $banda_voce maxburst 20 avpkt 500 tc class add dev $int parent 1:1 classid 1:3 cbq bandwidth $banda rate $banda_dati maxburst 1 avpkt 500 tc qdisc add dev $int parent 1:2 handle 20: prio tc qdisc add dev $int parent 1:3 handle 30: prio tc filter add dev $int parent 1:0 protocol ip prio 1 u32 match ip tos 0x40 0xff flowid 1:2 tc filter add dev $int parent 1:0 protocol ip prio 1 u32 match ip tos 0x00 0xff flowid 1:3 According to the test I performed, the configuration works because the VoiP traffic has its bandwidth, however the voice quality is absolutely bad. This occurs because the bandidth is given in "avarage" while I need a more "instant" bandidth. How can I reduce the time window used to calculate the rate of the VoIP class. Note (in the script) that I tried setting maxburst=1 for the best effort class but had no result, thanks for help, P.S. any other configuration suggested for my application will be very appreciated... Luca Andreani ------_=_NextPart_001_01C3737E.69485F10 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable time window in CBQ

Dear list,

I have two linux boxes acting as VoIP = Gateway in the following configuration:

    
        IP Phone = ----------+          &= nbsp;      = +------------------+        &nbs= p;           &nbs= p;     = +------------------+        &nbs= p;         +---------------- IP = Phone

        =                  = |-----------eth0-| Linux BOX1 |-hdlc0----------hdlc0-| Linux BOX2 = |-hdlc0-----------|
        PC = ----------------- = -+           &nbs= p;     = +------------------+        &nbs= p;           &nbs= p;     = +-----------------+         = ;          = +--------------- PC

The hdlc link is 64 kbps.

I tried to make a configuration in = order to guarantee the bandidth of the VoIP calls versus the data = traffic between the two PCs.

I used CBQ + Prio and U32 filter. The = ip Phones mark the packet with TOS 0x40. I also need the entire = bandidth available for data traffic

when there are no calls.

I used the following = configuration:


insmod = /lib/modules/2.4.17_mvl21-sandpoint/kernel/net/sched/sch_cbq.o

insmod = /lib/modules/2.4.17_mvl21-sandpoint/kernel/net/sched/sch_prio.o

insmod = /lib/modules/2.4.17_mvl21-sandpoint/kernel/net/sched/cls_u32.o

tc qdisc del dev $int root

tc qdisc add dev $int root handle 1:0 = cbq bandwidth $banda avpkt 1000 cell 8

tc class add dev $int parent 1:0 = classid 1:1 cbq bandwidth $banda rate $banda maxburst 20 avpkt = 500

tc class add dev $int parent 1:1 = classid 1:2 cbq bandwidth $banda rate $banda_voce maxburst 20 avpkt = 500

tc class add dev $int parent 1:1 = classid 1:3 cbq bandwidth $banda rate $banda_dati maxburst 1 avpkt = 500

tc qdisc add dev $int parent 1:2 = handle 20: prio

tc qdisc add dev $int parent 1:3 = handle 30: prio

tc filter add dev $int parent 1:0 = protocol ip prio 1 u32 match ip tos 0x40 0xff flowid 1:2

tc filter add dev $int parent 1:0 = protocol ip prio 1 u32 match ip tos 0x00 0xff flowid 1:3


According to the test I performed, the = configuration works because the VoiP traffic has its bandwidth, however = the voice quality is absolutely bad. This occurs because

the bandidth is given in = "avarage" while I need a more "instant" bandidth. = How can I reduce the time window used to calculate the rate of the VoIP = class. Note (in the script) that I tried setting maxburst=3D1 for the = best effort class but had no result,

thanks for help,

P.S. any other configuration suggested = for my application will be very appreciated...

Luca Andreani

------_=_NextPart_001_01C3737E.69485F10-- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/