Re: [LARTC] wondershaper.htb problem

2004-05-13 Thread Natxo Asenjo
On Thu, 13  May  2004,  09:28:17PM +0200¨, Andreas Klauer said:
> Am Thursday 13 May 2004 19:38 schrieb Natxo Asenjo:
> > + tc qdisc add dev ppp0 root handle 1: htb default 30
> > RTNETLINK answers: Invalid argument
> 
> Wrong tc.
 
yes, I thought so :)

> > HTB init, kernel part version 3.16
> > HTB: need tc/htb version 3 (minor is 16), you have 10
> >
> > And I do not know where I can get another version of this for debian
> > woody.
> 
> >From the HTB homepage. Both patch and binary are available.
> http://luxik.cdi.cz/~devik/qos/htb/
 
ok, I had already tried the tc binary for htb2 code, but it obviously
did not work. Now I have the good one for htb3, all is fine.

Thanks,

N.Asenjo
> HTH
> Andreas
> ___
> 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] HTB MPU

2004-05-13 Thread Jason Boxman
On Thursday 13 May 2004 13:28, Andreas Klauer wrote:
> Am Thursday 13 May 2004 16:38 schrieb Andreas Klauer:
> > Am Thursday 13 May 2004 15:54 schrieb Andy Furniss:
> > > I've just noticed that there is a patch on devik's site which does mpu
> > > and overhead.
> >
> > I'll give it a try. Thanks for the hint.
>
> Well, patching was a little difficult... it didn't like the debian patch
> and I didn't succeed in joining the two patches together because of the
> weird inject stuff. But anyway.  It seems to work, and it looks useful, so
> I added it to the "Hacks" section of my Fair NAT script together with a
> patched binary.

Nifty.

But how do you determine what your minimum packet unit (MPU) is?  How about 
overhead for a PPPoE connection?

With shaping I can max my upstream and still maintain ~ 120ms ping times, but 
I'd like to get it down to around ~ 70ms.

> Andreas

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


Re: [LARTC] Bandwith thinking error

2004-05-13 Thread Lars Oeschey
Jason Boxman wrote:

I imagine you set $DEV to ethX, right?  (In the original script it was ppp0.)

 

yep...

<>You'll need to patch your kernel to use either one and they both 
have IPTables
components you will need to use to match traffic. IPP2P needs CONNMARK,
which is available in patch-o-matic for Netfilter. Be advised that you 
need
the CVS version of IPTables to use CONNMARK with 2.6. IPP2P and CONNMARK
work well on my 2.4.24 kernel with the CONNMARK patch from patch-o-matic.
(The non -ng variant.) I also recommend the CLASSIFY patch if you are 
going
to be using IPTables anyway.

ah, I wanted to avoid kernel compiling since I run a specialized debian 
that's mainly intended as vdr server... I'm a bit afraid of  destryoing 
something with vdr ;) I blew the system up a bit to make it a universal 
server, which was easy with debian, but I still got away without kernel 
compiling...

Lars

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


Re[2]: [LARTC] Multipath Connection problem on RH-8.0

2004-05-13 Thread Julian Anastasov

Hello,

On Thu, 13 May 2004, Robert Kurjata wrote:

> JA>   To all: do you have some working script(s) that we can
> JA> recommend for setups with 2 or 3 uplinks in multipath route? Then we
> JA> can link them to the web page as reference.
> [cut]
> I've posted one in 2 links version. Now I'm using slightly extended
> version for 4 links with policy routing :)

Thank you, it is now linked. May be in the following days
I'll try to create advanced version.

> http://mailman.ds9a.nl/pipermail/lartc/2003q4/010372.html

Regards

--
Julian Anastasov <[EMAIL PROTECTED]>
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Bandwith thinking error

2004-05-13 Thread Jason Boxman
On Thursday 13 May 2004 14:59, Lars Oeschey wrote:
> Andreas Klauer wrote:
> >The modified wondershaper is here:
> >http://www.metamorpher.de/files/wshaper-over-lan.htb
>
> I tested the script now, it works good so far in that LAN traffic isn't
> slowed down anymore . But when p2p has full Bandwidth, http over the
> proxy is very slow. I would like that p2p just gets the bandwidth thats
> left over after http, is that possible? What I tried with the original
> script was this, could that work?

