Re: [LARTC] >10Mbit on HTB

2003-10-15 Thread Stef Coene
On Wednesday 15 October 2003 05:42, Rio Martin wrote:
> On Wednesday 15 October 2003 01:25, Stef Coene wrote:
> > On Tuesday 14 October 2003 05:59, Rio Martin wrote:
> > > > None.  Htb is an egress qdisc so it shapes outgoing traffic.  An
> > > > ingress qdisc handles the incoming packets.  And there is no queue
> > > > for the incoming packets, so you can't use htb.  You can use filteres
> > > > + policers to rate limit traffic.  Or you may take a look at the imq
> > > > device.  This is a virtual device.  You can redirect all incoming
> > > > packets to it and use htb on the imq device.
> > >
> > > Hi Stef,
> > > What do you mean by ' no queue for the incoming packets, so you can't
> > > use HTB'? For now i am not applying IMQ for the ingress, but using
> > > packet mangling under iptables to handle both incoming packets from
> > > internet and outgoing packets to internet. Is this not right? give me
> > > your opinion please, as far as i can see, there were no troubles using
> > > packet mangling to handle those situation.
> >
> > What do you mean with packet mangling?
> > And it's not because there is no queue for incoming packets that you
> > can't do anything with time.  The filter + policer setup can rate limit
> > incoming packets.  Iptables can also do rate limiting.
>
> iptables -t mangle -A bla bla bla ..
> i classified all the traffic both for incoming and outgoing to mangle
> table. correct me if this is wrong stef ..
But what has this to do with traffic shaping   You can mangle incoming and 
outgoing packets with iptables, but tc kicks in just before the packets are 
placed on the wire.  So after all iptables stuff and only for the outgoing 
packets.

Stef

-- 
[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/


Re: [LARTC] >10Mbit on HTB

2003-10-14 Thread Rio Martin
On Wednesday 15 October 2003 01:25, Stef Coene wrote:
> On Tuesday 14 October 2003 05:59, Rio Martin wrote:
> > > None.  Htb is an egress qdisc so it shapes outgoing traffic.  An
> > > ingress qdisc handles the incoming packets.  And there is no queue for
> > > the incoming packets, so you can't use htb.  You can use filteres +
> > > policers to rate limit traffic.  Or you may take a look at the imq
> > > device.  This is a virtual device.  You can redirect all incoming
> > > packets to it and use htb on the imq device.
> > Hi Stef,
> > What do you mean by ' no queue for the incoming packets, so you can't use
> > HTB'? For now i am not applying IMQ for the ingress, but using packet
> > mangling under iptables to handle both incoming packets from internet and
> > outgoing packets to internet. Is this not right? give me your opinion
> > please, as far as i can see, there were no troubles using packet mangling
> > to handle those situation.
>
> What do you mean with packet mangling?
> And it's not because there is no queue for incoming packets that you can't
> do anything with time.  The filter + policer setup can rate limit incoming
> packets.  Iptables can also do rate limiting.

iptables -t mangle -A bla bla bla ..
i classified all the traffic both for incoming and outgoing to mangle table.
correct me if this is wrong stef ..

Regards,
Rio Martin.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] >10Mbit on HTB

2003-10-14 Thread Stef Coene
On Tuesday 14 October 2003 05:59, Rio Martin wrote:
> > None.  Htb is an egress qdisc so it shapes outgoing traffic.  An ingress
> > qdisc handles the incoming packets.  And there is no queue for the
> > incoming packets, so you can't use htb.  You can use filteres + policers
> > to rate limit traffic.  Or you may take a look at the imq device.  This
> > is a virtual device.  You can redirect all incoming packets to it and use
> > htb on the imq device.
>
> Hi Stef,
> What do you mean by ' no queue for the incoming packets, so you can't use
> HTB'? For now i am not applying IMQ for the ingress, but using packet
> mangling under iptables to handle both incoming packets from internet and
> outgoing packets to internet. Is this not right? give me your opinion
> please, as far as i can see, there were no troubles using packet mangling
> to handle those situation.
What do you mean with packet mangling?  
And it's not because there is no queue for incoming packets that you can't do 
anything with time.  The filter + policer setup can rate limit incoming 
packets.  Iptables can also do rate limiting.

