[Fwd: Re: [LARTC] congestion problem]

2002-10-11 Thread Ciprian Niculescu
Don Cohen wrote:
>   Client --- R1 --- R2 --- R3 --- Web
>
>   the Client it's me, the R1 router it's myne (so i can control it), the
>   R2 is my provider router, and R3 is the provider,provider router.
>
>   R2 - R3 is a 2mbit link
>   R1 - R2 is a 10mbit link
>   R2 have multiple interfaces and other 10mbit links
>   I have a 32kbit garanted bandwidth on the R2-R3, but without limit 
(rate
>   32kbit, ceil 2mbit)

> You have guaranteed 32K upstream, downstream or both?
both in 32kbps

> There's something strange about that in any case.
> For upstream, how does r2 know which packets are from you?
ip

> Source address?  Then some other customer of your ISP could deny
> you service by spoofing your address (unless your ISP filters that).
not the case

> Downstream is also strange, first cause your ISP's ISP would then
> have to know about you,
he does, it route my ip back to me, i have an ip from his class range

> second cause you have little control over what
> others send you.
right

>  So if that is controlled at all it should be
> shaped in accordance with your wishes.
only by the ISP, but he don't carre what it's in my band, he only shape
to garantee to all the clients (his) the 32kbit or whatever they bought

>
> You talk about downloading.  But in that case the bandwidth is used
> mostly downstream.  You have limited control over that.  Assuming
> the servers are using tcp you could control the acks (more to the
> point the windows) you send back to limit the rate at which they send
> to you.
yes, i tryed this:
class 1:1  prio 1 <-- web request
class 1:2  prio 2 <-- acks
class .

but with not to mouch resoult.

the logic i came with is: i send prio 1 the web request, but my provider
  don't send it prio 1 too, and/or the result of the request, get into
the provider R2 shaper and get fifo with all the other packets (download
mostly), so i get none gain.

so the concluzion is that i can do anything/much.

> Of course, 32Kbit is slow enough that you're never likely to be happy
> with download speed.
yes, but more cost too much

C



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


