From: Thossapron Apinyapanha Date: Thu, 14 Dec 2006 16:38:37 +0000 Subject: [LARTC] hfsc rule command problem Message-Id: <20061214163837.7668.qmail@web35507.mail.mud.yahoo.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============0679659132==" List-Id: To: lartc@vger.kernel.org --===============0679659132== Content-Type: multipart/alternative; boundary="0-894395227-1166114317=:7312" --0-894395227-1166114317=:7312 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable My hfsc rule ..=0A =0Atc qdisc add dev eth2 handle 1: root hfsc =0Aiptables= -t mangle -N ms-all=0Aiptables -t mangle -N ms-all-chains=0Aiptables -t ma= ngle -N ms-prerouting=0Aiptables -t mangle -A PREROUTING -j ms-prerouting= =0Aiptables -t mangle -A ms-prerouting -j CONNMARK --restore-mark=0A =0Aipt= ables -t mangle -A ms-prerouting -p udp --dport 4444 -j MARK --set-mark 1= =0Aiptables -t mangle -A ms-prerouting -p udp -m multiport --dports 1755,50= 05,1024:4443,4445:5500 -j MARK --set-mark 1=0Aiptables -t mangle -A ms-prer= outing -p tcp --dport 23 -j MARK --set-mark 1=0Aiptables -t mangle -A ms-pr= erouting -p tcp -m multiport --dports 20,21,5001:5004,5006:5100 -j MARK --s= et-mark 2=0Aiptables -t mangle -A ms-prerouting -p tcp --dport 80 -j MARK -= -set-mark 2=0A =0Aiptables -t mangle -A ms-prerouting -j CONNMARK --save-ma= rk=0A =0Aiptables -t mangle -A FORWARD -o eth2 -j ms-all=0Aiptables -t mang= le -A POSTROUTING -o eth2 -j ms-all-chains=0A =0Atc class add dev eth2 pare= nt 1: classid 1:1 hfsc sc m2 10000kbit =0Atc filter add dev eth2 parent 1:0= protocol all u32 match u32 0 0 classid 1:1=0A =0Atc class add dev eth2 par= ent 1:1 classid 1:11 hfsc ls m2 3500kbit ul m2 10000kbit=0Aiptables -t mang= le -N ms-chain-eth2-1:11=0Aiptables -t mangle -A ms-all-chains -m mark --ma= rk 1 -j ms-chain-eth2-1:11=0Aiptables -t mangle -A ms-all -o eth2 -j ms-cha= in-eth2-1:11=0A =0Atc class add dev eth2 parent 1:11 classid 1:111 hfsc rt = m1 3500kbit d 10s m2 200kbit ls m2 3500kbit ul m2 3500kbit=0Atc qdisc add d= ev eth2 handle 111: parent 1:111 sfq=0Aiptables -t mangle -A ms-chain-eth2-= 1:11 -p udp --dport 4444 -j CLASSIFY --set-class 1:111=0Aiptables -t mangle= -A ms-chain-eth2-1:11 -p udp --dport 4444 -j RETURN=0A =0Atc class add dev= eth2 parent 1:11 classid 1:112 hfsc rt m1 3500kbit d 10s m2 1300kbit ls m2= 3500kbit ul m2 3500kbit=0Atc qdisc add dev eth2 handle 112: parent 1:112 s= fq=0Aiptables -t mangle -A ms-chain-eth2-1:11 -p udp -m multiport --dports = 1755,5005,1024:4443,4445:5500 -j CLASSIFY --set-class 1:112=0Aiptables -t m= angle -A ms-chain-eth2-1:11 -p udp -m multiport --dports 1755,5005,1024:444= 3,4445:5500 -j RETURN=0A =0Atc class add dev eth2 parent 1:11 classid 1:113= hfsc rt m1 3500kbit d 10s m2 1500kbit ls m2 3500kbit ul m2 3500kkbit=0Atc = qdisc add dev eth2 handle 113: parent 1:113 sfq=0Aiptables -t mangle -A ms-= chain-eth2-1:11 -p tcp --dport 23 -j CLASSIFY --set-class 1:113=0Aiptables = -t mangle -A ms-chain-eth2-1:11 -p tcp --dport 23 -j RETURN=0A =0Atc class = add dev eth2 parent 1:11 classid 1:199 hfsc rt m1 3500kbit d 10s m2 500kbit= ls m2 3500kbit ul m2 3500kbit=0Atc qdisc add dev eth2 handle 199: parent 1= :199 sfq=0Aiptables -t mangle -A ms-chain-eth2-1:11 -j CLASSIFY --set-class= 1:199=0Aiptables -t mangle -A ms-chain-eth2-1:11 -j RETURN=0A =0Atc class = add dev eth2 parent 1:1 classid 1:12 hfsc ls m2 7500kbit ul m2 10000kbit=0A= iptables -t mangle -N ms-chain-eth2-1:12=0Aiptables -t mangle -A ms-all-cha= ins -m mark --mark 2 -j ms-chain-eth2-1:12=0Aiptables -t mangle -A ms-all -= o eth2 -j ms-chain-eth2-1:12=0A =0Atc class add dev eth2 parent 1:12 classi= d 1:121 hfsc ls m2 3500kbit ul m2 7500kbit=0Atc qdisc add dev eth2 handle 1= 21: parent 1:121 sfq=0Aiptables -t mangle -A ms-chain-eth2-1:12 -p tcp -m m= ultiport --dports 20,21,5001:5004,5006:5100 -j CLASSIFY --set-class 1:121= =0Aiptables -t mangle -A ms-chain-eth2-1:12 -p tcp -m multiport --dports 20= ,21,5001:5004,5006:5100 -j RETURN=0A =0Atc class add dev eth2 parent 1:12 c= lassid 1:122 hfsc ls m2 3500kbit ul m2 7500kbit=0Atc qdisc add dev eth2 han= dle 122: parent 1:122 sfq=0Aiptables -t mangle -A ms-chain-eth2-1:12 -p tcp= --dport 80 -j CLASSIFY --set-class 1:122=0Aiptables -t mangle -A ms-chain-= eth2-1:12 -p tcp --dport 80 -j RETURN=0A =0Atc class add dev eth2 parent 1:= 12 classid 1:299 hfsc rt m1 3500kbit d 10s m2 500kbit ls m2 500kbit ul m2 = 7500kbit=0Atc qdisc add dev eth2 handle 299: parent 1:299 sfq=0Aiptables -t= mangle -A ms-chain-eth2-1:12 -j CLASSIFY --set-class 1:299=0Aiptables -t m= angle -A ms-chain-eth2-1:12 -j RETURN=0A =0AI have got a big problem, I don= =92t know my rule are wrong?? My rule are like this=0A =0A = Root=0AReal time class Non-real time= class #interior class=0A(Voip ,MMS, Telnet, default) (H= TTP FTP default) #leaf class=0A =0AMy setting rate in each= class is=0AReal time class guarantee rate: 3500kbit max rat= e: 10000kbit =0AVoIP guarantee rate:= 200kbit max rate: 3500kbit=0AMMS guarante= e rate: 1300kbit max rate: 3500kbit=0ATelnet gu= arantee rate: 1500kbit max rate: 3500kbit =0ADefault = guarantee rate: 500kbit max rate: 3500kbit=0A =0ANon Real time= class=0AHTTP guarantee rate: 7500kbit max ra= te: 10000kbit=0AFTP guarantee rate: 3500kbit = max rate: 7500kbit=0ADefault guarantee rate: 3500kbit = max rate: 7500kbit=0A =0AI need to input traffic with so very load t= o shaper about 10Mbit by traffic generator but nomatter I try to change inp= ut rate by decrease rate from 10Mbit until input rate less than all of guar= antee rate in each class, the result is after about 10s all input traffic = are error (can=92t send anymore traffic)=0A First, I think, = it must relative with percentage between TCP and UDP about If it have a lot= UDP, TCP may be lost because request time out and need to retransmission a= gain (it make overflow of network load so much in incoming queue and at las= t it full and can=92t sent anymore traffic to shaper.=0A So = nomatter I try to decrease rate down until 2Mbit, all are die. And My last = choice is input traffic with rate same as each rate in all class so .. afte= r 10s ,can=92t input traffic anymore So Is it true about HFSC can=92t mana= ge traffic that very load about 10Mbit??? =0A =0A Second, I= =92m doubt about level in hierarchical rule are the factor for happen so mu= ch delay? In my lab, I=92m compare between 2 level (root and leaf class) an= d input traffic all about 600Kbit =85 the result is ok but if I change to 3= level (root interior and leaf class) after 10s, it down and can=92t send a= nymore=0A =0A So my question=0A1. Is my rule are setti= ng wrong?? About parameter or filter iptable (but after I test this filter = iptable with htb , it=92s ok and very good)=0A2. Is it true about HFS= C can=92t manage traffic load more than 1Mbit ??=0A3. I have a lot qu= estion but I don=92t know what is wrong? My rule or hfsc can=92t manage loa= d traffic =0A=0Athank you=0A=0A=0A =0A_____________________________________= _______________________________________________=0ADo you Yahoo!?=0AEveryone= is raving about the all-new Yahoo! Mail beta.=0Ahttp://new.mail.yahoo.com --0-894395227-1166114317=:7312 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
=0A
=0A

