> Message: 7
> Date: Mon, 22 Jul 2002 21:13:56 +0300
> From: raptor@unacs.bg
> To: lartc@mailman.ds9a.nl
> Subject: [LARTC] [tcng] htb example and default class
>
> hi
> I patched tcng to support htb (it seems to work :") ), now when I try
to use it i got this error :
>
> htb requires one class to be marked as "default"
>
> If I try to use somewhere "class(default, .....) {}" i get :
>
> unrecognized parameter "default"
>
> I tried also "def", "dfl" nope :"[
> How do u mark some class to be "default" !?! can u give me some
example ? (htb preffered).
>
>
> Thanx alot in advance
> raptor@unacs.bg
>
> PS. In fact only gred qdisc has a "default" parameter as I read
the docs?!?
>
> --__--__--
>
> Message: 9
> From: Stef Coene <stef.coene@docum.org>
> To: raptor@unacs.bg, lartc@mailman.ds9a.nl
> Subject: Re: [LARTC] [tcng] htb example and default class
> Date: Mon, 22 Jul 2002 20:42:01 +0200
>
> On Monday 22 July 2002 20:13, raptor@unacs.bg wrote:
> > hi
> > I patched tcng to support htb (it seems to work :") ), now when I
try t> o
> > use it i got this error :
> >
> > htb requires one class to be marked as "default"
> It''s not required if you use the tc command to create a htb
qdisc. So I> =20
> guess it''s a small bug in the patch for tcng.
>
>
> Stef
>
>
======================================Here is a sample of htb tcng script and
the output:> guess it''s a small bug in the patch for tcng.
I thought that it is required:
tc qdisc add dev eth0 handle 2:0 parent 1:0 htb default 5 r2q 100
~~~~~~~
- Jacob
dev "eth0" {
egress {
$base = 100 * 1kBps;
class (<$cl1_2>) if ((raw[6] & 0xfe) == 0);
class (<$cl1_12>) if (raw[6] == 2);
class (<$cl1_10>) if (raw[6] == 0);
class (<$cl1_11>) if (raw[6] == 1);
htb (r2q 100) {
class(rate 10 * $base) {
$cl1_2 = class (rate 4 * $base, ceil 8 * $base,) {
$cl1_10 = class (rate 3 * $base, ceil 10 * $base, prio 1) { fifo(limit 8p);
}
$cl1_11 = class (rate 1 * $base, ceil 10 * $base, prio 0) { fifo(limit 8p);
}
}
}
$cl1_12 = class (rate 6 * $base, ceil 10 * $base, prio 1, default) {
fifo(limit 8p); }
}
}
}
# ================================ Device eth0 ===============================
tc qdisc add dev eth0 handle 1:0 root dsmark indices 8 default_index 0
tc qdisc add dev eth0 handle 2:0 parent 1:0 htb default 5 r2q 100
tc class add dev eth0 parent 2:0 classid 2:1 htb rate 1000000bps
tc class add dev eth0 parent 2:1 classid 2:2 htb rate 400000bps ceil 800000bps
tc class add dev eth0 parent 2:2 classid 2:3 htb rate 300000bps ceil 1000000bps
prio 1
tc qdisc add dev eth0 handle 3:0 parent 2:3 pfifo limit 8
tc class add dev eth0 parent 2:2 classid 2:4 htb rate 100000bps ceil 1000000bps
prio 0
tc qdisc add dev eth0 handle 4:0 parent 2:4 pfifo limit 8
tc class add dev eth0 parent 2:0 classid 2:5 htb rate 600000bps ceil 1000000bps
prio 1
tc qdisc add dev eth0 handle 5:0 parent 2:5 pfifo limit 8
tc filter add dev eth0 parent 2:0 protocol ip prio 1 tcindex mask 0x7 shift 0
tc filter add dev eth0 parent 2:0 protocol ip prio 1 handle 4 tcindex classid
2:4
tc filter add dev eth0 parent 2:0 protocol ip prio 1 handle 3 tcindex classid
2:3
tc filter add dev eth0 parent 2:0 protocol ip prio 1 handle 2 tcindex classid
2:5
tc filter add dev eth0 parent 2:0 protocol ip prio 1 handle 1 tcindex classid
2:2
tc filter add dev eth0 parent 1:0 protocol ip prio 1 handle 1:0:0 u32 divisor 1
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match u8 0x0 0xfe at 6
classid 1:1
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match u8 0x2 0xff at 6
classid 1:2
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match u8 0x0 0xff at 6
classid 1:3
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match u8 0x1 0xff at 6
classid 1:4
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/