Re: [LARTC] img+htb -> kernel oops :(

2002-10-11 Thread Ciprian Niculescu
Razvan Cosma wrote:

On Fri, 11 Oct 2002, Tomasz Wrona wrote:



On Fri, 11 Oct 2002, Razvan Cosma wrote:



I have been experimenting with htb+imq, and while adding/removing
rules got a kernel oops (machine frozen, only sysrq worked).


I cant help You but I have also problems, system hangs after some time of
work [day or two]. I am not sure if its IMQ but I suppose it's. Probably
be sure after more tests. [system hangs without an oops and sysrq doesn't
work]

Regards
tw



Found the problem (or at least I think so) - the PREROUTING and
POSTROUTING rules need to be attached to different imq devices. Thank
you Ciprian Niculescu.



you're welcome, but i don't remember helping you

C

P.S. esti si pe rlug parca?


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



Re: [LARTC] owner based policy routing

2002-10-11 Thread Julian Anastasov

Hello,

On Fri, 11 Oct 2002, Arindam Haldar wrote:

> 50: from all fwmark   50 lookup ispA

fwmark in ip rule is 0x50 (it is defined and printed in hex)

> iptables -I OUTPUT -t mangle -m owner --uid-owner  -d 202.0.0.0/8
>   -j MARK --set-mark 50

and here 50 is 0x32 (not 0x50). Is that the problem?

Regards

--
Julian Anastasov <[EMAIL PROTECTED]>

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



RE: [LARTC] (no subject)

2002-10-11 Thread Albuquerque, Marcelo M
Stef,

Thanks for the reply.

I want my bridge to "emulate" a rate limit on the transmitter of the device
connected to that particular bridge interface. That's why I need an ingress
qdisc on each and every interface of my Linux bridge. This is what I tried:

tc qdisc add dev eth4 handle : ingress
tc filter add dev eth4 parent : protocol ip prio 50 u32 match ip \
src 0.0.0.0/0 police rate 100kbit burst 10k drop flowid :1

I didn't obeserve any rate reduction though. I suspect that on the bridge,
packets are being forwarded and therefore the ip-related matches have no
effect. How can I have the 'police rate 100kbit' portion of the command
without the ip-related arguments?

Thanks,

Marcelo.

> -Original Message-
> From: Stef Coene [mailto:stef.coene@;docum.org]
> Sent: Friday, October 11, 2002 12:37 PM
> To: Albuquerque, Marcelo M; '[EMAIL PROTECTED]'
> Subject: Re: [LARTC] (no subject)
> 
> 
> On Friday 11 October 2002 20:40, Albuquerque, Marcelo M wrote:
> > I am trying to limit the rate for all traffic on the incoming interface
of
> > a Linux bridge. So far I have only been able to limit the outgoing rate.
I
> > am assuming I will have to use an ingress qdisc. The example found on
the
> > documentation works without errors but I can't see any rate reduction
> > (maybe because it applies to SYN's only). Does anybody know if limiting
> > rate on the incoming interface is possible on a Linux bridge, and if so,
> > how to go about configuring it.
>
> If you shape on a bridge, why not shaping on both interfaces 
> ?  That way you 
> can shape in both directions.
> And you can use the ingress qdisc, but the shaping acutally 
> happens with the 
> policers in combination with the filters.  Policsers are a 
> sort of tbf, you 
> can specify a maximum rate to it.  So the filters will only 
> match packets at 
> a certain rate and you can drop packets exceeding that rate.  
> So you can 
> limit incoming packets.
> 
> 
> Stef
> 
> -- 
> 
> [EMAIL PROTECTED]
>  "Using Linux as bandwidth manager"
>  http://www.docum.org/
>  #lartc @ irc.oftc.net
> 
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] owner based policy routing

2002-10-11 Thread Jose Luis Domingo Lopez
On Friday, 11 October 2002, at 09:34:38 +0530,
Arindam Haldar wrote:

> THE SCENARIO:
> we are connected to 2 isp, both having their large network.. isp A has 
> gateway with ofc network while ispB has satellite gateway & hence there 
> are advantages to take specific routes thru specific isp.
> 
I suppose this box has three network connections, one to the internal
network, and one for each Internet connection. So, for the traffic
coming from the internal network, this box is a router.

> THE RULES DEFINED:
> 10: from all lookup main
>
"ip rule" are checked from lower to higher numbers, so once visited
"table local" (prio 0) all your traffic (from all) visits "table main".
I suppose "table main" doesn't have a default route of some sort,
because that would stop packet routing at that point, turning the rest
of "ip rule" useless.

> WHAT WE TRIED:
> we tried using iptables owner based rules & marked packets( as one can 
> see in rules above), but it didnt help.
> iptables -I OUTPUT -t mangle -m owner --uid-owner  -d 202.0.0.0/8 
>  -j MARK --set-mark 50
> but packets were not marked as seen by >> iptables -nvL -t mangle
> & hence owner based pilicy routing not working
> 
If "iptable -t mangle -L -vn" shows no matches, it can be for two
reasons: either destination address doesn't match, or uid-owner doesn't
match. I have never used "--match owner" myself, but a quick try here
seems to work, at least for a simple network application.

Maybe squid runs as user "squid" (or whatever), but netfilter sees them
as originating from another user, maybe root, maybe no user at all.

-- 
Jose Luis Domingo Lopez
Linux Registered User #189436 Debian Linux Woody (Linux 2.4.18-586tsc)
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] (no subject)

2002-10-11 Thread Stef Coene