My hfsc rule ..

=0A

 

=0A

tc qdisc add dev eth2 handle 1: root hfsc =

=0A

iptables -t mangle -N ms-all

=0A

iptables -t mangle -N ms-all-chai= ns

=0A

iptables -t mangle -N ms-prerouting

=0A

<= SPAN style=3D"FONT-SIZE: 8pt; FONT-FAMILY: Tahoma">iptables -t mangle -A PR= EROUTING -j ms-prerouting

=0A

iptables -t mangle -A ms-prerouting -j CONN= MARK --restore-mark

=0A

 

=0A

iptables -t mangle -A ms-preroutin= g -p udp --dport 4444 -j MARK --set-mark 1

=0A

iptables -t mangle -A ms-p= rerouting -p udp -m multiport --dports 1755,5005,1024:4443,4445:5500 -j MAR= K --set-mark 1

=0A

iptables -t mangle -A ms-prerouting -p tcp --dport 23 = -j MARK --set-mark 1

=0A

iptables -t mangle -A ms-prerouting -p tcp -m mu= ltiport --dports 20,21,5001:5004,5006:5100 -j MARK --set-mark 2<= /SPAN>

=0A

iptab= les -t mangle -A ms-prerouting -p tcp --dport 80 -j MARK --set-mark 2<= /o:p>