I imagine you set $DEV to ethX, right?  (In the original script it was ppp0.)

Anyway, as to the p2p traffic, it is usually pretty pervasive.  You will need 
to use something like IPP2P or L7-Filter to catch it and stick it in a p2p or 
bulk class.  I found that for edonkey, for example, matching on port 4662 
only caught 80% of the traffic in the best case scenario and 50% in the 
worst, making things like HTTP virtually unusable.

You'll need to patch your kernel to use either one and they both have IPTables 
components you will need to use to match traffic.  IPP2P needs CONNMARK, 
which is available in patch-o-matic for Netfilter.  Be advised that you need 
the CVS version of IPTables to use CONNMARK with 2.6.  IPP2P and CONNMARK 
work well on my 2.4.24 kernel with the CONNMARK patch from patch-o-matic.  
(The non -ng variant.)  I also recommend the CLASSIFY patch if you are going 
to be using IPTables anyway.

I have found that for the simple case of traffic shaping, it is actually easy 
to write your own basic script to handle it.  Wondershaper is a nice template 
to start with.  The usual procedure is 1) decide on classes and leafs and 
define them with `tc` and 2) decide how best to match traffic destined for 
your classes, using either `tc` or IPTables, and define matching rules.

> tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \
>match ip dport 3128 0x flowid 1:10
>
> tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \
>match ip sport 3128 0x flowid 1:10
>
> tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \
>match ip dport 80 0x flowid 1:10
>
> tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \
>match ip sport 80 0x flowid 1:10
>
> Lars

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


Re: [LARTC] help setting up router

2004-05-13 Thread Jason Boxman
On Thursday 13 May 2004 06:34, calin popa wrote:
> Hi,  my name is Calin and I'm new to linux, but I guess its the right place
> to ask this:
>
> what do I set on  a linux RH9 box with 2.4.24 kernel to route a 10 machine
> private network (192.168.x.x) by 3 limited bandwidth, public IPs
> (193.231.x.x). The network uses a switch, the linux box has 1 ethernet
> card, the link is available trough a wireles ethernet bridge from my ISP.
>
> I begun to read routing and IP howtos. I thing that  I need some virtual
> ethernet adapters and SNAT routing.

It sounds like you want to use NAT.  Stick another NIC in your Linux box and 
configure it as your gateway.  All of that is rather simple.  I'd suggest 
these documents:

http://iptables-tutorial.frozentux.net/iptables-tutorial.html
http://www.linux-ip.net/html/

If you want to load balance across your three public IPs or do traffic shaping 
across the wireless link, that's more ARTC.

> tia
>

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


Re: [LARTC] wondershaper.htb problem

2004-05-13 Thread Andreas Klauer
Am Thursday 13 May 2004 19:38 schrieb Natxo Asenjo:
> + tc qdisc add dev ppp0 root handle 1: htb default 30
> RTNETLINK answers: Invalid argument

Wrong tc.

> HTB init, kernel part version 3.16
> HTB: need tc/htb version 3 (minor is 16), you have 10
>
> And I do not know where I can get another version of this for debian
> woody.

From the HTB homepage. Both patch and binary are available.
http://luxik.cdi.cz/~devik/qos/htb/

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


Re: [LARTC] Bandwith thinking error

2004-05-13 Thread Andreas Klauer
Am Thursday 13 May 2004 20:59 schrieb Lars Oeschey:
> Andreas Klauer wrote:
> >The modified wondershaper is here:
> >http://www.metamorpher.de/files/wshaper-over-lan.htb
>
> I would like that p2p just gets the bandwidth thats
> left over after http, is that possible?

It's hard to get the P2P stuff right. First of all, it's usually
download traffic - but Wondershaper only shapes upload traffic.
Second of all, what is P2P traffic? Matching http protocol probably won't 
work, since some P2P programs also use HTTP. (IIRC BitTorrent uses http to 
communicate with the tracker). If you're only prioritizing specific port, 
you'll find many other forms of communications (chats, ftp, whatever) be 
slow because that's put into same class as P2P too.

> What I tried with the original 
> script was this, could that work?
>
> tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \
>match ip dport 3128 0x flowid 1:10
>
> tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \
>match ip sport 3128 0x flowid 1:10

3128 is a http port? I didn't know >_>

> tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \
>match ip dport 80 0x flowid 1:10
>
> tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \
>match ip sport 80 0x flowid 1:10