On Friday 11 October 2002 20:40, Albuquerque, Marcelo M wrote:
> I am trying to limit the rate for all traffic on the incoming interface of
> a Linux bridge. So far I have only been able to limit the outgoing rate. I
> am assuming I will have to use an ingress qdisc. The example found on the
> documentation works without errors but I can't see any rate reduction
> (maybe because it applies to SYN's only). Does anybody know if limiting
> rate on the incoming interface is possible on a Linux bridge, and if so,
> how to go about configuring it.
If you shape on a bridge, why not shaping on both interfaces ?  That way you 
can shape in both directions.
And you can use the ingress qdisc, but the shaping acutally happens with the 
policers in combination with the filters.  Policsers are a sort of tbf, you 
can specify a maximum rate to it.  So the filters will only match packets at 
a certain rate and you can drop packets exceeding that rate.  So you can 
limit incoming packets.


Stef

-- 

[EMAIL PROTECTED]
 "Using Linux as bandwidth manager"
 http://www.docum.org/
 #lartc @ irc.oftc.net

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



[LARTC] ingress qdisc on linux bridge

2002-10-11 Thread Albuquerque, Marcelo M

> I am trying to limit the rate for all traffic on the incoming interface of
> a Linux bridge. So far I have only been able to limit the outgoing rate. I
> am assuming I will have to use an ingress qdisc. The example found on the
> documentation works without errors but I can't see any rate reduction
> (maybe because it applies to SYN's only). Does anybody know if limiting
> rate on the incoming interface is possible on a Linux bridge, and if so,
> how to go about configuring it.
> 
> Thanks.
> 
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



[LARTC] (no subject)

2002-10-11 Thread Albuquerque, Marcelo M

I am trying to limit the rate for all traffic on the incoming interface of a
Linux bridge. So far I have only been able to limit the outgoing rate. I am
assuming I will have to use an ingress qdisc. The example found on the
documentation works without errors but I can't see any rate reduction (maybe
because it applies to SYN's only). Does anybody know if limiting rate on the
incoming interface is possible on a Linux bridge, and if so, how to go about
configuring it.

Thanks.

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



[LARTC] congestion problem

2002-10-11 Thread Don Cohen


  Client --- R1 --- R2 --- R3 --- Web

  the Client it's me, the R1 router it's myne (so i can control it), the 
  R2 is my provider router, and R3 is the provider,provider router.

  R2 - R3 is a 2mbit link
  R1 - R2 is a 10mbit link
  R2 have multiple interfaces and other 10mbit links
  I have a 32kbit garanted bandwidth on the R2-R3, but without limit (rate 
  32kbit, ceil 2mbit)
You have guaranteed 32K upstream, downstream or both?
There's something strange about that in any case.
For upstream, how does r2 know which packets are from you?
Source address?  Then some other customer of your ISP could deny
you service by spoofing your address (unless your ISP filters that).
Downstream is also strange, first cause your ISP's ISP would then
have to know about you, second cause you have little control over what
others send you.  So if that is controlled at all it should be 
shaped in accordance with your wishes.

You talk about downloading.  But in that case the bandwidth is used
mostly downstream.  You have limited control over that.  Assuming
the servers are using tcp you could control the acks (more to the
point the windows) you send back to limit the rate at which they send
to you.
Of course, 32Kbit is slow enough that you're never likely to be happy
with download speed.

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



Re: [LARTC] img+htb -> kernel oops :(

2002-10-11 Thread Razvan Cosma

On Fri, 11 Oct 2002, Tomasz Wrona wrote:

> On Fri, 11 Oct 2002, Razvan Cosma wrote:
>
> >  I have been experimenting with htb+imq, and while adding/removing
> > rules got a kernel oops (machine frozen, only sysrq worked).
>
> I cant help You but I have also problems, system hangs after some time of
> work [day or two]. I am not sure if its IMQ but I suppose it's. Probably
> be sure after more tests. [system hangs without an oops and sysrq doesn't
> work]
>
> Regards
> tw
>
Found the problem (or at least I think so) - the PREROUTING and
POSTROUTING rules need to be attached to different imq devices. Thank
you Ciprian Niculescu.



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



Re: [LARTC] 'sport' is good but 'dport'?

2002-10-11 Thread Michael T. Babcock
박정은 wrote:


It never works .. !!   If I send to 23 port 50kbps  It receive 50kbps.. I have no idea ..  

Did I thought wrong?
 

You should read the FAQ / HOWTO again; it mentions that you can only 
shape outgoing packets for a variety of reasons.  You can limit incoming 
packets to some degree (not as well controlled, and somewhat pointless 
in some cases) by dropping the packets you don't want however, with the 
ingress filter.

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock


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


Re: [LARTC] tcng version 8z

2002-10-11 Thread Werner Almesberger

raptor wrote:
> now that the alphabet has finished what next :")

I'll reset the letter and increment the number, so the next
version will be "9a" :-) There isn't really all that much
meaning in those version names, although I usually try to
avoid major destabilizing changes towards end-of-the-
alphabet releases.

The next things we'll see in 9* are the completion of
meta data classification for "tc", and caching for lookups
in external databases (see TODO). Then, I want to make
iflib_fastbit.c usable, and then being fading out all
the other junk in iflib_*. With a little luck, I'll also
figure out how to turn "." into an operator. Last but not
least, umlsim will eventually replace tcsim, but that's
still a bit in the future.

>... u can borrow from cyrilic alphabet so that u can have 3 more versions :"))

Thanks, I'll remember that when I run out of numbers :-)

- Werner

-- 
  _
 / Werner Almesberger, Buenos Aires, Argentina [EMAIL PROTECTED] /
/_http://www.almesberger.net//
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] A beginner

2002-10-11 Thread Werner Almesberger

Emmanuel SIMON wrote:
> Especially, I am looking for the definitions of classes, queues, filters and
> so on...

You may find
ftp://icaftp.epfl.ch/pub/people/almesber/pub/tcio-current.ps.gz
useful. It explains mainly implementation details, but also
covers the general framework.

A more recent, but not quite finished version of this document
is in
ftp://icaftp.epfl.ch/pub/people/almesber/junk/tc-04FEB2001-0.tar.gz

- Werner

-- 
  _
 / Werner Almesberger, Buenos Aires, Argentina [EMAIL PROTECTED] /
/_http://www.almesberger.net//
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] 'sport' is good but 'dport'?

