From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Petersen Date: Mon, 18 Oct 2004 10:19:23 +0000 Subject: Re: [LARTC] IP based bandwith limit Message-Id: <417398AB.3080303@peterschen.de> List-Id: References: <41738A35.9070404@peterschen.de> In-Reply-To: <41738A35.9070404@peterschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org Hi, unfortunately there is only one interface for the customers. My problem is to limit the up AND down speed in dependence to each other. So customer A get a bandwith of 2Mbit this is up AND down so if he downloads with 1Mbit he gets a max upload speed of 1Mbit. I've tried it with htb like this: #!/bin/sh TC=/sbin/tc DEV=eth0 $TC qdisc add dev $DEV root handle 1 htb default 90 $TC qdisc add dev $DEV handle ffff: ingress $TC class add dev $DEV parent 1: classid 1:2 htb rate 100Mbit burst 6k $TC class add dev $DEV parent 1:2 classid 1:10 htb rate 10kbps ceil 10kbps $TC filter add dev $DEV parent 1:0 protocol ip prio 100 u32 \ match ip dst 192.168.1.19 \ classid 1:10 $TC filter add dev $DEV parent ffff: protocol ip prio 50 u32 \ match ip src 192.168.1.19 \ police rate 10kbps burst 10k drop flowid 1:10 this is my internal test. But it wouldn't work with dependence to each other... Greets Christoph Peter Huetmannsberger wrote: >Hi! > >Again, beware, that I am new to this myself, but if there is no borrowing >necessary, does that mean you have more than 12 Mbit to hand out. If so, I >assume you have one interface per customer, in which case you could use >tbf on each interface. If both customers are behind the same interface you >could use htb and lower the ceiling per customer, which has the same >effect, with a filter rule for each customer --> class, based on ip >address. > >Hope this helps, correct me if I am wrong. > >.peter > > >On Mon, 18 Oct 2004, Christoph Petersen wrote: > > > >>Hi, >> >>i've following problem. One of our gateway router, which connects some >>of our customers should have bandwith limit. >> >>So customer A with IP XX should have 2 Mbit, customer B with IP YY >>should have 10 Mbit. There is no need of borrowing bandwith so no >>fairness needed. >> >>My simple question: with which technique should I manage this shaping? >>Or is there any existing project which provides this allready? >> >>Greets >>Christoph >>_______________________________________________ >>LARTC mailing list / LARTC@mailman.ds9a.nl >>http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ >> >> >> > > > > > _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/