LARTC digest, Vol 1 #689 - 13 msgs (fwd)
Quoted 37 lines
Message: 7
Date: Mon, 22 Jul 2002 21:13:56 +0300
From: [email protected]
To: [email protected]
Subject: [LARTC] [tcng] htb example and default classhi
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
[email protected]PS. In fact only gred qdisc has a "default" parameter as I read the docs?!?
--__--__--
Message: 9
From: Stef Coene <[email protected]>
To: [email protected], [email protected]
Subject: Re: [LARTC] [tcng] htb example and default class
Date: Mon, 22 Jul 2002 20:42:01 +0200Quoted 4 lines · On Monday 22 July 2002 20:13, [email protected] wrote:
hi
I patched tcng to support htb (it seems to work :") ), now when I try t> o use it i got this error :
Quoted 8 lines
Quoted 1 line
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> guess it's a small bug in the patch for tcng.
Stef
===================Here is a sample of htb tcng script and the output:
Quoted 1 line
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 / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 5 lines
Quoted 1 line
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~~~~~~~
The default parameter is not required for htb. I have only experience in creating htb scripts and I don't know if the tcng generated syntax is bug free.
The tcng config you include seems OK to me. But don't trust me on that :)
Stef
Quoted 26 lines
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
================================
Quoted 9 lines
tc qdisc add dev eth0 handle 1:0 root dsmark indices 8
default_index0 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
Quoted 2 lines
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
Quoted 2 lines
tc filter add dev eth0 parent 2:0 protocol ip prio 1 tcindex mask
0x7shift 0
tc filter add dev eth0 parent 2:0 protocol ip prio 1 handle 4 tcindex
Quoted 14 lines
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
0x00xfeat 6 classid 1:1 tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match u80x20xffat 6 classid 1:2 tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match u80x00xffat 6 classid 1:3 tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match u80x10xffat 6 classid 1:4_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Signature · 7 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/