Re: Too stupid to figure out shaping

Linux Advanced Routing and Traffic Control

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

 



John,

Personally I think you're doing too much. All the ISPs here offer a specified amount of 
bandwidth to different classes of customer. However, they also list a contention ratio. 
Thus they might say customer class A gets 512Kbit/s with a contention rate of 8:1 
and customer class B gets 256Kbit/s with a contention ratio of 12:1.

This is very simple to set up. Assume we have eight class A customers and twelve 
class B customers. Similar to what you did before, set up two HTB classes off the 
root and use ip tables to mark customer packets according to their assigned IP 
address. Make sure that the HTB classes are using SFQ. Now all eight class A 
customers will share the 512Kbit/s class, with traffic distributed evenly among all 
active flows.

If this type of solution is not satisfactory for your customers then you will need to set 
up a separate class for each individual customer and mark their packets 
appropriately. This may be more hassle than its worth, depending on the number of 
customers you have.

Regards
Brian Carrig

On 27 Apr 2005 at 10:35, John Gorkos wrote:

> First I'll confess my sins, then I'll beg for help.
> 
> I own a small wireless ISP, and I sell service at three levels,
> 256kb/s, 384kb/s, and 512kb/s.  For about 18 months, I thought I had
> this bandwidth limiting figured out.  I had three HTB classes off the
> root, one each with the limits above.  Since each customer has a
> single IP address, I used iptables to mark packets destined for each
> subscriber with level 1,2 or 3.  It looked like it worked great: 
> Customer A got 256, B got 384, and C got his 512.  In hindsight, it
> was wishful thinking, since ALL 256kb/s customers got dumped into the
> same 256 class and had to duke it out for that 256kb/s, instead of
> each customer getting their own 256kb/s slice.  Eventually, as I added
> more customers, people started complaining that they weren't getting
> what they're paying for (rightly).
> 
> So, now I'm running my ISP with no bandwidth shaping and I'm
> struggling to get my brain wrapped around how make sure everyone gets
> what they pay for, but not more.
> 
> From the reading I've done, it looks like I need a separate class for
> each subscriber.  Inside that class, I'd like to have a standard set
> of queues to prioritize each customer's slice of bandwidth by port
> (typical three band stuff:  interactive, web,bulk).
>   So assuming I've got three customers:
> 10.0.0.10 gets256kb/s
> 10.0.0.11 gets 386 kb/s
> 10.0.0.12 gets 256kb/s
>  I think I'd have a tree like this:
> 
>                         CLASS 10 (256kb/s) (inner classes prioritize)
> ROOT -----        CLASS 11(384kb/s)                 "
>                         CLASS 12 (256kb/s)                "
> plus three filters to direct iptables-marked traffic to the
> appropriate queue and three iptables entries to mark the traffic
> appropriately.
> 
> The problem is, I'm simply not smart enough to actually IMPLEMENT
> this.  I tried setting up the HTB classes, and when I added the 5th
> one (class 15 in the little diagram above), my interactivity to the
> router went to near 1000ms RTT (I was ssh'ed into it).  I started
> getting calls from my customers immediately saying something was
> 'wrong with the internet'.  I'm not sure what happened, since I hadn't
> installed any filters or anything.
> 
> Anyway, I'd dearly appreciate some help on this.  Surely this is a nut
> that someone has already cracked, but for the life of me all I can
> find on the internet are how-to shape your own outbound traffic to
> your ISP so your P2P traffic (the BANE of ISPs) doesn't interfere with
> your Doom3 deathmatch.
> 
> Thanks in advance,
> John Gorkos
> _______________________________________________
> LARTC mailing list
> LARTC@xxxxxxxxxxxxxxx
> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


-- 
Brian Carrig
Research Assistant
Department of Computing & Networking
Institute of Technology, Carlow
Tel. No.: +353 59 9176314
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux