RADIUS Rate-Limit Builder

Build the Mikrotik-Rate-Limit attribute string correctly - rates, burst, threshold, burst time, priority and limit-at - and see exactly how RouterOS will interpret each field.

Config generator RADIUS & AAA Runs in your browser
What the subscriber receives.
0 disables the guarantee.
Try:

Result

Mikrotik-Rate-Limit
20000k/100000k 30000k/150000k 15000k/75000k 8/8 8
Download
100.0 Mbit/s
Upload
20.0 Mbit/s
Burst download
150.0 Mbit/s
Data transferable at burst
95.4 MiB
before burst expires
FreeRADIUS users file
subscriber01  Cleartext-Password := "change-me"
        Mikrotik-Rate-Limit = "20000k/100000k 30000k/150000k 15000k/75000k 8/8 8",
        Service-Type = Framed-User,
        Framed-Protocol = PPP,
        Acct-Interim-Interval = 300
FreeRADIUS SQL (radreply)
INSERT INTO radreply (username, attribute, op, value)
VALUES ('subscriber01', 'Mikrotik-Rate-Limit', ':=', '20000k/100000k 30000k/150000k 15000k/75000k 8/8 8');
Equivalent RouterOS simple queue
/queue simple
add name="subscriber01" target=0.0.0.0/0 max-limit=20000k/100000k burst-limit=30000k/150000k burst-threshold=15000k/75000k burst-time=8s/8s priority=8/8

How RouterOS parses this

Field order
rx-rate/tx-rate [burst-rate] [burst-threshold] [burst-time] [priority] [limit-at]
rx (first value)
traffic the router receives = subscriber upload
tx (second value)
traffic the router transmits = subscriber download
Priority
8 (1 is served first, 8 is default)
Burst threshold
75% of committed rate - burst re-arms below this average
Direction
rx is upload and tx is download, from the router's point of view. Reversing them is the single most common mistake with this attribute, and it produces a service that looks "backwards" to every customer on the NAS.

About RADIUS Rate-Limit Builder

MikroTik NAS equipment takes subscriber speed from the Mikrotik-Rate-Limit vendor-specific attribute (vendor 14988, attribute 8). It is a single positional string, and every field after the first is optional - which is exactly why it is so easy to get subtly wrong.

The field order

rx-rate/tx-rate rx-burst/tx-burst rx-threshold/tx-threshold rx-burst-time/tx-burst-time priority rx-limit-at/tx-limit-at. Fields are positional, so to set priority you must supply placeholder 0/0 values for burst fields you do not use. Rates accept k and M suffixes; bare numbers are bits per second, which is a fast way to accidentally provision a 100 bit/s service.

How burst actually behaves

RouterOS tracks the average rate over the burst-time window. While that average stays below the burst threshold, the subscriber is allowed up to the burst rate; once the average exceeds the threshold, they drop back to the committed rate. Setting the threshold equal to the committed rate means burst never re-arms after the first use - a common misconfiguration that generates "it was fast on day one" tickets.

Common use cases

  • Provisioning PPPoE or hotspot subscriber speeds from FreeRADIUS instead of per-queue configuration.
  • Adding a marketing burst tier without touching the NAS.
  • Changing a customer plan with a CoA rather than a disconnect.
  • Migrating static simple queues into RADIUS-driven policy.

Edge cases and gotchas

  • rx is the subscriber upload and tx is the download - from the router's perspective, not the customer's.
  • Priority only affects traffic competing inside the same parent queue; it does nothing on an uncongested link.
  • RouterOS applies the attribute at session start. Changing it in the database has no effect until reconnect or a CoA.

Frequently asked questions

Why is my customer getting the upload and download the wrong way round?
The rx/tx order is reversed. rx-rate is what the router receives from the subscriber - their upload - and it comes first.
Can I change speed mid-session?
Yes, with a CoA (Change of Authorization) packet carrying the new Mikrotik-Rate-Limit. Use the CoA builder to construct it. A disconnect works too but drops the session.
Does this work on non-MikroTik NAS equipment?
No. It is vendor-specific to MikroTik. Cisco uses Cisco-AVPair with qos policy names, and other vendors use their own VSAs or the standard WISPr-Bandwidth-Max attributes.