In article <Pine.LNX.4.20.0002141259500.603-100000@rethymno.ujep.cz> you wrote:
> Hello,
> I am trying to create CBQ setup that would classify packets into
> "high-priority low-latency" and "low-priority bulk" classes and handle
> them appropriately:
> #--- root ---
> tc qdisc add dev ppp0 root handle 1:0 cbq bandwidth 38400bps avpkt 380 \
> mpu 64
> #--- class 1:1 for interactive prioritized traffic ---
> tc class add dev ppp0 parent 1: classid :1 est 2sec 16sec cbq \
> bandwidth 38400bps rate 10000bps allot 580b weight 1 prio 1 \
> maxburst 10 avpkt 512
> tc qdisc add dev ppp0 parent 1:1 sfq quantum 1500b perturb 5
> #--- class 1:3 for the rest of traffic ---
> tc class add dev ppp0 parent 1: classid :2 est 1sec 8sec cbq bandwidth \
> 38400bps rate 28400bps allot 580b weight 1 prio 7 maxburst 5 \
> avpkt 1000 defmap 3f
> tc qdisc add dev ppp0 parent 1:2 sfq quantum 1500b perturb 5
> #--- we will filter according to fwmark ---
> tc filter add dev ppp0 parent 1:0 protocol ip prio 90 fw
> Strange thing 1:
> class cbq 1: root rate 300Kbit (bounded,isolated) prio no-transmit
> Root class is created with bandwidth 300Kbit even if I specify
> 38400bps.
In tc, bps is 'bytes per second' which is exactly 300 kilobits per
second, when we take 8 bits for a byte:
$ bc
bc 1.05
Copyright 1991, 1992, 1993, 1994, 1997, 1998 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
38400*8 [bytes]
307200 [bits]
307200/1024
300 [kbits]
I wrote about the seemingly obvious 8 bits, because in serial lines
world the throughput is usually measured as characters per seconds (cps),
and in this case character can be e.g. 10 bits (8 bits of data + 2 bits
for start and stop).
-- Pawel Krawczyk, CETI internet, Krakow. http://ceti.pl/~kravietz/ - To unsubscribe from this list: send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.rutgers.edu
This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:37 EST