Re: SFQ with Per Flow Caps

Linux Advanced Routing and Traffic Control

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

 



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.  Slightly preferable to this would be something that would
> actually work per flow instead of the stochastic algorithm.
> 
> Is this possible?
> 
> Thanks,
> 
> Bill
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.
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.

t
t
-- 
vincent-perrier <vincent-perrier@xxxxxxxxxxxxxxxx>

_______________________________________________
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