2002-10-11 Thread Robert Penz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Friday 11 October 2002 15:52, Michael T. Babcock wrote:
> You should read the FAQ / HOWTO again; it mentions that you can only
> shape outgoing packets for a variety of reasons.  You can limit incoming
> packets to some degree (not as well controlled, and somewhat pointless
> in some cases) by dropping the packets you don't want however, with the
> ingress filter.
or better use imq 
http://luxik.cdi.cz/~patrick/imq/index.html

- -- 
Regards,
Robert
- 
Robert Penz
robert.penz AT outertech.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9ptgj8tTsQqJDUBMRAnO5AJ9muDj6cI9iZzgrbE2A/2Wzkz9z6gCfftLy
NCFV8+0M7VQ4ihL863QEeiA=
=dPfA
-END PGP SIGNATURE-

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



Re: [LARTC] img+htb -> kernel oops :(

2002-10-11 Thread Tomasz Wrona
On Fri, 11 Oct 2002, Razvan Cosma wrote:

>  I have been experimenting with htb+imq, and while adding/removing
> rules got a kernel oops (machine frozen, only sysrq worked).

I cant help You but I have also problems, system hangs after some time of
work [day or two]. I am not sure if its IMQ but I suppose it's. Probably
be sure after more tests. [system hangs without an oops and sysrq doesn't
work]

Regards
tw
-- 


 ck.eter.tym.pl

"Never let shooling disturb Your education"

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



[LARTC] A beginner

2002-10-11 Thread Emmanuel SIMON
Hi all,

I begin to work on QoS with Linux.
So, I am very interested with LARTC.
I have allready read the LARTC HOWTO and the QoS Connection Tuning HOWTO.
I am looking for a doc that would be more theoritical than the howtos.
Especially, I am looking for the definitions of classes, queues, filters and
so on...

Can someone send me URLs like that or titles of books, please.

Thank you
Emmanuel

PS: sorry for my poor English

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



Re: [LARTC] tcng version 8z

2002-10-11 Thread raptor
now that the alphabet has finished what next :")... u can borrow from cyrilic alphabet 
so that u can have 3 more versions :"))

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



[LARTC] IMQ and NAT

2002-10-11 Thread Robert Vale



I'm trying to get 
IMQ working correctly as incoming on a box that is running 
SNAT.
 
I've modified imq.c 
so that it fires after IP_PRI_NAT_DST instead of mangle and am using tc filter 
commands to choose the flowid based on the destination address.  IMQ still 
seems to be firing before the system has reversed the SNAT.
 
scripts I'm 
using
 
  tc qdisc add 
dev imq0 root handle 1: htb default 20
 
  
DOWNLINK=512
  LIMIT="ceil 
${DOWNLINK}kbit"
 
  tc class add 
dev imq0 parent 1: classid 1:1 htb rate ${DOWNLINK}kbit
  tc class 
add dev imq0 parent 1:1 classid 1:10 htb rate 64kbit $LIMIT  tc class 
add dev imq0 parent 1:1 classid 1:20 htb rate 64kbit $LIMIT
 
  tc qdisc add dev imq0 parent 1:10 handle 10: 
sfq  tc qdisc add dev imq0 parent 1:20 handle 20: sfq
  tc filter add dev imq0 parent 1: protocol ip 
prio 1 u32 match ip dst 172.30.0.2/32 flowid 1:10
 
  iptables -t mangle -A PREROUTING -i eth0 -j 
IMQ --todev 0
  iptables -t nat -A PREROUTING -s 172.30.0.0/24 -d 
! 172.30.0.0/24 -j MASQUERADE
  ip link set imq0 
up


[LARTC] img+htb -> kernel oops :(

2002-10-11 Thread Razvan Cosma
  Hello,
 I have been experimenting with htb+imq, and while adding/removing
rules got a kernel oops (machine frozen, only sysrq worked).

Last entries in the kernel log:
Oct 11 13:25:50 mach2 kernel: HTB init, kernel part version 3.6
Oct 11 13:25:50 mach2 kernel: htb*g j=111462262
Oct 11 13:25:50 mach2 kernel: htb*r7 m=0
Oct 11 13:25:50 mach2 kernel: htb*r6 m=0
Oct 11 13:25:50 mach2 kernel: htb*r5 m=0
Oct 11 13:25:50 mach2 kernel: htb*r4 m=0
Oct 11 13:25:50 mach2 kernel: htb*r3 m=0
Oct 11 13:25:50 mach2 kernel: htb*r2 m=0
Oct 11 13:25:50 mach2 kernel: htb*r1 m=0
Oct 11 13:25:50 mach2 kernel: htb*r0 m=0
Oct 11 13:26:03 mach2 kernel: HTB: quantum of class 10001 is small. Consider r2q 
change.
<4>HTB: quantum of class 10010 is small. Consider r2q change.
<4>HTB: quantum of class 10020 is small. Consider r2q change.
<4>HTB: quantum of class 10100 is small. Consider r2q change.
<4>HTB: quantum of class 10200 is small. Consider r2q change.
<7>retrans_out leaked.
Oct 11 13:26:03 mach2 kernel: retrans_out leaked.
Oct 11 13:26:03 mach2 kernel: retrans_out leaked.
Oct 11 13:31:05 mach2 kernel: retrans_out leaked.

 Any hints on what could have caused the machine to hang?
Thank you very much.


PS. kernel 2.4.18 + imq-2.4.18.diff-10.1 + htb3.6_2.4.17, on a slackware
8.0 system.



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



Re: [LARTC] 'sport' is good but 'dport'?

2002-10-11 Thread Stef Coene
On Sunday 13 October 2002 03:20, ¹ÚÁ¤Àº wrote:
> hi all
> 
> I just tried to test whether the HTB works well or not .. (policy is very
> simple ^^;;)
 
> I tried HTB simulator 'Ethloop' with lo (loopback ) and I found HTB works
> well(very well)
 
> So I changed lo to eth0  and tested ..
> 
> ./tc qdisc add dev eth0 root handle 1: htb default 10
> ./tc class add dev eth0 parent 1: classid 1:1 htb rate 500kbps ceil
> 500kbps
 ./tc class add dev eth0 parent 1:1 classid 1:2 htb rate 180kbps
> ceil 500kbps ./tc class add dev eth0 parent 1:2 classid 1:10 htb rate
> 150kbps ceil 500kbps prio 2 ./tc class add dev eth0 parent 1:2 classid 1:11
> htb rate 5kbps ceil 10kbps prio 2 ./tc class add dev eth0 parent 1:1
> classid 1:12 htb rate 10kbps ceil 20kbps prio 1 ./tc qdisc add dev eth0
> parent 1:10 handle 20: pfifo limit 5
> ./tc qdisc add dev eth0 parent 1:11 handle 30: pfifo limit 5
> ./tc qdisc add dev eth0 parent 1:12 handle 40: sfq perturb 10
> 
> ./tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip sport
> 23 0x flowid 1:11
 ./tc filter add dev eth0 protocol ip parent 1:0 prio
> 1 u32 match ip sport 80 0x flowid 1:12 
>  It works well with outgoing packets ..  
> 
>  BUT!!   
> 
>   I changed last two lines to control Incoming packets .. like below..
> ./tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport
> 23 0xfffe flowid 1:11
 ./tc filter add dev eth0 protocol ip parent 1:0 prio
> 1 u32 match ip dport 80 0xfffe flowid 1:12 
> It never works .. !!   If I send to 23 port 50kbps  It receive 50kbps.. I
> have no idea ..  
 
> Did I thought wrong?
Yes :)

You can only shape outgoing packets.  If you want to shape incoming packets, 
you can use policers or the imq device.  

Stef

-- 

[EMAIL PROTECTED]
 "Using Linux as bandwidth manager"
 http://www.docum.org/
 #lartc @ irc.oftc.net

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



[LARTC] congestion problem

2002-10-11 Thread Ciprian Niculescu
I have the folowing configuration:

Client --- R1 --- R2 --- R3 --- Web

the Client it's me, the R1 router it's myne (so i can control it), the 
R2 is my provider router, and R3 is the provider,provider router.

R2 - R3 is a 2mbit link
R1 - R2 is a 10mbit link
R2 have multiple interfaces and other 10mbit links
I have a 32kbit garanted bandwidth on the R2-R3, but without limit (rate 
32kbit, ceil 2mbit)

The congested link is between R2 and R3. I start to download something, 
the R2-R3 32kbit gets full, borrows and gets to around (let's say) 
50kbit. Then other clients comes, and the bandwitdth above 32kbit gets 
unsecured. In this moment i want to browse a web page, and it comes very 
very hard.

The question is: what can i do from R1 to make the browsing faster, but 
not limiting the download to 20kbit (for ex)???


C



---
Xnet scaneaza automat toate mesajele impotriva virusilor folosind RAV AntiVirus.
Xnet automatically scans all messages for viruses using RAV AntiVirus.

Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate variantele lor. Va rugam sa luati in considerare ca exista un risc de fiecare data cand deschideti fisiere atasate si ca MobiFon nu este responsabila pentru nici un prejudiciu cauzat de virusi.
Disclaimer: RAV AntiVirus may not be able to detect all new viruses and variants. Please be aware that there is a risk involved whenever opening e-mail attachments to your computer and that MobiFon is not responsible for any damages caused by viruses.

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


[LARTC] strange question about HBT class.

2002-10-11 Thread xiao hongge
Hi,
I've find one strange question about HBT class.Could you explain it ? thanks

   +---+  ++   | linux box |--| Client | ipA   +---+eth0  ++

on linux box script:
tc qdisc add dev eth0 root handle 1:tc class add dev eth0 parent 1: classid 1:1 htb default 100tc class add dev eth0 parent 1: classid 1:30 htb rate 30kbps ceil 30kbps burst 2ktc class add dev eth0 parent 1: classid 1:70 htb rate 70kbps ceil 70kbps burst 2k
tc filter add dev eth0 parent 1: protocol ip handle 0x30 fw classid 1:30tc filter add dev eth0 parent 1: protocol ip handle 0x70 fw classid 1:70
ipchains -Fipchains -I output -d $ipA -m 0x70 -j ACCEPT
question:  when ipA OS is linux,I use ftp to download file from linux box,the bandwidth is right about 70kbps.but when ipA OS is window98,I use ftpdownload file from linux box again,the bandwidth is 27kbps only.I replace ipA with another machine,It have same result.why? why?
 Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos, & more
faith.yahoo.com

[LARTC] [tcng] sysVinit script

2002-10-11 Thread raptor

hi below is sysvinit script for handling tcng-script  please excuse my bad bash 
skils, correct me where i'm doing stupid things :")

what is left... many things, if i have time i will implement them too :

- start [devices] - and then correct handling of service lock files i.e. per device 
lock file
- stats blah ... - all ideas are welcome !!
- test  or some such, i mean the ability to use temprary config file and restore back 
original if something
goes wrong.. ideas?  Or something like last-good-known config/s

And u normaly start this on sysv system like this :

service tcng [command] [subcommands|devices]

Don't forget to set correct paths to "tc, tcc and tcng-config"

PS. probably the script can be easly tweaked to work also as pure TC -service !! 

#===sample output==
[root@qos tcng]# ./tcng 
*** Usage: 
tcng {start|stop|status|restart} [devices]
tcng show [all|qdisc|class|filter] [devices]


[root@qos tcng]# ./tcng stop
Stopping some/all tcng services: 
No traffic control running on : eth0
Flushing : eth1
No traffic control running on : hdlc0
No traffic control running on : hdlc1
No traffic control running on : pvc0
No traffic control running on : pvc1
[root@qos tcng]# ./tcng start
Starting tcng services: 
Execute :  qdisc add dev eth1 handle 1:0 root dsmark indices 4 default_index 0:
Execute :  qdisc add dev eth1 handle 2:0 parent 1:0 htb:
Execute :  class add dev eth1 parent 2:0 classid 2:1 htb rate 56000bps:
Execute :  class add dev eth1 parent 2:1 classid 2:2 htb rate 125bps ceil 2400bps:
..
[root@qos tcng]# ./tcng status 
traffic control on eth0: [OFF]
traffic control on eth1 : [ON]
traffic control on hdlc0: [OFF]
traffic control on hdlc1: [OFF]
traffic control on pvc0: [OFF]
traffic control on pvc1: [OFF]
[root@qos tcng]# ./tcng status eth1
traffic control on eth1 : [ON]
[root@qos tcng]# ./tcng show class eth1

class htb 2:1 root rate 56000bps ceil 56000bps burst 2159b cburst 2159b 
class htb 2:2 parent 2:1 prio 0 rate 125bps ceil 2400bps burst 1600b cburst 1623b 
class htb 2:3 parent 2:1 leaf 3: prio 0 rate 125bps ceil 4200bps burst 1600b cburst 
1641b 

[root@qos tcng]# ./tcng show   
qdisc sfq 3: limit 128p quantum 1514b 
qdisc htb 2: r2q 10 default 0 direct_packets_stat 0
qdisc dsmark 1: indices 0x0004 default_index 0x 
class htb 2:1 root rate 56000bps ceil 56000bps burst 2159b cburst 2159b 
...
[root@qos tcng]# 

#==THE SCRIPT
#!/bin/sh
#
# tcng:   Starts the tcng Server
#
# Version:  @(#) /etc/rc.d/init.d/tcng 0.1
#
# chkconfig: 2345 90 10
# description: Starts and stops the tcng at boot time and shutdown.
#
# processname: tcng
#
# created : from Raptor
#

#path to the tc command
tc=/sbin/tc
#path to the tcc command
tcc=/arh/bin/com.pl
#where is the tcng config file
tcngConf=/etc/sysconfig/tcng

offMsg=OFF
onMsg=ON
debug=1

# Source function library.
. /etc/rc.d/init.d/functions

isUp () {
res=`$tc qdisc show dev $1`
if [ -z "$res" ]; then return 1; fi
return 0
}

start () {
gprintf "Starting tcng services: "; echo
OLDIFS="$IFS"
IFS="
"
cmds=`$tcc $tcngConf | grep -v "^#" | sed -e "s/^tc//"`
for cmd in $cmds; do
[ $debug -eq 1 ] && gprintf "Execute : $cmd:" && echo; 
eval "$tc $cmd"
done
touch /var/lock/subsys/tcng
IFS="$OLDIFS"
}


stop () {
gprintf "Stopping some/all tcng services: "
echo
#if explictly specified shut only these devices
if [ "$1" ]; then devs=$*; fi
#   echo $devs
for d in $devs; do
if isUp $d ; then 
gprintf "Flushing : $d"; echo
$tc qdisc del dev $d root
else gprintf "No traffic control running on : $d"; echo
fi
#   rm -f /var/lock/subsys/tcng-$d  
done
rm -f /var/lock/subsys/tcng;#this is not the correct behavior   
}


status () {
if [ "$1" ]; then devs=$*; fi   
#echo $devs
for d in $devs; do
if isUp $d ; 
then gprintf "traffic control on $d : [$onMsg]"; echo;
else gprintf "traffic control on $d: [$offMsg]"; echo;
fi
done
}

show () {
if [ -z "$1" ]; then what=all; else what=$1; fi
shift
if [ "$1" ]; then devs=$*; fi   
for d in $devs; do
if isUp $d; then
[ "$what" = "all" ] || [ "$what" = "qdisc" ] && gprintf "`$tc qdisc show 
dev $d`"; echo
[ "$what" = "all" ] || [ "$what" = "class" ] && gprintf "`$tc class show 
dev $d`"; echo 
[ "$what" = "all" ] || [ "$what" = "filter" ] && gprintf "`$tc filter show 
dev $d`"; echo   
fi
done
}


devs=`ifconfig -a | grep '^\w' | grep -v lo | cut -f 1 -d ' '`
command=$1
shift;

case "$command" in
  start) start ;;
  stop) stop $@ ;;
  status) status $@ ;;
  show) show $@ ;;  
  restart)
gprintf "Restarti

[LARTC] BUG : kernel crashes when tc qdisc with dsmark deleted

2002-10-11 Thread amit jaiswal


I tried to run the script efcbq that comes with iproute2 official 
documentation(/usr/share/doc/iproute2/examples/diffserv/efcbq) on 2.4.19 
kernel.

#!/bin/sh
#
TC=tc
DEV=dev\ eth0

$TC qdisc add $DEV handle 1:0 root dsmark indices 64 default_index 0 
set_tc_index
$TC filter add $DEV parent 1:0 protocol ip prio 1 tcindex mask 0xfc shift 2
$TC qdisc add $DEV parent 1:0 handle 2:0 cbq bandwidth 10Mbit cell 8 avpkt 
1000 mpu 64
#
# EF class
#
$TC class add $DEV parent 2:0 classid 2:1 cbq bandwidth 10Mbit rate 1500Kbit 
avpkt 1000 prio 1 bounded isolated allot 1514 weight 1 maxburst 10
# packet fifo for EF?
$TC qdisc add $DEV parent 2:1 pfifo limit 5
$TC filter add $DEV parent 2:0 protocol ip prio 1 handle 0x2e tcindex 
classid 2:1 pass_on
#
# BE class
#
$TC class add $DEV parent 2:0 classid 2:2 cbq bandwidth 10Mbit rate 5Mbit 
avpkt 1000 prio 7 allot 1514 weight 1 maxburst 21 borrow split 2:0 defmap 
0x

$TC qdisc add $DEV parent 2:2 red limit 60KB min 15KB max 45KB burst 20 
avpkt 1000 bandwidth 10Mbit probability 0.4

$TC filter add $DEV parent 2:0 protocol ip prio 2 handle 0 tcindex mask 0 
classid 2:2 pass_on




Then on executing

tc qdisc del dev eth0 root

the kernel crashes. and it was BEYOND RECOVERY so no further message could 
be get.
The kernel debug messages upto this stage were(using  dmesg utility)

tcindex_init(sch c21d4720,[qdisc c21d4780],opt c21d4250)
dsmark_init: qdisc c21d4780
tcindex_init(tp c329d9e0)
tcindex_get(tp c329d9e0,handle 0x)
tcindex_change(tp c329d9e0,handle 0x,tca c1417d3c,arg c1417ca4),opt 
c315f9d0,p c18157e0,r 
*arg = 0x0
classid/police /
tcindex_dump(tp c329d9e0,fh 0x0,skb c11af8c0,t c31d2010),p c18157e0,r 
,b c31d2038
p->perfect  p->h 
dsmark_get(sch c21d4720,[qdisc c21d4780],classid 1)
dsmark_get(sch c21d4720,[qdisc c21d4780],classid 1)
dsmark_graft(sch c21d4720,[qdisc c21d4780],new c31f6800,old c1417cc0)

dsmark_walk(sch c21d4720,[qdisc c21d4780],walker c3b1fc44)
dsmark_walk(sch c21d4720,[qdisc c21d4780],walker c3229c44)
ndex_init(tp c329df20)
tcindex_get(tp c329df20,handle 0x002e)
tcindex_change(tp c329df20,handle 0x002e,tca c2c01d3c,arg c2c01ca4),opt 
c19c4af0,p c18156c0,r 
*arg = 0x0
classid/police c19c4af4/
hash 64 mask 65535
r=
r=c2c01c3c
tcindex_dump(tp c329df20,fh 0x0,skb c11af8c0,t c31d2010),p c18156c0,r 
,b c31d2038
p->perfect  p->h c315f9a0
ndex_dump(tp c329d9e0,fh 0x0,skb c11af8c0,t c31d2010),p c18157e0,r 
,b c31d2038
p->perfect  p->h 
tcindex_walk(tp c329d9e0,walker c2c01c44),p c18157e0
dsmark_walk(sch c21d4720,[qdisc c21d4780],walker c2c71c44)
dsmark_walk(sch c21d4720,[qdisc c21d4780],walker c2175c44)
tcindex_init(tp c329d960)
tcindex_get(tp c329d960,handle 0x)
tcindex_change(tp c329d960,handle 0x,tca c2171d3c,arg c2171ca4),opt 
c315f8d0,p c18156e0,r 
*arg = 0x0
classid/police c315f8dc/
hash 1 mask 0
r=c1815680
tcindex_dump(tp c329d960,fh 0x0,skb c11af980,t c31d2010),p c18156e0,r 
,b c31d2038
p->perfect c1815680 p->h 



When i used gdb then in
file : tc_qdisc.c
line 138:
function : tc_qdisc_modifyc()
on calling rtnl_open() the system hangs.
this function is defined in libnetlink.c

in file libnetlink.c
line 48:
function rtnl_open()
the system hangs on calling the system call
rth->fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);


If its an error in the command then HOWTO delete the queing discipline when 
dsmark is used as its the root qdisc with no associated class

And if its a bug in the kernel then what is the workaround








_
Chat with friends online, try MSN Messenger: http://messenger.msn.com

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







 Reply  Reply All  Forward    Delete Put in Folder...InboxSent 
MessagesDraftsTrash Can
Previous   Next | Close
 




Calendar


Hotmail Services


Free Newsletters
MSN Featured Offers
Find Message
Reminders
Directories




MSN India Links





What's New?
News Updates
Know your future
Healthy Living
Cinema
Global Indians
MSN Computing
Matrimonial
Cricket
MSN Dating



 






More Useful Everyday




 





Home

Hotmail

Astrology

Wallpaper

Romance

Life Style



 © 2002 Microsoft Corporation. All rights reserved. TERMS OF USE   TRUSTe 
Approved Privacy Statement



_
Chat with friends online, try MSN Messenger: http://messenger.msn.com

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