You can go one step further. If you are charging differential rates to customers, the you can fine tune as per scenario discussed under: Let us say customer A has paid more for bandwidth than customer B, then customer should have a greater lien on spare bandwidth than customer B. This is achieved by prio in qdisc. Let us give customer A prio 1 and B prio 2. If customer A and B have used their rattes and 400Kb spare bandwidth is available, then the full 400kb goes to A. If customer A is at 800kb and B at 250Kb, then 300Kb (1.1 ceiling-0.8 actual) goes to A so that he hits ceiling and the balance 100kb goes to B. Stef is this scenario correct. In case I'm wrong, please let me know. Mohan -----Original Message----- From: lartc-admin@mailman.ds9a.nl [mailto:lartc-admin@mailman.ds9a.nl]On Behalf Of Stef Coene Sent: 20 December 2002 02:40 To: Brian Capouch; lartc@mailman.ds9a.nl Subject: Re: Using HTB as an ISP "provisioning engine" On Thursday 19 December 2002 21:51, Brian Capouch wrote: > I am new to shaping but not to routing; forgive me if this request is > inappropriate for this list. > > I am a very small ISP and would like to use HTB to enforce contractual > bandwidth limits on my customers. I am trying to think through one > aspect of this that is vexing me. I'm sure it's no great secret that > many ISPs oversell their bandwidth, and in our case we have a > combination of accounts that total approximately 2.2Mbs on our feed, > which is 1.2Mbs. (Concentrating right now on our download stream) > > How could something like this be accomodated? The documentation says > that the total bandwidth allocations of a set of subclasses should total > that assigned to the class. > > But my understanding is that if I bump up the bandwidth on the primary > class to a value greater than my actual bandwidth, then I'm going to be > filling up queues at the upstream ISP and negatively affecting my > performance. > > I'm sure there is something I'm missing, but I've discussed this with a > couple of fellow network engineers and neither was able to posit how > such thing might work, although they both said they were sure that it is > a common scenario. You can create a root class with rate = ceil = 1.2 Mbps. Create a class for each customer with ceil = selled bandwidth and the sum of the rates=1.2Mbps. Example : You selled 1.1 Mbps to customer1 and 0.37 (=2.2Mbps/6) to 3 other customers. So you have a total bandwidth of 2.2Mbps. But you have only 1.2 Mbps available. class rate = ceil = 1.2 Mbps class1 rate = 0.6, ceil = 1.1Mbps class2 rate = 0.2, ceil = 0.37Mbps class3 rate = 0.2, ceil = 0.37Mbps class4 rate = 0.2, ceil = 0.37Mbps The bandwidth you selled to the customers is the ceil. They never can use more then the ceil. If one customer is using no bandwidth, the remaining bandwidth is given to the other customers. If all customers are using all bandwidth, each customer is "punished" in the same way. You can also give the customers a possibility to use as much bandwidth as available. To do so, give each class ceil = 1.2Mbps, but that bandwidth is not guaranteed. In this case, the rate is the minimum bandwidth they can get. So for a SLA, you can say to the customer : "You have a minimum bandwidth of 0.6Mbps and a maximum bandwidth of 1.2Mbps." Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ 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/