Hi! I''d like put the first n packets of a connection into a seperate class like having a burst for each connection. The netfilter nth patch doesn''t quite do this as it a. only matches a single packet count and b. works on the rule instead the connection count. I''m thinking of something like: iptables -t mangle -I foo -m nth --every :100 -j ... where the counter is reset for every new connection. Can this be done with filters? Any hints are appreciated! Thanks, Walter _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Friday 22 November 2002 19:32, Walter Haidinger wrote:> Hi! > > I''d like put the first n packets of a connection into a seperate class > like having a burst for each connection. > > The netfilter nth patch doesn''t quite do this as it > a. only matches a single packet count and > b. works on the rule instead the connection count. > > I''m thinking of something like: > iptables -t mangle -I foo -m nth --every :100 -j ... > where the counter is reset for every new connection. > > Can this be done with filters?Why not doing with htb? It has a nice burst parameter that does exactly what you want. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Walter Haidinger
2002-Nov-22 22:36 UTC
Re: burst per connection or filter on packet numbers
On Fri, 22 Nov 2002, Stef Coene wrote:> Why not doing with htb? It has a nice burst parameter that does exactly what > you want.Not exactly. If I understand the htb users guide correctly, then the bursts only apply if there is the chance that they can recharge (i.e. there is some period without packet flow). But what if there is a continous packet flow because there are many concurrent connections? I''d like to favour beginning connections (not just the starting packets, but the first, say, 100 packets) _while_ there already established connections which prevent recharging of the htb bursts. I''ve already experimented with different burst/cburst settings but it did not give me desired behaviour. Regards, Walter _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Marcus Blomenkamp
2002-Nov-23 15:25 UTC
Re: burst per connection or filter on packet numbers
Am Freitag, 22. November 2002 23:36 schrieb Walter Haidinger:> > I''d like to favour beginning connections (not just the starting packets, > but the first, say, 100 packets) _while_ there already established > connections which prevent recharging of the htb bursts. > > I''ve already experimented with different burst/cburst settings but it did > not give me desired behaviour.Greetings. You could try the WRR (weighted-round-robin) scheduler. It''s not yet included into the standard kernel sources, so you''ve got to patch them. Google should help. AFAIK: WRR automatically classifies packets either by their MAC addresses or by IP-TCP,UDP streams. On each turn every stream gets a chance to send a number of packets proportional to its current priority/weight. And thats the clue: WRR allows the streams to start with a higher priority and decrease it''s priority automatically by the amount of traffic processed. Marcus _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Walter Haidinger
2002-Nov-23 15:37 UTC
Re: burst per connection or filter on packet numbers
On Sat, 23 Nov 2002, Marcus Blomenkamp wrote:> You could try the WRR (weighted-round-robin) scheduler. It''s not yet included > into the standard kernel sources, so you''ve got to patch them. Google should > help.Thanks for the hint! I''ll have a look at it. FYI, it is referenced for the lartc howto (found by Google ;-) too: http://lartc.org/howto/lartc.adv-qdisc.wrr.html Walter _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/