That'd be bad for interactive connections... change default to 30,
lower rate for 30 (low rate, high ceil, large prio, so the class has to
borrow everything). Put http traffic into 20. Wondershaper's rate settings
are weird anyway - sum of child rates is much larger than parent rate.

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


Re: [LARTC] Bandwith thinking error

2004-05-13 Thread Lars Oeschey
Andreas Klauer wrote:

The modified wondershaper is here:
   http://www.metamorpher.de/files/wshaper-over-lan.htb
 

I tested the script now, it works good so far in that LAN traffic isn't 
slowed down anymore . But when p2p has full Bandwidth, http over the 
proxy is very slow. I would like that p2p just gets the bandwidth thats 
left over after http, is that possible? What I tried with the original 
script was this, could that work?

tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \
  match ip dport 3128 0x flowid 1:10
tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \
  match ip sport 3128 0x flowid 1:10
tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \
  match ip dport 80 0x flowid 1:10
tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \
  match ip sport 80 0x flowid 1:10
Lars
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] wondershaper.htb problem

2004-05-13 Thread Natxo Asenjo
hi there,

this is my 1st message in the list. 

I would like to use this wondershaper.htb to limit the bandwith usage at
home. 

My kernel config is:

# QoS and/or fair queueing
#
CONFIG_NET_SCHED=y
CONFIG_NET_SCH_CBQ=y
CONFIG_NET_SCH_HTB=y
CONFIG_NET_SCH_CSZ=y
CONFIG_NET_SCH_HFSC=y
CONFIG_NET_SCH_PRIO=y
CONFIG_NET_SCH_RED=y
CONFIG_NET_SCH_SFQ=y
CONFIG_NET_SCH_TEQL=y
CONFIG_NET_SCH_TBF=y
CONFIG_NET_SCH_GRED=y
CONFIG_NET_SCH_DELAY=y
CONFIG_NET_SCH_DSMARK=y
CONFIG_NET_SCH_INGRESS=y
CONFIG_NET_QOS=y
CONFIG_NET_ESTIMATOR=y
CONFIG_NET_CLS=y
CONFIG_NET_CLS_TCINDEX=y
CONFIG_NET_CLS_ROUTE4=y
CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_FW=y
CONFIG_NET_CLS_U32=y
CONFIG_NET_CLS_RSVP=y
CONFIG_NET_CLS_RSVP6=y
CONFIG_NET_CLS_POLICE=y

I've got the iproute package (in debian woody according to the
changelog, there is support for htb).

When I try to use the wondershaperscript with the -x flag for verbosity
I get the following:

+ DOWNLINK=1000
+ UPLINK=300
+ DEV=ppp0
+ NOPRIOHOSTSRC=
+ NOPRIOHOSTDST=
+ '[' start = status ']'
+ tc qdisc del dev ppp0 root
+ tc qdisc del dev ppp0 ingress
+ '[' start = stop ']'
+ tc qdisc add dev ppp0 root handle 1: htb default 30
RTNETLINK answers: Invalid argument
+ tc class add dev ppp0 parent 1: classid 1:1 htb rate 300kbit burst 6k
RTNETLINK answers: No such file or directory
+ tc class add dev ppp0 parent 1:1 classid 1:10 htb rate 300kbit burst 6k prio 1
RTNETLINK answers: No such file or directory
+ tc class add dev ppp0 parent 1:1 classid 1:20 htb rate 150kbit ceil 80kbit burst 6k 
prio 2

and more lines similar to those ones. So most things go ok but I do not
understand the RTNETLINK lines. Is that ok? I could not find an answer
in google.

I also see in dmsg this:

HTB init, kernel part version 3.16
HTB: need tc/htb version 3 (minor is 16), you have 10

And I do not know where I can get another version of this for debian
woody.

