Re: SFQ with Per Flow Caps

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 9 Jun 2004, vincent-perrier wrote:

> Le mer 09/06/2004 à 22:42, Bill Denney a écrit :
> > I'd like to implement something like SFQ, but with a cap of a rate per
> > flow.  Essentially, I'd like to be able to limit citrix connections to
> > 30KBps without having an overall traffic flow cap for all citrix
> > connections.
>
> This could be a case for the HTB qdisc if you have a way to identify the
> citrix connections (ip, port, or any other field you know), here is an
> example of a config that limits 1 tcp connection of port source 22D0:
>
> tc qdisc add dev eth0 root handle 1: htb
> tc filter add dev eth0 parent 1:0 protocol all u32 match u32 0x0 0x0 at
> 0 flowid 1:1
> tc class add dev eth0 parent 1:0 classid 1:1 htb rate 5000Kbit
> tc class add dev eth0 parent 1:1 classid 1:8 htb rate 240Kbit
> tc filter add dev eth0 parent 1:1 protocol all u32 match u32 0x00000800
> 0x0000FFFF at -4 match u32 0x00060000 0x00FF0000 at 8 match u32
> 0x22D00000 0xFFFF0000 at 20 flowid 1:8
>
> The u32 filter permits to match any field of the frame, in the config
> above, 800 is for IP 06 is for TCP and 22D0 is the source port, this
> flow won't go above 240Kbit.

I may be reading this incorrectly, but as I read it, this seems to limit
all connections where 22D0 is the source port to the 240Kbit.  (I hope
that I am reading it incorrectly.)

> The problem is that may be you cannot know in advance the ports or ip
> numbers of your connections, in that case I don't know what could help
> you.

Perhaps I can explain it a bit better:

I have client machines (an unknown number of them) connecting to a certain
ip address (i.e. 10.1.1.20) at a known port (1494).  I'd like for each
machine that connects to get 30Kbps.  If there are 5 machines connecting,
and 3 are idle (no bandwidth being used), I'd like the two active machines
to still only have 30Kbps each.

Thanks,

Bill

-- 
"The great tragedy of science -- the slaying of a beautiful hypothesis by
an ugly fact."
  -- Thomas Huxley
_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux