--0-611462377-1048485942=:33792 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 8bit How to do ensure a class not lended and not borrowed each other. I do cburst burst 0b ,but ctokens tokens go to negative! --------------------------------- Do You Yahoo!? "¸ü¶à¾ªÏ²£¬Í¬Ñù¾«²Ê£¬NetVista A30 ÈÈÂô" --0-611462377-1048485942=:33792 Content-Type: text/html; charset=gb2312 Content-Transfer-Encoding: 8bit <P>How to do ensure a class not lended and not borrowed each other.</P> <P>I do cburst burst 0b ,but ctokens tokens go to negative!</P><p><br><hr size=1><b>Do You Yahoo!?</b><br> <a href="http://ad.cn.doubleclick.net/clk;5313999;7930402;p?http://www.ibm.com/cn/promotion/pc/netvista_a30/index.shtml">"¸ü¶à¾ªÏ²£¬Í¬Ñù¾«²Ê£¬NetVista A30 ÈÈÂô"</a> --0-611462377-1048485942=:33792--
On Monday 24 March 2003 07:05, liang jian wrote: > How to do ensure a class not lended and not borrowed each other. That also depends on the setup of the other classes. Can you give us more information like htb or cbq? What do you want to do? What have you tried so far? > I do cburst burst 0b ,but ctokens tokens go to negative! You always needs a minimum burst and cburst. If you use htb and if you don't specify it on the command line, htb will calculate it for you. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net
--0-1747638489-1048558718=:622
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit
Htb tree:
20:1
20:10 20:11
20:200 20:201 20:210 20:211
http stream ensure 4Mbps
ftp stream ensure 2Mbps
smtp stream ensure 2MMbps
other stream ensure 2Mbps
so I want ensure 20:200 have 4Mbps for http
20:201 have 2Mbps for ftp and 20:210 have 2Mbps for smtp
20:211 have 2Mbps for other stream(default class )
Each class don't permit lended or borrowed bandwith from each other.
This is I want to get.
> Stef Coene <stef.coene@docum.org> wrote:>On Monday 24 March 2003
07:05, liang jian wrote:
>> How to do ensure a class not lended and not borrowed each other.
>That also depends on the setup of the other classes. Can you give us
>more
>information like htb or cbq? What do you want to do? What have you tried
>so
>far?
> I do cburst burst 0b ,but ctokens tokens go to negative!
>You always needs a minimum burst and cburst. If you use htb and if you
>don't
>specify it on the command line, htb will calculate it for you.
>Stef
>--
>stef.coene@docum.org
>"Using Linux as bandwidth manager"
>http://www.docum.org/
>#lartc @ irc.oftc.net
---------------------------------
Do You Yahoo!?
"¸ü¶à¾ªÏ²£¬Í¬Ñù¾«²Ê£¬NetVista A30 ÈÈÂô"
--0-1747638489-1048558718=:622
Content-Type: text/html; charset=gb2312
Content-Transfer-Encoding: 8bit
<P>Htb tree:
<P>
20:1
<P>
20:10
20:11
<P>20:200 20:201
20:210 20:211
<P>http stream ensure 4Mbps
<P>ftp stream ensure 2Mbps
<P>smtp stream ensure 2MMbps
<P>other stream ensure 2Mbps
<P>so I want ensure 20:200 have 4Mbps for http
<P>20:201 have 2Mbps for ftp and 20:210 have 2Mbps for smtp
<P>20:211 have 2Mbps for other stream(default class )
<P>Each class don't permit lended or borrowed bandwith from each other.
<P>This is I want to get.
<P>> <B><I>Stef Coene
<stef.coene@docum.org></I></B> wrote:
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT:
#1010ff 2px solid">>On Monday 24 March 2003 07:05, liang jian
wrote:<BR>>> How to do ensure a class not lended and not
borrowed each other.<BR>>That also depends on the setup of the
other classes. Can you give us >more <BR>>information like
htb or cbq? What do you want to do? What have you tried >so
<BR>>far?<BR><BR>> I do cburst burst 0b ,but
ctokens tokens go to negative!<BR>>You always needs a minimum burst
and cburst. If you use htb and if you >don't <BR>>specify it
on the command line, htb will calculate it for
you.<BR><BR>>Stef<BR><BR><BR>>--
<BR><BR>>stef.coene@docum.org<BR>>"Using
Linux as bandwidth
manager"<BR>>http://www.docum.org/<BR>>#lartc @
irc.oftc.net<BR><BR></BLOCKQUOTE><p><br><hr
size=1><b>Do You Yahoo!?</b><br>
<a
href="http://ad.cn.doubleclick.net/clk;5313999;7930402;p?http://www.ibm.com/cn/promotion/pc/netvista_a30/index.shtml">"¸ü¶à¾ªÏ²£¬Í¬Ñù¾«²Ê£¬NetVista
A30 ÈÈÂô"</a>
--0-1747638489-1048558718=:622--
On Tuesday 25 March 2003 03:18, liang jian wrote: > Htb tree: > 20:1 > 20:10 20:11 > 20:200 20:201 20:210 20:211 > http stream ensure 4Mbps > ftp stream ensure 2Mbps > smtp stream ensure 2MMbps > other stream ensure 2Mbps > so I want ensure 20:200 have 4Mbps for http > 20:201 have 2Mbps for ftp and 20:210 have 2Mbps for smtp > 20:211 have 2Mbps for other stream(default class ) > Each class don't permit lended or borrowed bandwith from each other. > This is I want to get. Can you try to explain it a bit more? You created 4 classes, (200, 201, 210, 211) so I suppose you want : 200 : http traffic, 4Mbps 201 : ftp traffic, 2Mbps 210 : smtp traffic, 2Mbps 211 : other trafic, 2Mbps Each class is isolated so it never lends it unused bandwidth to other classes. And each class is never using unused bandwidth from other classes. So as example, http has 4Mbps and it never can use the bandwidth of ftp (2Mbps) if there is no ftp traffic. So the 4Mbps is a maximum bandwidth. What's the total bandiwidth available? You have 4Mbps for http and 3x2Mbps for ftp,smtp,other. So the total bandwidth available on the link is 10Mbps? Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net
--0-1938692027-1048656632=:59020 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 8bit >Stef Coene <stef.coene@docum.org> wrote:>On Tuesday 25 March 2003 03:18, liang jian wrote: >> Htb tree: >> 20:1 >> 20:10 20:11 >> 20:200 20:201 20:210 20:211 >> http stream ensure 4Mbps >> ftp stream ensure 2Mbps >> smtp stream ensure 2MMbps >> other stream ensure 2Mbps >> so I want ensure 20:200 have 4Mbps for http >> 20:201 have 2Mbps for ftp and 20:210 have 2Mbps for smtp >> 20:211 have 2Mbps for other stream(default class ) >> Each class don't permit lended or borrowed bandwith from each other. >> This is I want to get. >Can you try to explain it a bit more? >You created 4 classes, (200, 201, 210, 211) so I suppose you want : >200 : http traffic, 4Mbps >201 : ftp traffic, 2Mbps >210 : smtp traffic, 2Mbps >211 : other trafic, 2Mbps >Each class is isolated so it never lends it unused bandwidth to other >classes. >And each class is never using unused bandwidth from other classes. So >as >example, http has 4Mbps and it never can use the bandwidth of ftp (2Mbps) if >there is no ftp traffic. So the 4Mbps is a maximum bandwidth. >What's the total bandiwidth available? You have 4Mbps for http and >3x2Mbps >for ftp,smtp,other. So the total bandwidth available on the link is 10Mbps? >Stef >-- >stef.coene@docum.org >"Using Linux as bandwidth manager" >http://www.docum.org/ >#lartc @ irc.oftc.net Yes ,that is my means :),my english is poor --------------------------------- Do You Yahoo!? "ÑÅ»¢Í¨ÍøÂçKTV, ËæÊ±ËæµØÃâ·Ñ¿¨ÀOK~~" --0-1938692027-1048656632=:59020 Content-Type: text/html; charset=gb2312 Content-Transfer-Encoding: 8bit <P> <P> ><B><I>Stef Coene <stef.coene@docum.org></I></B> wrote: <BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">>On Tuesday 25 March 2003 03:18, liang jian wrote:<BR>>> Htb tree:<BR>>> 20:1<BR>>> 20:10 20:11<BR>>> 20:200 20:201 20:210 20:211<BR>>> http stream ensure 4Mbps<BR>>> ftp stream ensure 2Mbps<BR>>> smtp stream ensure 2MMbps<BR>>> other stream ensure 2Mbps<BR>>> so I want ensure 20:200 have 4Mbps for http<BR>>> 20:201 have 2Mbps for ftp and 20:210 have 2Mbps for smtp<BR>>> 20:211 have 2Mbps for other stream(default class )<BR>>> Each class don't permit lended or borrowed bandwith from each other.<BR>>> This is I want to get.<BR>>Can you try to explain it a bit more? <BR><BR>>You created 4 classes, (200, 201, 210, 211) so I suppose you want :<BR>>200 : http traffic, 4Mbps<BR>>201 : ftp traffic, 2Mbps<BR>>210 : smtp traffic, 2Mbps<BR>>211 : other trafic, 2Mbps<BR><BR>>Each class is isolated so it never lends it unused bandwidth to other >classes. <BR>>And each class is never using unused bandwidth from other classes. So >as <BR>>example, http has 4Mbps and it never can use the bandwidth of ftp (2Mbps) if <BR>>there is no ftp traffic. So the 4Mbps is a maximum bandwidth.<BR><BR>>What's the total bandiwidth available? You have 4Mbps for http and >3x2Mbps <BR>>for ftp,smtp,other. So the total bandwidth available on the link is 10Mbps?<BR><BR>>Stef<BR><BR>>-- <BR><BR>>stef.coene@docum.org<BR>>"Using Linux as bandwidth manager"<BR>>http://www.docum.org/<BR><STRONG>>#</STRONG>lartc @ irc.oftc.net<BR><BR>Yes ,that is my means :),my english is poor</BLOCKQUOTE><p><br><hr size=1><b>Do You Yahoo!?</b><br> <a href="http://rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com//chat/index.html ">"ÑÅ»¢Í¨ÍøÂçKTV, ËæÊ±ËæµØÃâ·Ñ¿¨ÀOK~~"</a> --0-1938692027-1048656632=:59020--
On Wednesday 26 March 2003 06:30, liang jian wrote: > >Stef Coene <stef.coene@docum.org> wrote:>On Tuesday 25 March 2003 03:18, > > liang jian wrote: > > > >> Htb tree: > >> 20:1 > >> 20:10 20:11 > >> 20:200 20:201 20:210 20:211 > >> http stream ensure 4Mbps > >> ftp stream ensure 2Mbps > >> smtp stream ensure 2MMbps > >> other stream ensure 2Mbps > >> so I want ensure 20:200 have 4Mbps for http > >> 20:201 have 2Mbps for ftp and 20:210 have 2Mbps for smtp > >> 20:211 have 2Mbps for other stream(default class ) > >> Each class don't permit lended or borrowed bandwith from each other. > >> This is I want to get. > > > >Can you try to explain it a bit more? > > > >You created 4 classes, (200, 201, 210, 211) so I suppose you want : > >200 : http traffic, 4Mbps > >201 : ftp traffic, 2Mbps > >210 : smtp traffic, 2Mbps > >211 : other trafic, 2Mbps > > > >Each class is isolated so it never lends it unused bandwidth to other > > >classes. And each class is never using unused bandwidth from other > > classes. So >as example, http has 4Mbps and it never can use the > > bandwidth of ftp (2Mbps) if there is no ftp traffic. So the 4Mbps is a > > maximum bandwidth. > > > >What's the total bandiwidth available? You have 4Mbps for http and > > >3x2Mbps for ftp,smtp,other. So the total bandwidth available on the link > > is 10Mbps? > > > >Stef > > > >-- > > > >stef.coene@docum.org > >"Using Linux as bandwidth manager" > >http://www.docum.org/ > >#lartc @ irc.oftc.net > > Yes ,that is my means :),my english is poor No problem. I have some remarks. Why not let the 4 classes borrow unused bandwidth from each other? So if there is no other traffic then ftp, ftp can get 10Mbps. But as soone as there is some other traffic, the ftp traffic goes down. And if you want 4 isolated classes, why not just creating the 4 classes like this : 20:1 20:200 20:201 20:210 20:211 You have to create the htb (or cbq) classes. FIltering the traffic and placing in the classes is easy (you can filter on ports). Except maybe for the ftp traffic because that uses dynamic ports. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net
--0-1457748674-1049101946=:20655
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit
> Yes ,that is my means :),my english is poor
No problem.
I have some remarks. Why not let the 4 classes borrow unused bandwidth from
each other? So if there is no other traffic then ftp, ftp can get 10Mbps.
But as soone as there is some other traffic, the ftp traffic goes down.
And if you want 4 isolated classes, why not just creating the 4 classes like
this :
20:1
20:200 20:201 20:210 20:211
You have to create the htb (or cbq) classes. FIltering the traffic and
placing in the classes is easy (you can filter on ports). Except maybe for
the ftp traffic because that uses dynamic ports.
Stef:
Thanks for your answer me quickly!
I have others question :)
I apologize that it will take time.
My topological look like this:
Local:192.168.1.2----------|eth0:192.168.1.1 Linux Box
eth1:172.16.1.1|------Internet
I have create a default 200
20:1 (4kbps)
200:200 200:201 200:210 200:211
(1kbps) (1kbps) (1kbps) (1kbps)
I have 10Mbps on the eth1,but I want to test htb,so I do that:
tc class add dev eth0 parent 20: classid 20:1 htb rate 4kbps ceil 4kbps
200:201 mark with 7,then
iptables -t mangle -A FORWARD -p tcp -o eth0 -s 0/0 --dport 80 -d 0/0 -j MARK
--set-mark 7
iptables -t mangle -A PREROUTING -p tcp -i eth0 -s 0/0 --dport 80 -d 0/0 -j MARK
--set-mark 7
why all traffic from default 200 to Internet.(the iptables rules like no use)
------------------------------------------------
If I use it on eth1 interface iptables rules work!?(though I have default class
200 but all traffice
from 200:201 to Internet.) other question it that:
In this settings use Local machine 192.168.1.2 download some soft from
Internet.why it rate overrun 1kbps?
Rules like this:
tc class add dev eth1 parent 20: classid 20:1 htb rate 4kbps ceil 4kbps
iptables -t mangle -A FORWARD -p tcp -o eth1 -s 0/0 --dport 80 -d 0/0 -j MARK
--set-mark 7
iptables -t mangle -A PREROUTING -p tcp -i eth1 -s 0/0 --dport 80 -d 0/0 -j MARK
--set-mark 7
tc can only shape outgoing traffic(My settings which is my outgoing traffic,eth1
or eth0?) Maybe I mix them
I need path kernel with IMQ?
---------------------------------
Do You Yahoo!?
"ÑÅ»¢Í¨ÍøÂçKTV, ËæÊ±ËæµØÃâ·Ñ¿¨ÀOK~~"
--0-1457748674-1049101946=:20655
Content-Type: text/html; charset=gb2312
Content-Transfer-Encoding: 8bit
<P><BR>> Yes ,that is my means :),my english is
poor<BR>No problem.<BR><BR>I have some remarks. Why not let
the 4 classes borrow unused bandwidth from <BR>each other? So if there is
no other traffic then ftp, ftp can get 10Mbps. <BR>But as soone as there
is some other traffic, the ftp traffic goes down.<BR><BR>And if you
want 4 isolated classes, why not just creating the 4 classes like <BR>this
:<BR><BR>20:1<BR>20:200 20:201 20:210
20:211<BR><BR>You have to create the htb (or cbq) classes. FIltering
the traffic and <BR>placing in the classes is easy (you can filter on
ports). Except maybe for <BR>the ftp traffic because that uses dynamic
ports.<BR><BR><BR>Stef:<BR>Thanks for your answer me
quickly!<BR>I have others question :)<BR>I apologize that it will
take time.<BR>My topological look like
this:<BR>Local:192.168.1.2----------|eth0:192.168.1.1 Linux Box
eth1:172.16.1.1|------Internet</P>
<P>I have create a default 200</P>
<P>
20:1 (4kbps)<BR>200:200 200:201 200:210 200:211<BR>(1kbps) (1kbps)
(1kbps) (1kbps)</P>
<P>I have 10Mbps on the eth1,but I want to test htb,so I do
that:<BR>tc class add dev eth0 parent 20: classid 20:1 htb rate 4kbps ceil
4kbps<BR> </P>
<P>200:201 mark with 7,then <BR>iptables -t mangle -A FORWARD -p tcp
-o eth0 -s 0/0 --dport 80 -d 0/0 -j MARK --set-mark 7<BR>iptables -t
mangle -A PREROUTING -p tcp -i eth0 -s 0/0 --dport 80 -d 0/0 -j MARK --set-mark
7</P>
<P>why all traffic from default 200 to Internet.(the iptables rules like
no use)</P>
<P><BR>------------------------------------------------</P>
<P>If I use it on eth1 interface iptables rules work!?(though I have
default class 200 but all traffice <BR>from 200:201 to Internet.) other
question it that:<BR>In this settings use Local machine 192.168.1.2
download some soft from Internet.why it rate overrun
1kbps?<BR> <BR>Rules like this:<BR>tc class add dev
eth1 parent 20: classid 20:1 htb rate 4kbps ceil 4kbps</P>
<P>iptables -t mangle -A FORWARD -p tcp -o eth1 -s 0/0 --dport 80 -d 0/0
-j MARK --set-mark 7<BR>iptables -t mangle -A PREROUTING -p tcp -i eth1 -s
0/0 --dport 80 -d 0/0 -j MARK --set-mark 7</P>
<P>tc can only shape outgoing traffic(My settings which is my outgoing
traffic,eth1 or eth0?) Maybe I mix them<BR>I need path kernel with
IMQ?<BR></P><p><br><hr size=1><b>Do You
Yahoo!?</b><br>
<a
href="http://rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com//chat/index.html
">"ÑÅ»¢Í¨ÍøÂçKTV, ËæÊ±ËæµØÃâ·Ñ¿¨ÀOK~~"</a>
--0-1457748674-1049101946=:20655--
--0-177854834-1049101979=:64622
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit
>> Yes ,that is my means :),my english is poor
>No problem.
>I have some remarks. Why not let the 4 classes borrow unused bandwidth from
>each other? So if there is no other traffic then ftp, ftp can get 10Mbps.
>But as soone as there is some other traffic, the ftp traffic goes down.
>And if you want 4 isolated classes, why not just creating the 4 classes like
>this :
>20:1
>20:200 20:201 20:210 20:211
>You have to create the htb (or cbq) classes. FIltering the traffic and
>placing in the classes is easy (you can filter on ports). Except maybe for
>the ftp traffic because that uses dynamic ports.
Stef:
Thanks for your answer me quickly!
I have others question :)
I apologize that it will take time.
My topological look like this:
Local:192.168.1.2----------|eth0:192.168.1.1 Linux Box
eth1:172.16.1.1|------Internet
I have create a default 200
20:1 (4kbps)
200:200 200:201 200:210 200:211
(1kbps) (1kbps) (1kbps) (1kbps)
I have 10Mbps on the eth1,but I want to test htb,so I do that:
tc class add dev eth0 parent 20: classid 20:1 htb rate 4kbps ceil 4kbps
200:201 mark with 7,then
iptables -t mangle -A FORWARD -p tcp -o eth0 -s 0/0 --dport 80 -d 0/0 -j MARK
--set-mark 7
iptables -t mangle -A PREROUTING -p tcp -i eth0 -s 0/0 --dport 80 -d 0/0 -j MARK
--set-mark 7
why all traffic from default 200 to Internet.(the iptables rules like no use)
------------------------------------------------
If I use it on eth1 interface iptables rules work!?(though I have default class
200 but all traffice
from 200:201 to Internet.) other question it that:
In this settings use Local machine 192.168.1.2 download some soft from
Internet.why it rate overrun 1kbps?
Rules like this:
tc class add dev eth1 parent 20: classid 20:1 htb rate 4kbps ceil 4kbps
iptables -t mangle -A FORWARD -p tcp -o eth1 -s 0/0 --dport 80 -d 0/0 -j MARK
--set-mark 7
iptables -t mangle -A PREROUTING -p tcp -i eth1 -s 0/0 --dport 80 -d 0/0 -j MARK
--set-mark 7
tc can only shape outgoing traffic(My settings which is my outgoing traffic,eth1
or eth0?) Maybe I mix them
I need path kernel with IMQ?
---------------------------------
Do You Yahoo!?
"ÑÅ»¢Í¨ÍøÂçKTV, ËæÊ±ËæµØÃâ·Ñ¿¨ÀOK~~"
--0-177854834-1049101979=:64622
Content-Type: text/html; charset=gb2312
Content-Transfer-Encoding: 8bit
<P><BR>>> Yes ,that is my means :),my english is
poor<BR>>No problem.<BR><BR>>I have some
remarks. Why not let the 4 classes borrow unused bandwidth from
<BR>>each other? So if there is no other traffic then ftp, ftp can
get 10Mbps. <BR>>But as soone as there is some other traffic, the
ftp traffic goes down.<BR><BR>>And if you want 4 isolated
classes, why not just creating the 4 classes like <BR>>this
:<BR><BR>>20:1<BR>>20:200 20:201 20:210
20:211<BR><BR>>You have to create the htb (or cbq) classes.
FIltering the traffic and <BR>>placing in the classes is easy (you
can filter on ports). Except maybe for <BR>>the ftp traffic because
that uses dynamic ports.<BR><BR><BR>Stef:<BR>Thanks for
your answer me quickly!<BR>I have others question :)<BR>I apologize
that it will take time.<BR>My topological look like
this:<BR>Local:192.168.1.2----------|eth0:192.168.1.1 Linux Box
eth1:172.16.1.1|------Internet</P>
<P>I have create a default 200</P>
<P>
20:1 (4kbps)<BR>200:200 200:201 200:210 200:211<BR>(1kbps) (1kbps)
(1kbps) (1kbps)</P>
<P>I have 10Mbps on the eth1,but I want to test htb,so I do
that:<BR>tc class add dev eth0 parent 20: classid 20:1 htb rate 4kbps ceil
4kbps<BR> </P>
<P>200:201 mark with 7,then <BR>iptables -t mangle -A FORWARD -p tcp
-o eth0 -s 0/0 --dport 80 -d 0/0 -j MARK --set-mark 7<BR>iptables -t
mangle -A PREROUTING -p tcp -i eth0 -s 0/0 --dport 80 -d 0/0 -j MARK --set-mark
7</P>
<P>why all traffic from default 200 to Internet.(the iptables rules like
no use)</P>
<P><BR>------------------------------------------------</P>
<P>If I use it on eth1 interface iptables rules work!?(though I have
default class 200 but all traffice <BR>from 200:201 to Internet.) other
question it that:<BR>In this settings use Local machine 192.168.1.2
download some soft from Internet.why it rate overrun
1kbps?<BR> <BR>Rules like this:<BR>tc class add dev
eth1 parent 20: classid 20:1 htb rate 4kbps ceil 4kbps</P>
<P>iptables -t mangle -A FORWARD -p tcp -o eth1 -s 0/0 --dport 80 -d 0/0
-j MARK --set-mark 7<BR>iptables -t mangle -A PREROUTING -p tcp -i eth1 -s
0/0 --dport 80 -d 0/0 -j MARK --set-mark 7</P>
<P>tc can only shape outgoing traffic(My settings which is my outgoing
traffic,eth1 or eth0?) Maybe I mix them<BR>I need path kernel with
IMQ?<BR></P><p><br><hr size=1><b>Do You
Yahoo!?</b><br>
<a
href="http://rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com//chat/index.html
">"ÑÅ»¢Í¨ÍøÂçKTV, ËæÊ±ËæµØÃâ·Ñ¿¨ÀOK~~"</a>
--0-177854834-1049101979=:64622--
On Monday 31 March 2003 11:12, liang jian wrote: > >> Yes ,that is my means :),my english is poor > > > >No problem. > > > >I have some remarks. Why not let the 4 classes borrow unused bandwidth > > from each other? So if there is no other traffic then ftp, ftp can get > > 10Mbps. But as soone as there is some other traffic, the ftp traffic goes > > down. > > > >And if you want 4 isolated classes, why not just creating the 4 classes > > like this : > > > >20:1 > >20:200 20:201 20:210 20:211 > > > >You have to create the htb (or cbq) classes. FIltering the traffic and > >placing in the classes is easy (you can filter on ports). Except maybe for > >the ftp traffic because that uses dynamic ports. > > Stef: > Thanks for your answer me quickly! > I have others question :) I have some problems understanding your english. Can you post your htb and iptabels script so I can understand what you did? > I apologize that it will take time. > My topological look like this: > Local:192.168.1.2----------|eth0:192.168.1.1 Linux Box > eth1:172.16.1.1|------Internet > > I have create a default 200 > > 20:1 (4kbps) > 200:200 200:201 200:210 200:211 > (1kbps) (1kbps) (1kbps) (1kbps) > > I have 10Mbps on the eth1,but I want to test htb,so I do that: > tc class add dev eth0 parent 20: classid 20:1 htb rate 4kbps ceil 4kbps 4 and 1 kbps is __very__ low. It's too low for htb to get some results. > 200:201 mark with 7,then > iptables -t mangle -A FORWARD -p tcp -o eth0 -s 0/0 --dport 80 -d 0/0 -j > MARK --set-mark 7 > iptables -t mangle -A PREROUTING -p tcp -i eth0 -s 0/0 > --dport 80 -d 0/0 -j MARK --set-mark 7 > > why all traffic from default 200 to Internet.(the iptables rules like no > use) So all traffic ends up in 200:200 ?? You can check with iptables -L -v -n if your iptables rules are matched. If the iptables rule match, the byte and packet counters will increase. > ------------------------------------------------ > > If I use it on eth1 interface iptables rules work!?(though I have default > class 200 but all traffice from 200:201 to Internet.) other question it > that: > In this settings use Local machine 192.168.1.2 download some soft from > Internet.why it rate overrun 1kbps? Because 1kbps is too low for htb. And you have to mark packets in POSTROUTING. Local generated packets don't travel thru forward or prerouting. See kptd on www.docum.org. > Rules like this: > tc class add dev eth1 parent 20: classid 20:1 htb rate 4kbps ceil 4kbps > > iptables -t mangle -A FORWARD -p tcp -o eth1 -s 0/0 --dport 80 -d 0/0 -j > MARK --set-mark 7 iptables -t mangle -A PREROUTING -p tcp -i eth1 -s 0/0 > --dport 80 -d 0/0 -j MARK --set-mark 7 > > tc can only shape outgoing traffic(My settings which is my outgoing > traffic,eth1 or eth0?) Maybe I mix them I need path kernel with IMQ? You can indeed only shape outgoing traffic. Or you need the imq device. But if you shape on eth0 and eth1 you control both directions. So you don't need the imq device. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net