I am sure this is a FAQ, but I could not find the answer, I am sorry :(

Greetings,

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


Re: [LARTC] HFSC

2004-05-13 Thread Lawrence MacIntyre
Patrick:

I tried that filter line, but it has incorrect syntax.  But that isn't 
the problem.  The problem is the HFSC part...  The traffic is indeed UDP 
port 1234, and the HFSC qdisc functions for a short period of time 
(between 5 and 60 seconds or so, and then stops passing any traffic on 
the eth0 interface.  You can look with ethereal, and the interface is 
totally silent.  Even weirder, if you wait, periodically (every several 
minutes or so) you get another period of working.  These are typically 
5-10 seconds.  What do I need to do to debug this?  The machine is a 
dual Xeon, if that matters.

Patrick McHardy wrote:
Lawrence MacIntyre wrote:

Thanks, Patrick.  That makes it a bit harder to manage from a remote 
machine.  I'll have to be very careful with that.  I'll try to figure 
out the implications of the default classification and send more email 
if I can't get it.

So I reordered the commands and changed them around.  It looks like I 
am either doing something strange or I have found a bug.  When I 
execute the following script, the UDP traffic on port 1234 continues 
for a few seconds and then stops.  When I examine the tc data, it 
shows no change in the periods or amount of bytes flowing after the 
flow stops.  I am enclosing the command  and the output.


It is indeed strange. Only the qdisc drop counter is incremented, which
means the packets are still unclassified. What happens if you change
your filter to:
/usr/local/bin/tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 
match udp dport 1234 0x flowid 1:10 (match udp instead of ip)

Are you sure the packets are sent to port 1234 ?

Regards
Patrick
--
Lawrence MacIntyre 865.574.8696 [EMAIL PROTECTED]
   Oak Ridge National Laboratory
High Performance Information Infrastructure Technology Group
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Bandwith especification.

2004-05-13 Thread Stef Coene
On Thursday 13 May 2004 16:05, Carles Xavier Munyoz Baldó wrote:
> Hi,
> If I have a DSL router with 300kpbs upload bandwith:
> Linux(eth0) ---(100Mbps)---> DSL ---(300kbps)---> INTERNET
>
> Which is the recomended value I must set in my QoS setup for the maximum
> outbound bandwith of my ethernet interface ?
> The max of 300kbps or something less like 290kbps ?
>
> Especify less than the maximum available bandwith is advisable to ensure
> that the QoS algoritms goes fine, isn't it ?
Yes.

Staf

-- 
[EMAIL PROTECTED]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB MPU

2004-05-13 Thread Andreas Klauer
Am Thursday 13 May 2004 16:38 schrieb Andreas Klauer:
> Am Thursday 13 May 2004 15:54 schrieb Andy Furniss:
> > I've just noticed that there is a patch on devik's site which does mpu
> > and overhead.
>
> I'll give it a try. Thanks for the hint.

Well, patching was a little difficult... it didn't like the debian patch 
and I didn't succeed in joining the two patches together because of the 
weird inject stuff. But anyway.  It seems to work, and it looks useful, so 
I added it to the "Hacks" section of my Fair NAT script together with a 
patched binary.

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


Re: [LARTC] HTB MPU

2004-05-13 Thread Andreas Klauer
Am Thursday 13 May 2004 15:54 schrieb Andy Furniss:
> I've just noticed that there is a patch on devik's site which does mpu
> and overhead.
>
> http://luxik.cdi.cz/~devik/qos/htb/

Great, all the gems are hidden in the Changelog. ;-)

Direct link:
http://luxik.cdi.cz/~devik/qos/htb/v3/htb_tc_overhead.diff

I'll give it a try. Thanks for the hint.

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


Re: [LARTC] HFSC

2004-05-13 Thread Patrick McHardy
Lawrence MacIntyre wrote:
Thanks, Patrick.  That makes it a bit harder to manage from a remote 
machine.  I'll have to be very careful with that.  I'll try to figure 
out the implications of the default classification and send more email 
if I can't get it.

So I reordered the commands and changed them around.  It looks like I am 
either doing something strange or I have found a bug.  When I execute 
the following script, the UDP traffic on port 1234 continues for a few 
seconds and then stops.  When I examine the tc data, it shows no change 
in the periods or amount of bytes flowing after the flow stops.  I am 
enclosing the command  and the output.
It is indeed strange. Only the qdisc drop counter is incremented, which
means the packets are still unclassified. What happens if you change
your filter to:
/usr/local/bin/tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 
match udp dport 1234 0x flowid 1:10 (match udp instead of ip)

Are you sure the packets are sent to port 1234 ?

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


[LARTC] HTB MPU

2004-05-13 Thread Andy Furniss
Hi.

I wrote in a reply to a mail on here recently that you can't set mpu 
(minimum packet unit) on HTB as you can on CBQ.

I've just noticed that there is a patch on devik's site which does mpu 
and overhead.

http://luxik.cdi.cz/~devik/qos/htb/

For dsl users mpu is, for practical purposes going to be 106 - overhead 
is still variable though, depending on packet size.

Having these should let you push upstream bandwidth rates a bit closer 
to the limit.

Andy.

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


Re: [LARTC] Bandwith thinking error

2004-05-13 Thread Andreas Klauer
Am Thursday 13 May 2004 15:48 schrieb Lars Oeschey:
> err, not really, it's just that http/mail etc. wins over p2p ;)

If you want to detect P2P traffic, have a look into this:
http://rnvs.informatik.uni-leipzig.de/ipp2p/index_en.html

My Fair NAT script supports it. It works well for me. :-)

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


[LARTC] Bandwith especification.

2004-05-13 Thread Carles Xavier Munyoz Baldó
Hi,
If I have a DSL router with 300kpbs upload bandwith:
Linux(eth0) ---(100Mbps)---> DSL ---(300kbps)---> INTERNET

Which is the recomended value I must set in my QoS setup for the maximum 
outbound bandwith of my ethernet interface ?
The max of 300kbps or something less like 290kbps ?

Especify less than the maximum available bandwith is advisable to ensure that 
the QoS algoritms goes fine, isn't it ?

Greetings.
---
Carles Xavier Munyoz Baldó
[EMAIL PROTECTED]
http://www.unlimitedmail.net/
---

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


Re: [LARTC] HFSC

2004-05-13 Thread Lawrence MacIntyre
Thanks, Patrick.  That makes it a bit harder to manage from a remote 
machine.  I'll have to be very careful with that.  I'll try to figure 
out the implications of the default classification and send more email 
if I can't get it.

So I reordered the commands and changed them around.  It looks like I am 
either doing something strange or I have found a bug.  When I execute 
the following script, the UDP traffic on port 1234 continues for a few 
seconds and then stops.  When I examine the tc data, it shows no change 
in the periods or amount of bytes flowing after the flow stops.  I am 
enclosing the command  and the output.

Thanks again!

Patrick McHardy wrote:
Lawrence MacIntyre wrote:

/usr/local/bin/tc qdisc add dev eth0 root handle 1: hfsc

/usr/local/bin/tc class add dev eth0 parent 1: classid 1:1 hfsc ul m1 
30mbit d 0 m2 30mbit ls m1 30mbit d 0 m2 30mbit

When the second command is executed, the machine simply drops all 
packets going through it.


Unlike HTB, HFSC drops unclassified packets. You need to setup filters
or use the "default" classification.
Regards
Patrick
--
Lawrence MacIntyre 865.574.8696 [EMAIL PROTECTED]
   Oak Ridge National Laboratory
High Performance Information Infrastructure Technology Group
#!/bin/bash
/usr/local/bin/tc qdisc add dev eth0 root handle 1: hfsc 

/usr/local/bin/tc class add dev eth0 parent 1: classid 1:1 hfsc ul m1 80mbit d 500 m2 30mbit ls m1 80mbit d 500 m2 30mbit
/usr/local/bin/tc class add dev eth0 parent 1:1 classid 1:10 hfsc ls m1 50mbit d 500 m2 20mbit
/usr/local/bin/tc class add dev eth0 parent 1:1 classid 1:11 hfsc ls m1 20mbit d 500 m2 10mbit
/usr/local/bin/tc class add dev eth0 parent 1:1 classid 1:12 hfsc ls m1 10mbit d 500 m2 10mbit

/usr/local/bin/tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 1234 0x flowid 1:10
/usr/local/bin/tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 5001 0x flowid 1:11
/usr/local/bin/tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 22 0x flowid 1:12
/usr/local/bin/tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip sport 22 0x flowid 1:12
[EMAIL PROTECTED] QoS]# ./tcshow.conf
class hfsc 1: root
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 0 level 2
 
class hfsc 1:11 parent 1:1 ls m1 20Mbit d 500us m2 10Mbit
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 0 level 0
 
class hfsc 1:1 parent 1: ls m1 80Mbit d 500us m2 30Mbit ul m1 80Mbit d 500us m2
30Mbit
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 492 work 7280180 bytes level 1
 