=0A

 

=0A

iptables -t mangle -A ms-prerouting -j CONNMARK --save-mark

=0A

 

=0A

iptables -t mangle -A FORWARD -o eth2 -j ms-all

=0A

ipt= ables -t mangle -A POSTROUTING -o eth2 -j ms-all-chains=0A

 

=0A

= tc class add dev eth2 parent 1: classid 1:1 hfsc sc m2 10000kbit

=0A

tc = filter add dev eth2 parent 1:0 protocol all u32 match u32 0 0 classid 1:1

=0A

 

=0A

tc class add dev eth2 parent 1:1 classid 1:11 hfsc ls m2 = 3500kbit ul m2 10000kbit

=0A

iptables -t mangle -N ms-chain-eth2-1:11

=0A

iptables -t mangle -A ms-all-chains -m mark --mark 1 -j ms-chain-eth2-1:= 11

=0A

iptables -t mangle -A ms-all -o eth2 -j ms-chain-eth2-1:11

=0A

<= o:p> 

=0A

tc class add dev eth2 parent 1:11 classid 1:111 hfsc rt m1 3500= kbit d 10s m2 200kbit ls m2 3500kbit ul m2 3500kbit

= =0A

tc qdisc add de= v eth2 handle 111: parent 1:111 sfq

=0A

