<html><div style='background-color:'><DIV class=RTE>
<P>thank you so much for your reply, </P>
<P>but i doubt about <BR>"&gt;If I understand your question correctly, the answer is "yes".&nbsp; It is<BR>&gt;possible to have nested qdiscs.&nbsp; Note that you can nest qdiscs if<BR>&gt;you are using a classful qdisc [0].&nbsp; See also my list at the bottom<BR>&gt;of this message."</P>
<P>you mean we can define "nested qdisc" but algorithm in nested qdisc<BR>must same as parent class???? i'm not clear it and<BR>Is we can define nested qdisc with algorithm different from parent class?????<BR>like this example tc command</P>
<P>and At step 4 about your advise<BR>"&gt;&nbsp;&nbsp; 4. Now, you may attach a brand-new classful or classless qdisc to<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; one of your existing classes.&nbsp; Repeat from step 1 for each new<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qdisc."</P>
<P>tc qdisc add dev eth0 root handle 1: htb<BR>//this left node hierachy for manage general package<BR>tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps ceil 100kbps<BR>//this right node hierachy for manage real time package<BR>tc class add dev eth0 parent 1: classid 1:2 htb rate 100kbps ceil 100kbps<BR>// from your adivse at step 4, attach brand-new after define class<BR>but Is it true??? because algorithm new qdisc are different from class algorithm<BR>that qdisc attach it.<BR>tc qdisc add dev eth0 parent 1:2 classid 10:11 hfsc rate 100kbps<BR>tc class add dev eth0 parent 10:11 classid 1:111 hfsc rate 100kbps ceil 100kbps<BR>tc class add dev eth0 parent 10:11 classid 1:112 hfsc rate 100kbps ceil 100kbps</P>
<P>please adivse me about my assumption, :)</P>
<P>and Can somebody advise me about HOW TO do later in this topic.<BR>i want to have got traffic shaper and my solotion is ...<BR>i want to manage different traffic package (general package use and real time package)<BR>so now i think about have got a problem with tc command, ... i think it can't setting<BR>to manage different package with different algorithm HTB and HFSC<BR>Do you have any idea about how to setting tc command example????</P>
<P>thank you<BR></P></DIV>
<DIV></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #a0c6e5 2px solid; MARGIN-RIGHT: 0px"><FONT style="FONT-SIZE: 11px; FONT-FAMILY: tahoma,sans-serif">
<HR color=#a0c6e5 SIZE=1>

