I use burst queues like this for all my users...here is an example:

name="<hotspot-louanne>" target-addresses=10.71.0.118/32
      dst-address=0.0.0.0/0 interface=all parent=none direction=both
      priority=8 queue=default-small/default-small limit-at=350k/350k
      max-limit=350k/350k burst-limit=1100k/1100k burst-threshold=300k/300k
      burst-time=50s/50s total-queue=default-small

Max-limit is the bandwith they will be capped at after exceeding
burst-threshold for a running average over burst-time seconds. So for me,
my users get 1100k until they have exceeded 300k over a running average of
50 seconds. Then they get capped at 350k until they drop beow 300k for a
running average of 50 seconds. So for page browsing and plain email
downloads, they are always seeing 1100k. But, extended downloads get
capped at 350k until they are done. Keep in mind that burst-threshold has
to be lower than your max-limit or your criteria will never be met and
they will be "Bursting" all the time. That is where your problem is. Also,
because it is a running average of 300k over 50 seconds, the real burst
time is more like 30 seconds or so of 1100k in my system based on
observatio. I would set up your queue like this ( to give 10Mbps down
burst with a cap at 2M down):

name="<user" target-addresses=xx.xx.xx.xx/32
      dst-address=0.0.0.0/0 interface=all parent=none direction=both
      priority=8 queue=default-small/default-small limit-at=512k/2M
      max-limit=512k/2M burst-limit=1100k/10M burst-threshold=500k/1500k
      burst-time=50s/50s total-queue=default-small

Try that.

Cameron

> I spent x-mas at the inlaws. They just recently switched from
> Sat-based Internet service to a Canopy provider. The service was great
> and what I really liked was that he was paying for 512/512 service,
> but was able to burst to 4.5mbps or so when he would first get on a
> site/youtube/whatever.
>
> If you could graph the experience, it would look like this
> <tranzeofaq.com/curve.gif>. You can see the initial start of, say a
> Youtube Video download. You would get X amount of download and then it
> would slowly taper you off down to "what you were paying for".
>
> The service as the provider explains it is:
> 512K down and up with a "5MB File Buffer".
>
> When I looked through the other lists, I found the email at the bottom
> of this message. Using this message I think I have the following
> simple queue setup properly for 1mbps/512mbps with a burst to what
> they would normally get, up to, in this case, 10MB of data.
>
> add burst-limit=2048k/4M burst-threshold=2048k/4M burst-time=5s/5s
> comment="" direction=both \
> disabled=no dst-address=0.0.0.0/0 interface=lan limit-at=512k/1M
> max-limit=1024k/2M \
> name=<some customer> parent=none priority=8
> queue=wireless-default/wireless-default \
> target-addresses=<customerIP>/32 total-queue=default-small
>
> But when I use this queue it seems to work, however, I had a guy jump
> onto Hulu or something with the queue setup above and just ride at
> 2-4MB ALL DAY LONG...
>
> I am missing something obvious.. Any help?
>
> ryan
>
>
> -----------------Copied email below-------------------------------
> Okay, as promised... to make MT mimic Canopy bursting, I'm using
> simple queues as follows:
>
> /queue simple add name=<whatever> target-addresses=\
> <ip address> interface=<interface> queue=\
> wireless-default/wireless-default limit-at=\
> <up cir>/<down cir> max-limit=\
> <up sustained>/<down sustained> burst-limit=\
> <up burst>/<down burst> burst-threshold=\
> <up sustained>/<down sustained> burst-time=\
> <up burst time>/<down burst time>
>
> Here's a detailed description of each parameter:
>
> - limit-at: This is basically CIR in bits.  Set it as you would set
> your CIR in Canopy.
>
> - max-limit: Set this to your *sustained* uplink and downlink rates in
> bits per second.
>
> - burst-limit: Set this to your uplink burst rate and downlink burst
> rate in bps.
>
> - burst-threshold: Set this the same as max-limit.
>
> - burst-time: This is where it gets a little complicated.  It's
> actually quite simple.  It just took me forever to wrap my head
> around how it works.  Because Canopy does its bursting based on bits
> transfered and MT does it based on time, you have to essentially
> convert one to the other.  The formula is:
>
> bucket size in bits / sustained rate in bits per sec = burst-time
>
> So, you take your burst bucket size that you use in your Canopy SMs (I
> think Canopy calls it "burst allocation").  First multiply it by 1000
> (to convert it from kilobits to bits).  Then plug it into the formula
> above.
>
> So for example, if you use the default canopy bucket size of 500000
> kilobits (62.5 MB), and you have a sustained rate of 1024 (1 Mbps)
> you would have the following:
>
> 500000000 / 1024000 = 488 seconds.
>
> Here's an example rule that gives the subscriber a 20 MB burst bucket,
> at 5 Mbps.  After 20 MB, it drops back to 1 Mbps.  This is for
> download.  For upload, it does a 10 MB bucket at 1 Mbps.  After 10
> MB, it drops to 256k:
>
> /queue simple add name="johnsmith" target-addresses=\
> 10.30.2.50 interface=ether1 prio=8 queue=\
> wireless-default/wireless-default limit-at=128000/128000\
> max-limit=256000/1024000 burst-limit=1024000/5120000\
> burst-threshold=256000/1024000 burst-time=313/156
>
> One thing to keep in mind is that Canopy likes its bursting parameters
> in kbps, while MT wants it in bps.  So, you need to multiply by 1000
> before plugging those numbers into MT.
>
> Anyway, this has been working beautifully for me.  Let me know if you
> have any questions or trouble with it.
> _______________________________________________
> Mikrotik mailing list
> [email protected]
> http://www.butchevans.com/mailman/listinfo/mikrotik
>
> Visit http://blog.butchevans.com/ for tutorials related to Mikrotik
> RouterOS
>


_______________________________________________
Mikrotik mailing list
[email protected]
http://www.butchevans.com/mailman/listinfo/mikrotik

Visit http://blog.butchevans.com/ for tutorials related to Mikrotik RouterOS

Reply via email to