class hfsc 1:10 parent 1:1 ls m1 50Mbit d 500us m2 20Mbit
 Sent 7280180 bytes 5314 pkts (dropped 0, overlimits 0)
 period 492 work 7280180 bytes level 0
 
class hfsc 1:12 parent 1:1 ls m1 10Mbit d 500us m2 10Mbit
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 0 level 0
 
qdisc hfsc 1:
 Sent 7280180 bytes 5314 pkts (dropped 0, overlimits 6570)
filter parent 1: protocol ip pref 1 u32
filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0
flowid 1:10
  match 04d2/ at 20
filter parent 1: protocol ip pref 1 u32 fh 800::801 order 2049 key ht 800 bkt 0
flowid 1:11
  match 1389/ at 20
filter parent 1: protocol ip pref 1 u32 fh 800::802 order 2050 key ht 800 bkt 0
flowid 1:12
  match 0016/ at 20
filter parent 1: protocol ip pref 1 u32 fh 800::803 order 2051 key ht 800 bkt 0
flowid 1:12
  match 0016/ at 20
[EMAIL PROTECTED] QoS]# ./tcshow.conf
class hfsc 1: root
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 0 level 2
 
class hfsc 1:11 parent 1:1 ls m1 20Mbit d 500us m2 10Mbit
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 0 level 0
 
class hfsc 1:1 parent 1: ls m1 80Mbit d 500us m2 30Mbit ul m1 80Mbit d 500us m2
30Mbit
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 965 work 14246630 bytes level 1
 
class hfsc 1:10 parent 1:1 ls m1 50Mbit d 500us m2 20Mbit
 Sent 14246630 bytes 10399 pkts (dropped 0, overlimits 0)
 period 965 work 14246630 bytes level 0
 
class hfsc 1:12 parent 1:1 ls m1 10Mbit d 500us m2 10Mbit
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 period 0 level 0
 
qdisc hfsc 1:
 Sent 14246630 bytes 10399 pkts (dropped 32, overlimits 12895)
filter parent 1: protocol ip pref 1 u32
filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0
flowid 1:10
  match 04d2/ at 20
filter parent 1: protocol ip pref 1 u32 fh 800::801 order 2049 key ht 800 bkt 0
flowid 1:11
  match 1389/ at 20
filter parent 1: protocol ip pref 1 u32 fh 800::802 order 2050 key ht 800 bkt 0
flowid 1:12
  match 0016/ at 20
filter parent 1: protocol ip pref 1 u32 fh 800::803 order 2051 key ht 800 bkt 0
flowid 1:12
  match 0016/ at 20
[EMAIL PROTECTED] QoS]# ./tcshow.conf
class hfsc 1: root

Re: [LARTC] Bandwith thinking error

2004-05-13 Thread Lars Oeschey


> Am Thursday 13 May 2004 09:06 schrieb Lars Oeschey:

> Read in the LARTC Howto (www.lartc.org) about it.

just did ;)

>> There's just me and my wife,
> You need shaping so badly if there are only two users?

err, not really, it's just that http/mail etc. wins over p2p ;)

> If you want every traffic to go through your linux box, remove the
> router  from the LAN, connect it directly to your box and let your
> box do the  routing for your wife. In case your box can go online
> directly, sell the  router.

mh, been there, done that... I come from fli4l, and was glad that I
could switch to that tiny little router-device ;)I think when I can just priorise 
squid over p2p stuff, everything
should be fine
> I just modified the wondershaper script a little. You could test if
> it actually works. I couldn't test it, since I have a dedicated
> linux box  doing the routing.
> The modified wondershaper is here:

cool, thanks a lot for that... I'll check it out when I'm home today!

Lars

-- 
visit the C.O.R.E. http://www.the-core.net


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


Re: [LARTC] HFSC

2004-05-13 Thread Patrick McHardy
Lawrence MacIntyre wrote:
/usr/local/bin/tc qdisc add dev eth0 root handle 1: hfsc

/usr/local/bin/tc class add dev eth0 parent 1: classid 1:1 hfsc ul m1 
30mbit d 0 m2 30mbit ls m1 30mbit d 0 m2 30mbit

When the second command is executed, the machine simply drops all 
packets going through it.
Unlike HTB, HFSC drops unclassified packets. You need to setup filters
or use the "default" classification.
Regards
Patrick
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] TCP rate control library.