<DIV></DIV>From:&nbsp;&nbsp;<I>"Martin A. Brown" &lt;martin@linux-ip.net&gt;</I><BR>To:&nbsp;&nbsp;<I>*~ r a K u ~ * &lt;e1605project@hotmail.com&gt;</I><BR>CC:&nbsp;&nbsp;<I>lartc@mailman.ds9a.nl</I><BR>Subject:&nbsp;&nbsp;<I>Re: [LARTC] Can i attach another qdisc under classes or root qdisc?</I><BR>Date:&nbsp;&nbsp;<I>Thu, 29 Jun 2006 09:14:52 -0500</I><BR>&gt;<BR>&gt;Greetings,<BR>&gt;<BR>&gt;&nbsp;&nbsp;: now, i'm learning and try to read a lot of article about tc<BR>&gt;&nbsp;&nbsp;: command in linux for setting traffic shaper. but i'm doubt about<BR>&gt;&nbsp;&nbsp;: In the theory about tc command ... In general, we define class<BR>&gt;&nbsp;&nbsp;: under root qdisc but Is it can be possible ???? If we define<BR>&gt;&nbsp;&nbsp;: another qdisc under root qdisc, Can i do it? because i have just<BR>&gt;&nbsp;&nbsp;: read tc command syntax and i found this point ...<BR>&gt;<BR>&gt;[ 
snip mangled "tc qdisc help" output ]<BR>&gt;<BR>&gt;&nbsp;&nbsp;: from above syntax at [handle][root /ingress/ ****parent CLASSID]<BR>&gt;&nbsp;&nbsp;: Is "parent CLASSID" mean we can define qdisc under class???? so<BR>&gt;&nbsp;&nbsp;: this is my assumption about that. and Could you advise me about<BR>&gt;&nbsp;&nbsp;: Is it can do for real????<BR>&gt;<BR>&gt;If I understand your question correctly, the answer is "yes".&nbsp;&nbsp;It is<BR>&gt;possible to have nested qdiscs.&nbsp;&nbsp;Note that you can nest qdiscs if<BR>&gt;you are using a classful qdisc [0].&nbsp;&nbsp;See also my list at the bottom<BR>&gt;of this message.<BR>&gt;<BR>&gt;&nbsp;&nbsp;: //first .. define root qdisc<BR>&gt;&nbsp;&nbsp;:<BR>&gt;&nbsp;&nbsp;: tc qdisc add dev eth0 root handle 1: fifo<BR>&gt;<BR>&gt;Bzzzt!&nbsp;&nbsp;Sadly, you can't do this.&nbsp;&nbsp;A fifo qdisc is a classless<BR>&gt;qdisc, meaning 
that it cannot have any children.&nbsp;&nbsp;(Poor barren<BR>&gt;thing!)<BR>&gt;<BR>&gt;&nbsp;&nbsp;: //second ... define class under root qdisc but algorithm's not same like root qdisc algorithm<BR>&gt;&nbsp;&nbsp;:<BR>&gt;&nbsp;&nbsp;: tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps ceil 100kbps<BR>&gt;&nbsp;&nbsp;: tc class add dev eth0 parent 1: classid 1:2 hfsc rate 100kbps ceil 100kbps<BR>&gt;<BR>&gt;Well, you can't quite mix and match classes without having a parent<BR>&gt;qdisc of the type you want.&nbsp;&nbsp;An HTB parent qdisc can have any number<BR>&gt;of children arranged in a tree structure below the parent.<BR>&gt;<BR>&gt;Similarly, an HFSC class structure needs to attach to an HFSC qdisc<BR>&gt;itself.&nbsp;&nbsp;Note, though, you cannot simply change the class name from<BR>&gt;htb to hfsc and supply the same parameters.&nbsp;&nbsp;HTB uses the rate 
and<BR>&gt;ceil parameters, but HFSC uses different parameters (rt, sc and ul).<BR>&gt;<BR>&gt;&nbsp;&nbsp;: //later attach qdisc to those classes<BR>&gt;&nbsp;&nbsp;:<BR>&gt;&nbsp;&nbsp;: tc qdisc add dev eth0 parent 1:1 classid 10:11 htb rate 100kbps ceil 100kbps<BR>&gt;&nbsp;&nbsp;: tc qdisc add dev eth0 parent 1:2 classid 10:21 hfsc rate 100kbps ceil 100kbps<BR>&gt;<BR>&gt;OK, now, let's pretend that you have a classful qdisc (e.g. HTB)<BR>&gt;with two classes, 1:1 and 1:2, AND that you have a good reason for<BR>&gt;adding a nested qdisc to one of these classes.&nbsp;&nbsp;If that were the<BR>&gt;case, then you could add the qdiscs to the parent classes in the<BR>&gt;following fashion:<BR>&gt;<BR>&gt;&nbsp;&nbsp; # -- create a new qdisc, attached inside an existing class<BR>&gt;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;hierarchy below class 1:1<BR>&gt;&nbsp;&nbsp; #<BR>&gt;&nbsp;&nbsp; 
$qdisc_add parent&nbsp;&nbsp;1:1 handle&nbsp;&nbsp;10:0 htb<BR>&gt;&nbsp;&nbsp; #<BR>&gt;&nbsp;&nbsp; # -- add a class to our newly created qdisc, and set the<BR>&gt;&nbsp;&nbsp; #&nbsp;&nbsp;&nbsp;&nbsp;rate and ceil parameters<BR>&gt;&nbsp;&nbsp; #<BR>&gt;&nbsp;&nbsp; $class_add parent 10:0 classid 10:1 htb rate 100kbps ceil 100kbps<BR>&gt;<BR>&gt;Note, that you'd still need filters.<BR>&gt;<BR>&gt;If I were you, I'd review the documentation for both HTB and HFSC<BR>&gt;after understanding the entire Linux traffic control model.&nbsp;&nbsp;Here's<BR>&gt;a crash course, starting at the root qdisc:<BR>&gt;<BR>&gt;&nbsp;&nbsp; 1. The qdisc can be<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- classless (e.g., FIFO, SFQ, ESFQ, TBF, GRED)<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- classful (e.g., HTB, HFSC, CBQ, PRIO)<BR>&gt;&nbsp;&nbsp; 2. If the qdisc is classful, keep 
reading.&nbsp;&nbsp;If the root qdisc is<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;classless, stop here.<BR>&gt;&nbsp;&nbsp; 3. You may add classes to your classful qdisc.&nbsp;&nbsp;If your qdisc is<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTB, you can only add HTB classes.&nbsp;&nbsp;If your qdisc is CBQ, you<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;can only add CBQ classes.&nbsp;&nbsp;If your qdisc is HFSC...<BR>&gt;&nbsp;&nbsp; 4. Now, you may attach a brand-new classful or classless qdisc to<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;one of your existing classes.&nbsp;&nbsp;Repeat from step 1 for each new<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;qdisc.<BR>&gt;&nbsp;&nbsp; 5. You may add filters to any of your classes (best starting<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;behaviour is to add them to 1:0)<BR>&gt;<BR>&gt;Very complex hierarchies are quite possible, even if 
not always<BR>&gt;understandable or advisable.<BR>&gt;<BR>&gt;Best of luck,<BR>&gt;<BR>&gt;-Martin<BR>&gt;<BR>&gt;&nbsp;&nbsp;[0] http://tldp.org/HOWTO/Traffic-Control-HOWTO/classful-qdiscs.html<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(N.B., this documentation was written without any reference to<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HFSC, a newer classful qdisc.&nbsp;&nbsp;You may also use HFSC with<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; child qdiscs.)<BR>&gt;<BR>&gt;--<BR>&gt;Martin A. Brown<BR>&gt;http://linux-ip.net/<BR></FONT></BLOCKQUOTE></div><br clear=all><hr>Don't just search. Find. <a href="http://g.msn.com/8HMAEN/2749??PS=47575" target="_top">MSN Search</a> Check out the new MSN Search!</html>