set_client_bandwidth
Limit or update a client's bandwidth by configuring a RouterOS Simple Queue with upload/download rates; preview changes before confirming.
Instructions
Limit a client's bandwidth via a RouterOS Simple Queue (/queue/simple).
target is the client's IP address or subnet (e.g. "10.0.0.5" or
"10.0.0.0/24"). max_limit is a RouterOS rate pair in
"upload/download" form (e.g. "10M/5M"); limit_at is the optional
guaranteed-rate (CIR) pair in the same form. If a Simple Queue
already targets target, its max-limit/limit-at is UPDATED;
otherwise a new one is CREATED with a name derived from target -
the returned operation field ("set_client_bandwidth_update" vs
"set_client_bandwidth_add") tells you which happened (or would
happen, with confirm=False).
WRITE tool, guarded: blocked entirely unless the server is running with MIKROTIK_ALLOW_WRITE=true. Call with confirm=False (the default) to get a before/after preview without changing anything; call again with confirm=True to actually apply it.
GOTCHA - FastTrack: if the device has a FastTrack rule in its firewall (common on RouterOS's own quick-set wizards), fasttracked connections bypass queueing entirely, so this queue may have no visible effect on a client whose traffic is already fasttracked - see README's "Security model" section.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | ||
| confirm | No | ||
| limit_at | No | ||
| max_limit | Yes | ||
| device_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||