Stef

-- 
[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/


Re: [LARTC] >10Mbit on HTB

2003-10-13 Thread Rio Martin
On Tuesday 14 October 2003 01:51, Stef Coene wrote:
> On Monday 13 October 2003 16:17, Kristiadi Himawan wrote:
> > Oh ok, it's working now. The script is fine.
> > My test tool isn't accurate.
> > Now i have test with iperf and get accurate result.
> > Other question ...:)
> > which ingress qdisc that accurate like htb?
> None.  Htb is an egress qdisc so it shapes outgoing traffic.  An ingress
> qdisc handles the incoming packets.  And there is no queue for the incoming
> packets, so you can't use htb.  You can use filteres + policers to rate
> limit traffic.  Or you may take a look at the imq device.  This is a
> virtual device.  You can redirect all incoming packets to it and use htb on
> the imq device.

Hi Stef,
What do you mean by ' no queue for the incoming packets, so you can't use 
HTB'? For now i am not applying IMQ for the ingress, but using packet 
mangling under iptables to handle both incoming packets from internet and 
outgoing packets to internet. Is this not right? give me your opinion please, 
as far as i can see, there were no troubles using packet mangling to handle 
those situation.

Regards,
Rio Martin.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] >10Mbit on HTB

2003-10-13 Thread Stef Coene
On Monday 13 October 2003 16:17, Kristiadi Himawan wrote:
> Oh ok, it's working now. The script is fine.
> My test tool isn't accurate.
> Now i have test with iperf and get accurate result.
>
> Other question ...:)
> which ingress qdisc that accurate like htb?
None.  Htb is an egress qdisc so it shapes outgoing traffic.  An ingress qdisc 
handles the incoming packets.  And there is no queue for the incoming 
packets, so you can't use htb.  You can use filteres + policers to rate limit 
traffic.  Or you may take a look at the imq device.  This is a virtual 
device.  You can redirect all incoming packets to it and use htb on the imq 
device.

Stef

-- 
[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/


Re: [LARTC] >10Mbit on HTB

2003-10-13 Thread Kristiadi Himawan
Oh ok, it's working now. The script is fine.
My test tool isn't accurate.
Now i have test with iperf and get accurate result.

Other question ...:)
which ingress qdisc that accurate like htb?

Thnx

- Original Message - 
From: "Rio Martin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 13, 2003 1:07 PM
Subject: Re: [LARTC] >10Mbit on HTB


> On Monday 13 October 2003 12:16, Catalin BOIE wrote:
> > On Sat, 11 Oct 2003, Kristiadi Himawan wrote:
> > > I want to try to shape 20-30Mbps traffic using HTB.
> > > It's possible? Anyone already try this?
> > Yes. It's working very good.
> > You may want to use hashes if you have a lot of filters.
> > > Thanks.
> 
> Mine also,
> Here goes the result:
> 
> ### eth1: traffic classes
> class htb 1:10 root leaf 10: prio 0 rate 20Mbit ceil 20Mbit burst 27810b 
> cburst 27810b
>  Sent 290896540 bytes 192377 pkts (dropped 0, overlimits 0)
>  rate 2545587bps 1683pps backlog 4p
>  lended: 192373 borrowed: 0 giants: 0
>  tokens: -8887 ctokens: -8887
> 
> Regards,
> Rio Martin.
> --
> NOC ITENAS-net
> www.itenas.ac.id
> ___
> LARTC mailing list / [EMAIL PROTECTED]
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> 

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] >10Mbit on HTB

2003-10-12 Thread Rio Martin
On Monday 13 October 2003 12:16, Catalin BOIE wrote:
> On Sat, 11 Oct 2003, Kristiadi Himawan wrote:
> > I want to try to shape 20-30Mbps traffic using HTB.
> > It's possible? Anyone already try this?
> Yes. It's working very good.
> You may want to use hashes if you have a lot of filters.
> > Thanks.

Mine also,
Here goes the result:

### eth1: traffic classes
class htb 1:10 root leaf 10: prio 0 rate 20Mbit ceil 20Mbit burst 27810b 
cburst 27810b
 Sent 290896540 bytes 192377 pkts (dropped 0, overlimits 0)
 rate 2545587bps 1683pps backlog 4p
 lended: 192373 borrowed: 0 giants: 0
 tokens: -8887 ctokens: -8887

Regards,
Rio Martin.
--
NOC ITENAS-net
www.itenas.ac.id
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] >10Mbit on HTB

2003-10-12 Thread Catalin BOIE
On Sat, 11 Oct 2003, Kristiadi Himawan wrote:

> I want to try to shape 20-30Mbps traffic using HTB.
> It's possible? Anyone already try this?

Yes. It's working very good.
You may want to use hashes if you have a lot of filters.

>
> Thanks.
>

---
Catalin(ux) BOIE
[EMAIL PROTECTED]
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] >10Mbit on HTB

2003-10-11 Thread Jose Luis Domingo Lopez
On Saturday, 11 October 2003, at 21:28:10 +0700,
Kristiadi Himawan wrote:

> Below is the script:
> [snipped]
> 
The script seems correct, and very similar to what I use, except I don't
even need to set up a "filter" to direct traffic, because in my tests I
just need to limit the output to some speed.


> When i try to shape 20Mbit, there's dropped packet but i see the bandwidth not 
> shaped to 20Mbit.
> But when shape to 10Mbit, i see the bandwidth down to 13Mbit.
> 
Some time ago there was a report from someone who tried HTB in 2.5.x
kernels and saw a strange behaviour. For details, check:
http://bugme.osdl.org/show_bug.cgi?id=657

In short, it seems bandwidth limiting behaves strange for different
outgoing packet sizes.

Regards.

-- 
Jose Luis Domingo Lopez
Linux Registered User #189436 Debian Linux Sid (Linux 2.6.0-test6-mm4-lirc)
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] >10Mbit on HTB

2003-10-11 Thread Jose Luis Domingo Lopez
On Saturday, 11 October 2003, at 20:01:04 +0700,
Kristiadi Himawan wrote:

> I want to try to shape 20-30Mbps traffic using HTB.
> It's possible? Anyone already try this?
> 
Very well possible, and you don't need great hardware for this, if you
don't have a rather complex classification scenario.

Just for the record, in the middle of some network performance test for
some sort of appliance I capped outgoing speed to 25 Mbps on my PIII 600
MHz with a 3Com 100 Mbps card, and the box barely spends 1-2 % of CPU
transmitting at "full" speed (full = 25 Mbps).

Hope it helps.

-- 
Jose Luis Domingo Lopez
Linux Registered User #189436 Debian Linux Sid (Linux 2.6.0-test6-mm4-lirc)
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] >10Mbit on HTB

2003-10-11 Thread Kristiadi Himawan



Below is the script:
 
tc qdisc del dev eth2 roottc qdisc add dev eth2 
root handle 1 htb default 10 r2q 100
 
tc class add dev eth2 parent 1: classid 1:2 htb 
rate 100Mbit
 
tc class add dev eth2 parent 1:2 classid 1:10 htb 
rate 20Mbit ceil 20Mbittc filter add dev eth2 parent 1:0 protocol ip prio 
100 u32 match ip dst 202.xx.xxx.xx/26 classid 1:10
 
When i try to shape 20Mbit, there's dropped packet 
but i see the bandwidth not shaped to 20Mbit.
But when shape to 10Mbit, i see the bandwidth down 
to 13Mbit.
 
Any comment with this?
 
Thanks.
 
 


[LARTC] >10Mbit on HTB

2003-10-11 Thread Kristiadi Himawan



I want to try to shape 20-30Mbps traffic using 
HTB.
It's possible? Anyone already try this?
 
Thanks.