From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Mihai Vlad" Date: Fri, 05 Dec 2003 15:57:44 +0000 Subject: RE: [LARTC] Split bandwidth equally per IP Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org Thanks very much for this reply. In fact letting HTB calculate itself the burst parameter, and hard-coding the quantum parameter for each leaf class (as Stef suggested), made the traffic shaping much more accurate than it was before. (especially the quantum settings > 1500). I will make the changes in sch_sfq.c and keeep you all informed with the results. -----Original Message----- From: jzeeff@internet2.edu [mailto:jzeeff@internet2.edu] Sent: Friday, December 05, 2003 5:19 PM To: Stef Coene Cc: Mihai Vlad; lartc@mailman.ds9a.nl Subject: Re: [LARTC] Split bandwidth equally per IP Here are my untested (but simple) changes to SFQ to make it share outgoing bandwidth "fairly" per ip address (roughly, per local user) instead of being susceptible to being tricked by users with many connections. Don't use this on the wrong side of a NAT box where there is only one source ip address in use. In net/sched/sch_sfq.c: Change: h = iph->daddr; h2 = iph->saddr^iph->protocol; if (!(iph->frag_off&htons(IP_MF|IP_OFFSET)) && (iph->protocol = IPPROTO_TCP || iph->protocol = IPPROTO_UDP || iph->protocol = IPPROTO_ESP)) h2 ^= *(((u32*)iph) + iph->ihl); break; To: h = h2 = iph->saddr; break; _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/