2004-05-13 Thread Carles Xavier Munyoz Baldó
Hi,
Anyone here knows if is there any TCP rate control C library ?

I have a server program to which users authenticate to access its services.
The problem is that some users takes lot of bandwidth, disturbing the 
performance of the other connected users.

I have used QoS to advoid that a single user takes all the bandwidth buy I 
would like to go more far and limit the bandwidth of this "bad" users.
Is there any C library for it ?

Greetings.
---
Carles Xavier Munyoz Baldó
[EMAIL PROTECTED]
http://www.unlimitedmail.net/
---

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


Re: [LARTC] Bandwith thinking error

2004-05-13 Thread Andreas Klauer
Am Thursday 13 May 2004 09:06 schrieb Lars Oeschey:

> err, what's ingress?

Read in the LARTC Howto (www.lartc.org) about it.
Wondershaper does it for limiting incoming traffic.
The real classful shaping can only be done for outgoing traffic.
(Well, probably unless you're using IMQ, but Wondershaper doesn't).

> There's the occasional http traffic to the router for configuration
> (it's the current t-online WLan device), but that's quite rare and I
> don't care if it's a bit slow then (hey, I already worked with imap
> over 384k in my LAN ;)).

Never mind that, I figured it should be easy to get the filters right.

> There's just me and my wife, 

You need shaping so badly if there are only two users?

> I will transfer her pop3 access to the linux-box w/fetchmail some day, so
> every traffic goes through the linux-box.

If you want every traffic to go through your linux box, remove the router 
from the LAN, connect it directly to your box and let your box do the 
routing for your wife. In case your box can go online directly, sell the 
router.

> Are there any tools to define the shaping? Or do I really have to
> write it from scratch?

I just modified the wondershaper script a little. You could test if it
actually works. I couldn't test it, since I have a dedicated linux box 
doing the routing.

The modified wondershaper is here:
http://www.metamorpher.de/files/wshaper-over-lan.htb

Here's an image of the class structure it creates:
http://www.metamorpher.de/files/wshaper-over-lan.png

This image was created with Graphviz. I just love this program :-)
I used a hacked version of Stef Coene's show.pl to generate the graph.
Still have problems parsing the filter output, though...

The blue boxes are qdiscs, the orange house is a root class, the green eggs 
are normal classes. Green arrows go to the root class, red arrows go to 
the leafs. :-) It doesn't show filters though, except for mark handles... 
tc filter output isn't easy to parse.

The LAN traffic should go into the fat egg on the right. The internet
traffic should go into the smaller egg on the left (and into it's 
children).

Use "wshaper-over-lan.htb status" to see if it actually works.
If you produce both traffic in the LAN and on the internet,
the LAN traffic should show up in class 1:3, the internet traffic in class 
1:1 and it's children.

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


Re: [LARTC] ip_conntrack_ftp

2004-05-13 Thread Andy Furniss
raptor wrote:
tryng to access ftp servers from inside...
Well I am not sure - I would be double checking all scripts for 
typos/brainos. You haven't posted evrything you use - and even if you 
did I am no netfilter/firewalling expert. The netfilter list is probably 
a better place for this sort of issue.

Andy.

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


[LARTC] help setting up router

2004-05-13 Thread calin popa
Hi,  my name is Calin and I'm new to linux, but I guess its the right place to ask 
this:

what do I set on  a linux RH9 box with 2.4.24 kernel to route a 10 machine private 
network (192.168.x.x) by 3 limited bandwidth, public IPs (193.231.x.x). The network 
uses a switch, the linux box has 1 ethernet card, the link is available trough a 
wireles ethernet bridge from my ISP.

I begun to read routing and IP howtos. I thing that  I need some virtual ethernet 
adapters and SNAT routing.

tia






Home, no matter how far...
http://www.home.ro
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re[2]: [LARTC] Multipath Connection problem on RH-8.0

2004-05-13 Thread Robert Kurjata
Hello Julian,

Thursday, May 13, 2004, 9:23:27 AM, you wrote:


JA> Hello,

JA> To all: do you have some working script(s) that we can
JA> recommend for setups with 2 or 3 uplinks in multipath route? Then we
JA> can link them to the web page as reference.
[cut]
I've posted one in 2 links version. Now I'm using slightly extended
version for 4 links with policy routing :)

