From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerardo Arceri Date: Mon, 20 Dec 2004 21:43:37 +0000 Subject: Re: Re: [LARTC] HTB High CPU Utilization Message-Id: <41C74789.20106@elfarto.com.ar> List-Id: References: <41B0CF87.4050008@elfarto.com.ar> In-Reply-To: <41B0CF87.4050008@elfarto.com.ar> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org > or example, let's say you have 2000kbit of total > bandwidth for output and that you are running both and > http and an ftp server. > > Now let's say that you have two users that want to connect > to your machine and that both of them can potentially use > all of your output bandwidth. One of them want to connect > to the http server and the other to the ftp one. > > So you tell tc to assign http traffic to class 3 that can > use only up to half the total output bandwidth, 1000kbit, > but you don't say anything about the ftp traffic. > > If both the user tries to connect at the same time they of > course use the whole output bandwidth but, since there is > one kind of traffic that isn't "regulated" (it is assigned > to class 10 that doesn't exist), there is a continuos > fight between the two of them and the speed at which they > download is very irregular. > > > Have I understood well? Yes you have, that's exactly my setup, i have a 100Mbps Ethernet connection to the router which has a 20Mpbs pipe to the net, I only want to limit certain ips from using too much outgoing pipe > tc qdisc del dev eth0 root > tc qdisc add dev eth0 root handle 10: htb default 10 > tc class add dev eth0 parent 10: classid 10:3 htb rate 1000kbit ceil > 1000kbit > tc filter add dev eth0 parent 10: protocol ip prio 3 handle 2 fw classidI thought that by not specifying a default rate the traffice would go unshaped So tc is a game of all or nothing ? i mean, i can't say to tc that all traffic except the one coming from X IP doesn't get a class ? _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/