iptables -t mangle -A ms-chain-et= h2-1:11 -p udp --dport 4444 -j CLASSIFY --set-class 1:111=

=0A

iptables -t= mangle -A ms-chain-eth2-1:11 -p udp --dport 4444 -j RETURN

=0A

&nbs= p;

=0A

tc class add dev eth2 parent 1:11 classid 1:112 hfsc rt m1 3500kbit d 1= 0s m2 1300kbit ls m2 3500kbit ul m2 3500kbit

=0A

<= SPAN style=3D"FONT-SIZE: 8pt; FONT-FAMILY: Tahoma">tc qdisc add dev eth2 ha= ndle 112: parent 1:112 sfq

=0A

iptables -t mangle -A ms-chain-eth2-1:11 -= p udp -m multiport --dports 1755,5005,1024:4443,4445:5500 -j CLASSIFY --set= -class 1:112

=0A

iptables -t mangle -A ms-chain-eth2-1:11 -p udp -m multi= port --dports 1755,5005,1024:4443,4445:5500 -j RETURN

= =0A

 

=0A

tc= class add dev eth2 parent 1:11 classid 1:113 hfsc rt m1 3500kbit d 10s m2 = 1500kbit ls m2 3500kbit ul m2 3500kkbit

=0A

tc qdisc add dev eth2 handle = 113: parent 1:113 sfq

=0A

iptables -t mangle -A ms-chain-eth2-1:11 -p tcp= --dport 23 -j CLASSIFY --set-class 1:113

=0A

iptables -t mangle -A ms-c= hain-eth2-1:11 -p tcp --dport 23 -j RETURN

=0A

 =0A

tc class add = dev eth2 parent 1:11 classid 1:199 hfsc rt m1 3500kbit d 10s m2 500kbit ls = m2 3500kbit ul m2 3500kbit

=0A

tc qdisc add dev eth2 handle 199: parent 1= :199 sfq

=0A

iptables -t mangle -A ms-chain-eth2-1:11 -j CLASSIFY --set-c= lass 1:199

=0A

iptables -t mangle -A ms-chain-eth2-1:11 -j RETURN

=0A

<= o:p> 

=0A

tc class add dev eth2 parent 1:1 classid 1:12 hfsc ls m2 7500kb= it ul m2 10000kbit

=0A

iptables -t mangle -N ms-chain-eth2-1:12

=0A

ipt= ables -t mangle -A ms-all-chains -m mark --mark 2 -j ms-chain-eth2-1:12

=0A

iptables -t mangle -A ms-all -o eth2 -j ms-chain-eth2-1:12

=0A

&n= bsp;

=0A

tc class add dev eth2 parent 1:12 classid 1:121 hfsc ls m2 3500kbit u= l m2 7500kbit

=0A

tc qdisc add dev eth2 handle 121: parent 1:121 sfq=

=0A

iptables -t man= gle -A ms-chain-eth2-1:12 -p tcp -m multiport --dports 20,21,5001:5004,5006= :5100 -j RETURN

=0A

 

=0A

tc class add dev eth2 parent 1:12 classi= d 1:122 hfsc ls m2 3500kbit ul m2 7500kbit

=0A

tc qdisc add dev eth2 hand= le 122: parent 1:122 sfq

=0A

iptables -t mangle -A ms-chain-eth2-1:12 -p = tcp --dport 80 -j CLASSIFY --set-class 1:122

=0A

<= SPAN style=3D"FONT-SIZE: 8pt; FONT-FAMILY: Tahoma">iptables -t mangle -A ms= -chain-eth2-1:12 -p tcp --dport 80 -j RETURN

=0A

<= SPAN style=3D"FONT-SIZE: 8pt; FONT-FAMILY: Tahoma"> =

=0A