http://mailman.ds9a.nl/pipermail/lartc/2003q4/010372.html


-- 
Best regards,
 Robertmailto:[EMAIL PROTECTED]

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


Re: [LARTC] Multipath Connection problem on RH-8.0

2004-05-13 Thread Julian Anastasov

Hello,

To all: do you have some working script(s) that we can
recommend for setups with 2 or 3 uplinks in multipath route? Then we
can link them to the web page as reference.

On Thu, 13 May 2004, Muhammad Reza wrote:

> now i downgrade to rh-7.2 (2.4.20-w/ julian patch)and iproute version
> iproute2-ss010824.
> but still cant do multipath routing.

Then can you explain what you learned from "2.4 Keeping them alive"
and what you have to keep the state for each GW from the multipath route
valid?

> this is my trace with ip route get;
> [EMAIL PROTECTED] root]# ip route get 202.138.253.17
> 202.138.253.17 via 172.16.0.1 dev eth0 src 172.16.0.232
> cache mtu 1500 advmss 1460
> [EMAIL PROTECTED] root]# ip route get 202.138.253.17 from 192.168.0.2
> 202.138.253.17 from 192.168.0.2 via 192.168.0.1 dev eth1
> cache mtu 1500 advmss 1460
> [EMAIL PROTECTED] root]# ip route get 202.138.253.17 from 172.16.0.232
> 202.138.253.17 from 172.16.0.232 via 172.16.0.1 dev eth0
> cache mtu 1500 advmss 1460
> [EMAIL PROTECTED] root]# ip route list table main
> 192.168.0.0/30 dev eth1 proto kernel scope link src 192.168.0.2

This is strange:

> 172.16.0.0/24 dev eth0 scope link
> 10.10.10.0/24 dev eth2 scope link

It means your settings are not created from script.
Also, the script does not bring dev eth0 up, there is a missing
"up".

> 127.0.0.0/8 dev lo scope link
> [EMAIL PROTECTED] root]# ip route list table MRA
> default via 172.16.0.1 dev eth0 proto static src 172.16.0.232
> prohibit default proto static metric 1

What do you have in table ADSL?

Can you provide output from:

ip addr
ip rule
ip route list table all

> [EMAIL PROTECTED] root]# ip route list table DEF
> default proto static
> nexthop via 172.16.0.1 dev eth0 weight 1
> nexthop via 192.168.0.1 dev eth1 weight 1
>
> with this configuration i still couldn connect to internet

From where? What shows tcpdump -ln ... ?

> regards
> reza

Regards

--
Julian Anastasov <[EMAIL PROTECTED]>
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Bandwith thinking error

2004-05-13 Thread Lars Oeschey



> You have to add your filters then to the DSL class instead of
> parent qdisc, and a filter in the parent qdisc that puts packets
> that go to the Router IP into the DSL class. Or modify your filters
> so that they only apply to  Router packets. Especially if you're
> using ingress, you have to modify the  policy filters so that they
> only apply to packets coming from the router.

err, what's ingress?

> As a simplified ascii graphic:
>
>   HTB qdisc
>|
>\--- HTB fat class (LAN rate)
>  |
>  \--- HTB DSL class (DSL rate; only packets to the router
>  go here) \--- HTB LAN class (LAN-DSL rate; all other
>  packets go here)
>
> A problem with this design would be if you have additional local
> traffic  that goes to the router (e.g. a ssh session to the router
> that does not  actually go to the internet). This would be
> classified as DSL traffic too.  I don't know if filters can be
> designed in a way that they only match on  gateway'ed traffic.

There's the occasional http traffic to the router for configuration
(it's the current t-online WLan device), but that's quite rare and I
don't care if it's a bit slow then (hey, I already worked with imap
over 384k in my LAN ;)).
> Shaping this way won't work particularly well especially if there
> are other  users in your LAN using the router. You should do the
> shaping directly on  the router in any case.

There's just me and my wife, and she only uses http over the proxy on
the shaped machine. I will transfer her pop3 access to the linux-box
w/fetchmail some day, so every traffic goes through the linux-box.Um. Forgot about 
ftp, it's currently direct... perhaps I should set up
a ftp proxy too then... But it's also quite rare.
Are there any tools to define the shaping? Or do I really have to
write it from scratch?
Lars


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