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