tc class ad= d dev eth2 parent 1:12 classid 1:299 hfsc rt m1 3500kbit d 10s  m2 500kbit ls m2 500kbit ul m2 7500kbi= t

=0A

tc qdisc add dev eth2 handle 299: parent 1:299 sfq

=0A

iptables -= t mangle -A ms-chain-eth2-1:12 -j CLASSIFY --set-class 1:299

=0A

iptables= -t mangle -A ms-chain-eth2-1:12 -j RETURN

=0A

 

=0A

I have got a big problem, I don=92t know my rule are wrong?? My rule ar= e like this

=0A

 =

=0A

           &nb= sp;            =         Root=0A

Real time class           &nbs= p;             = Non-real time class  &nbs= p;            &= nbsp;  #interior class

=0A

(Voip ,MMS, Telnet, default)&n= bsp;  (HTTP  FTP = default)     &nbs= p;           #leaf= class

=0A

 

=0A

My setting rate in each class is=

=0A

Real time class         = guarantee rate: 3500kbit  = ;      max rate: 10000kbit          = ;     

=0A

VoIP   &nb= sp;            =          guarantee rate: 200= kbit      &n= bsp;   max rate: 3500kbit

=0A

MMS   &= nbsp;           &nbs= p;         guarantee rate: 1= 300kbit      = ;  max rate: 3500kbit

=0A

Telnet    &= nbsp;           &nbs= p;     guarantee rate: 1500kbit        max rate:= 3500kbit

=0A

Default        &nbs= p;           guara= ntee rate: 500kbit    =       max rate: 3500kbit<= /P>=0A

 

=0A

Non Real time class

=0A

HTTP   &nb= sp;            =         guarantee rate: 7500kbit<= SPAN style=3D"mso-tab-count: 1">        = max rate: 10000kbit

=0A

FTP      = ;            &n= bsp;       guarantee rate: 3500kbit        max rate: 7500kbit

=0A

     &nb= sp;            =   guarantee rate: 3500kbit&nbs= p;       max rate: 7500kbit=

=0A

 

=0AI need to input traffic with so very load to shap= er about 10Mbit by traffic generator but nomatter I try to change input rat= e by decrease rate from 10Mbit until input rate less than all of guarantee =  rate in each class, the resu= lt is after about 10s all input traffic are error (can=92t send anymore tra= ffic)

=0A

          = ;      First, I think, it must relative wit= h percentage between TCP and UDP about If it have a lot UDP, TCP may be los= t because request time out and need to retransmission again (it make overfl= ow of network load so much in incoming queue and at last it full and can=92= t sent anymore traffic to shaper.

=0A

     &= nbsp;          So nomat= ter I try to decrease rate down until 2Mbit, all are die. And My last choic= e is input traffic with rate same as each rate in all class so .. after 10s= ,can=92t input traffic anymore  So Is it true about HFSC can=92t manage traffic that very load about 10= Mbit???

=0A

 

=0A

            =     Second, I=92m doubt about level in hierarchical r= ule are the factor for happen so much delay? In my lab, I=92m compare betwe= en 2 level (root and leaf class) and input traffic all about 600Kbit =85 th= e result is ok but if I change to 3 level (root interior and leaf class) af= ter 10s, it down and can=92t send anymore

=0A

 

=0A

      &n= bsp;         So my question<= o:p>

=0A

1.       = Is my rule are setting = wrong?? About parameter or filter iptable (but after I test this filter ipt= able with htb , it=92s ok and very good)

=0A

2.  &nb= sp;    Is it true about HFSC can=92t manage traffic load more = than 1Mbit ??

=0A

3.       I have = a lot question but I don=92t know what is wrong? My rule or hfsc can=92t ma= nage load traffic

=0A

 = ;

=0A

thank you


=0A=0A
Have a burning question? Go to Yahoo! Answers= and get answers from real people who know. --0-894395227-1166114317=:7312-- --===============0679659132== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --===============0679659132==--