API reference
Every tool the server exposes, grouped into 31 categories in 12 feature areas (253 tools total). Each entry shows the name, what it does, its parameters (required vs optional), and a canonical example. Wondering which RouterOS commands are not covered yet? See the API coverage.
Naming convention. A tool is named <verb>_<resource>: a verb —
create, list, get, update, remove, plus
category-specific verbs such as enable, move or flush — and what it acts
on, for example list_interfaces, create_simple_queue or enable_safe_mode.
These are the names the server registers, so they are what an MCP client lists and what you pass when you call
a tool. Some clients show them qualified with the server name (Claude Code, for one, shows
mcp__<server>__list_interfaces). Older releases and tutorials show many of them with a
mikrotik_ prefix; the server no longer registers it, so use the names on this page. With a
multi-device inventory configured, every device-scoped tool also accepts an optional
device argument naming the inventory title to target.
Feature areas. The categories are grouped into the same feature areas as the packages under
src/mcp_mikrotik/scope/, so a category's code, its unit tests and its reference pages are easy to find from one
another in the repository; see
Contributing.
Failures are reported as failures. A write that RouterOS refuses, or that finds nothing to change (an id or a name
that does not exist), is reported as a failure with RouterOS's answer instead of a success message.
Categories
Inventory — Multiple Devices
Manage a whole fleet from one server. Devices are declared in a
YAML inventory; each entry has a unique title, and every
device-scoped tool accepts an optional device argument naming the title to
target. With no inventory configured the server behaves exactly as before — a single device
built from MIKROTIK_HOST / MIKROTIK_USERNAME / …, and
device can be omitted everywhere.
Lists the devices this server manages — title, host, port, username, tags, and region. Credentials are never returned. Use it to discover the fleet before targeting a device.
The inventory is YAML, from one of two sources —
MIKROTIK_INVENTORY_FILE (path to a YAML file, recommended) or
MIKROTIK_INVENTORY (the inventory written inline; YAML flow syntax needs no
escaped quotes, and plain JSON works too since it's a YAML subset). When both are set,
the inline value wins. A broken inventory (missing file, bad YAML, invalid
entry) stops the server at startup with one clear message. A ready-to-copy template ships at
the repository root as inventory.example.yml.
device — matching is case-insensitive22, adminpassword when using a keySSH_AUTH_SOCK; default falseSHA256: fingerprint; requires allow_ssh_agent: true[branch, eu], NL — great targets for "every device tagged office" promptsEvery device-scoped tool takes an optional device argument.
One device configured — omit it; that device is used automatically.
More than one — pass the title. Omitting it, or passing an
unknown title, returns an error that lists the valid titles, so an AI caller corrects
itself on the next call instead of quietly running the command on the wrong router.
/config as the mount point:
-v "$PWD/inventory.yaml:/config/inventory.yaml:ro" -e MIKROTIK_INVENTORY_FILE=/config/inventory.yaml.
Two traps the entrypoint catches with an explicit error: the container runs as
uid 1000, so the file must be readable by that uid
(chmod 644 is usually enough); and if the host file doesn't exist at start,
Docker silently creates a directory in its place — create the YAML first. The
entrypoint also accepts --inventory '<yaml>' / --inventory-file <path>.
When an inventory is configured it wins, and MIKROTIK_HOST /
MIKROTIK_USERNAME / MIKROTIK_PASSWORD / MIKROTIK_PORT /
MIKROTIK_ALLOW_SSH_AGENT / MIKROTIK_SSH_AGENT_KEY
are ignored. See Installation.
enable_safe_mode(device="office-core") leaves
every other device untouched. The inventory is a secret — it holds fleet
credentials, so prefer key_filename, restrict file permissions, and remember
env values show in docker inspect. Validation errors never echo inventory
contents, so a typo can't leak a password into a log. For a local two-device lab,
routeros-docker/docker-compose.yml starts routeros-a (SSH
127.0.0.1:2222) and routeros-b (:2223).
Safe Mode — Atomic Sessions
RouterOS safe-mode wraps a sequence of changes; if the management session drops before you commit, every change auto-reverts. Highly recommended when editing firewall or connectivity rules remotely.
enable_safe_mode opens a persistent SSH shell and sends a
Ctrl+X to the router. While active, every subsequent MCP tool call is
routed through that same session automatically (the connector detects it — no per-command
connections). commit_safe_mode sends a second Ctrl+X,
writing the pending changes to flash/NVRAM. RouterOS keeps them only if the session is released before the
connection closes, so the tool checks the console state first, waits for the release and closes the SSH session only
when the prompt no longer shows <SAFE>; a commit takes a few seconds. rollback_safe_mode
simply drops the session (no Ctrl+X), so RouterOS reverts everything. Pending
changes live in memory only — a router reboot, not just a dropped connection, also
reverts them. Concurrent calls are serialised through an internal lock, so parallel requests are safe. With an inventory, safe mode is tracked per device — enabling it on one router leaves the others untouched.
Starts a safe-mode session; afterwards every tool call runs inside the one persistent
shell until you commit or roll back, and a command that fails answers at once with RouterOS's error text. If the SSH
connection fails or the router does not confirm the safe-mode session, the tool returns a tool error
(isError), never a successful answer.
Persist the journaled changes, or revert them immediately. Both are no-ops when safe mode
isn't active — they return "Safe mode is not active. Nothing to commit / roll back." When the release
cannot be confirmed, or the console state cannot be read, commit_safe_mode returns a tool error and leaves the
session open: the changes are still pending and not persisted, so call it again or roll back. If the
console was no longer in safe mode when the commit started, it returns a tool error and sends nothing; check the
configuration before relying on the changes.
Reports whether a safe-mode session is currently active — e.g.
"Safe mode is ACTIVE. Changes are pending — NOT yet persisted…" versus
"Safe mode is NOT active…".
DHCP — Pools, Networks, Servers
Three-piece model: a pool defines the address range, a network defines gateway and DNS, and a server binds them to an interface.
Build a DHCP service for a subnet in three steps. create_dhcp_server takes
name + interface (plus optional lease_time defaulting to
"1d", address_pool, authoritative, …).
List all DHCP servers or fetch one by name.
Raw, detailed views of who actually holds an address — IPv4 DHCP leases and DHCPv6 bindings. Identity filters match the active lease fields. Address and identity filters use substring matching; server, status, and lease time use exact matching.
lease-time field for leases, life-time for bindings1h or 24hEdit or delete a DHCP network record (the gateway/DNS half of the
three-piece model), keyed by its network CIDR. update takes any of
gateway, netmask, dns_servers, domain,
wins_servers, ntp_servers, dhcp_option, and
comment.
Removes a DHCP server. The underlying pool and network records survive.
DNS — Resolution & Static Records
Set upstream servers (with optional DNS-over-HTTPS), manage static
A/CNAME/MX/SRV/TXT records, regex blocklists, and inspect or flush the cache.
Run live test queries with test_dns_query.
Configure upstream resolvers, add static records, and define regex-based blocklists. An empty servers list given to set_dns_servers clears the upstream servers, and options left out keep their current value.
set_dns_servers also accepts allow_remote_requests, cache tuning
(cache_size, cache_max_ttl, max_udp_packet_size,
max_concurrent_queries), and DoH options (use_doh, doh_server,
verify_doh_cert). add_dns_static takes the record-type fields
cname, mx_preference/mx_exchange, text,
srv_priority/weight/port/target, plus
ttl and regexp.
Inspect resolver settings, list or fetch static records, dump the cache and its statistics, and run a live test query.
Test queries run through RouterOS
:resolve, so type accepts A/ipv4 (default),
AAAA/ipv6, any, and any6 only — record-type
lookups such as MX or TXT aren't supported by :resolve.
Edit a static record, enable/disable it without deleting, clear the resolver cache, or dump the full DNS configuration to a file.
Firewall — Filter Rules
Manage IPv4 filter rules across the input, forward,
and output chains. Includes rule ordering, enable/disable, and basic
firewall scaffolding. For IPv6, see IPv6 Firewall.
Creates a new firewall filter rule. Most match parameters are optional — combine them to build whatever predicate you need.
input, forward, or output/interface list (e.g. "LAN", "WAN") rather than a single interface"established,related"List rules with optional filters (chain, action, addresses, protocol, interface, disabled/invalid/dynamic), or fetch a single rule by ID.
Edit a rule in place, reorder it within its chain (critical for ordered evaluation), or toggle it on/off without removing it. update_filter_rule takes rule_id plus the create fields except place_before; use move_filter_rule to change the position.
Creates a sensible baseline: accept established/related, drop invalid, accept ICMP,
drop everything else on input. Useful for fresh routers.
IPv6 Firewall — Filter Rules
Filter rules under the RouterOS /ipv6 firewall filter
tree — the IPv6 counterpart of the Firewall (IPv4) category. IPv6
lives in a separate command tree, so the IPv4 tools neither see nor touch these rules. Two
differences bite most often: ICMP is spelled icmpv6, and addresses are IPv6
prefixes such as 2001:db8::/64.
Creates an IPv6 filter rule. Runs /ipv6 firewall filter add …. Most match
parameters are optional — combine them to build whatever predicate you need.
input, forward, or outputaction="jump"tcp, udp, icmpv6"established,related"unicast, multicast, localtype:code — 128:0 is echo requestequal:255hop or !hop10,5:packet); TCP flag expression (syn,!ack)List rules with optional filters, or fetch one in detail.
"2001:db8" matches every rule whose address begins with iticmpv6, not icmpin-interface or out-interface*1 — the positional numbers shown by print are per-session and do not resolve hereEdit a rule in place, reorder it within its chain (critical for ordered evaluation), or
toggle it without removing it. update takes rule_id plus any create field except place_before (use move to change the position) — pass an empty string to clear an optional field. move
takes a 0-based destination.
*3NAT — Translation Rules
Source-NAT (masquerade) for outbound, destination-NAT (port forwarding) for inbound, plus rule ordering and toggle.
Creates a NAT rule on the srcnat or dstnat chain.
srcnat or dstnatInspect NAT rules — optionally filtered by chain. get returns one rule's full record.
Same edit / reorder / toggle surface as the firewall counterparts. update_nat_rule takes every create field except place_before; use move_nat_rule to change the position.
Firewall Raw — Pre-conntrack Rules
Tools for the RouterOS raw tables, /ip firewall raw and
/ipv6 firewall raw. Raw rules run before connection tracking, in the
prerouting and output chains. They are used to drop unwanted traffic cheaply (for
example traffic from a blocklist, or bogons on the WAN) and to exempt traffic from connection tracking with
action=notrack. Raw rules see no connection state, so there is no connection_state
matcher.
Each tool exists twice, with the same parameters: *_raw_rule(s) for IPv4
and *_ipv6_raw_rule(s) for IPv6. The only parameter that differs is the TTL matcher, ttl
for IPv4 and hop_limit for IPv6. In IPv6 the ICMP protocol is spelled icmpv6. With
--read-only, only list_* and get_* are exposed.
| IPv4 | IPv6 | Annotation |
|---|---|---|
list_raw_rules | list_ipv6_raw_rules | READ |
get_raw_rule | get_ipv6_raw_rule | READ |
create_raw_rule | create_ipv6_raw_rule | WRITE |
update_raw_rule | update_ipv6_raw_rule | WRITE_IDEMPOTENT |
enable_raw_rule / disable_raw_rule | enable_ipv6_raw_rule / disable_ipv6_raw_rule | WRITE_IDEMPOTENT |
move_raw_rule | move_ipv6_raw_rule | WRITE_IDEMPOTENT |
remove_raw_rule | remove_ipv6_raw_rule | DESTRUCTIVE |
Creates a raw rule. Runs :put [<menu> add …] and reports the new internal id. Most match parameters are optional.
prerouting, output, or a custom chain reached by a jumpaccept, drop, notrack, jump, return, log, passthrough, add-src-to-address-list, add-dst-to-address-listaction="jump"address_list is required with the add-*-to-address-list actions; timeout such as 1d, 12h, 00:30:00icmpv6 (not icmp) on the IPv6 toolttl on the IPv4 tool, hop_limit on the IPv6 toolList rules with optional filters, or fetch one in detail. Runs <menu> print [stats] [where …] and <menu> print detail where .id=…. IPv6: list_ipv6_raw_rules, get_ipv6_raw_rule.
print stats)*1A) or a print position (0), which is resolved to an id firstUpdates a raw rule. Runs <menu> set <id> …. Takes rule_id plus the same parameters as create, all optional, except place_before (use move_raw_rule or move_ipv6_raw_rule to change the position). Pass "" to clear a matcher (for example src_address="" sends !src-address). Any output from set is reported as a refusal, for example not enough permissions (9) for a read-only account.
place_before, all optionalToggle a rule (set <id> disabled=no|yes) or move it to a position. move_raw_rule moves the rule to the 0-based destination position, by id, then checks it landed there. IPv6: enable_ipv6_raw_rule, disable_ipv6_raw_rule, move_ipv6_raw_rule.
Removes a rule and checks it is gone.
Address Lists — Named IP Sets
Named address sets under /ip firewall address-list and
/ipv6 firewall address-list, referenced from filter rules via
src_address_list / dst_address_list. Unlike the filter scopes,
IPv4 and IPv6 share one set of tools — the entry schema is identical across
families, so each tool takes a required family of "ipv4" or
"ipv6" rather than duplicating seven tools per family.
/128 — adding
2001:db8::5 stores 2001:db8::5/128, so a bare lookup wouldn't match;
these tools canonicalise the address for you, so either form works.
List names match exactly, including spaces — "internal NS " with a
trailing space is a different list from "internal NS"; nothing is trimmed.
A hostname entry creates dynamic children — address=example.com adds
one static entry plus one dynamic entry per resolved address (use static_only to
exclude them), and an entry with a timeout is likewise dynamic and does not survive
a reboot.
Adds an entry. Runs /ip or /ipv6 firewall address-list add.
"ipv4" or "ipv6"1h (makes the entry dynamic); create disabledList entries with optional filters, or fetch one by list name and address.
"ipv4" or "ipv6"static_only excludes hostname/timeout childrenEdit an entry located by its current list_name + address, or toggle it
without removing it. update takes new_list_name, comment,
timeout, and disabled — pass "" to clear
comment or timeout. The change is confirmed on the device
before success is reported: a refusal RouterOS phrases without the words "failure" or "error" —
a read-only account answers not enough permissions (9) — is reported as a failure
rather than a successful update.
Removes the matching entry. Removing a hostname entry also clears the dynamic entries RouterOS derived from it.
Interfaces — All Interface Types
List and manage every interface on the device — ethernet, bridge,
WireGuard, PPPoE, VLAN, WiFi, SFP, LTE, loopback. The equivalent of
/interface print in RouterOS. For type-specific create/remove, use the dedicated
categories (VLAN, WireGuard, Wireless).
Lists all interfaces, with optional filtering by type, name, or running/disabled state.
ether, bridge, vlan, wg, pppoe-out, wifi, lte, loopback, …"ether" matches ether1, ether2 …Returns detailed information about a single interface by exact name.
"ether1", "bridge", "pppoe-out1", "wg0"Bring an interface up or take it down without removing it.
VLAN — Tagged Interfaces
Create, list, inspect, update, and remove tagged 802.1Q interfaces. Parent interfaces can be any physical port or bridge.
Creates a VLAN interface on a parent port.
Lists VLAN interfaces, optionally filtered.
Returns full details for a specific VLAN interface.
Updates an existing VLAN interface in place. Pass only the fields you want to change.
Removes a VLAN interface. Dependent IP addresses, DHCP servers, and firewall rules that reference the interface will be orphaned — clean them up first.
Bridge — VLAN Table & Port PVID
Manage the bridge VLAN table (which ports carry each VLAN tagged or untagged) and the
per-port PVID, frame types and ingress filtering of bridge ports. Every write is confirmed on the device
before success is reported; a refusal (for example not enough permissions (9) from a read-only
account) or an entry that does not exist comes back as a failure.
vlan_ids is a VLAN ID, a range, or a comma list of either, and it has to
match the stored value exactly: an entry holding 20,30 is found by "20,30", not by
"20".
Lists bridge VLAN table entries (tagged/untagged port membership per VLAN).
Adds an entry to the bridge VLAN table.
Updates an existing bridge VLAN table entry.
"" to clear)"" to clear)Removes an entry from the bridge VLAN table.
Lists bridge ports, including each port's PVID.
Updates per-port VLAN, STP/RSTP and DHCP snooping settings on a bridge port.
admit-all, admit-only-untagged-and-priority-tagged, or admit-only-vlan-taggedprotocol-mode=mstp (1 to 200000000)auto, no, no-discover, yes or yes-discoverauto, no or yesdhcp-snooping=yesWireGuard — Tunnels & Peers
Create WireGuard interfaces, add peers with allowed-IPs and endpoints,
and generate ready-to-paste client configs. The interface's public key is returned by
get_wireguard_interface — hand it to clients. WireGuard requires RouterOS v7+.
Stands up a WireGuard interface. If no private key is supplied, one is generated; read the
matching public key back via get_wireguard_interface.
"wg0"13231)1420)List all WireGuard interfaces or fetch one — the latter includes the device's public key for clients to use.
Edit, toggle, or remove an interface. Removing an interface also deletes all of its peers.
Attaches a peer to an interface.
Inspect peers and their handshake state.
Edit, toggle, or remove peers. Identifiers are RouterOS peer IDs.
Produces a complete client .conf (the [Interface] / [Peer] blocks) ready to paste into a WireGuard client. This tool only formats text locally — it does not contact the router, so first use get_wireguard_interface for the server's public key and add_wireguard_peer to register the client.
51820, 0.0.0.0/0, keepalive 25. Use allowed_ips="0.0.0.0/0, ::/0" for a full tunnel, or a specific subnet for split-tunnel.The single-purpose tools above compose into a full VPN server. Run them in order — steps 2–4 reach into other categories (IP address, firewall, NAT):
Wireless — WiFi Interfaces & Security
Wireless interface management. RouterOS 7 has replaced the old /interface wireless menu with /interface wifi, and the tool names and security model changed with it. The interface tools detect which of the two menus your device has and translate automatically; run check_wireless_support first to see which one applies.
On RouterOS 7, security is set either inline with set_wireless_passphrase or as a named security profile (/interface wifi security) created with create_wireless_security_profile and assigned with set_wireless_security_profile. The security-profile and access-list tools work on RouterOS 7 only; on the legacy menu they answer with an error and change nothing. One controller configuring several access points has its own category: CAPsMAN.
Checks if the device supports wireless and reports the RouterOS version and the wireless menu in use. Call this first.
Creates a wireless interface. On RouterOS 7 this is a virtual AP on an existing radio interface: RouterOS needs to know which radio, so master_interface is required there.
false)create_wireless_security_profile; on legacy devices a security profilewifi1/interface wireless only; radio_name is required there. RouterOS 7 refuses these with an error instead of ignoring themLists wireless interfaces, or fetches one interface by exact name. On legacy wireless a running interface set to frequency=auto is listed with the channel it is on right now, for example frequency=auto (active: 5180/20-Ceee/ac/P(23dBm)), which costs one extra command per such interface.
false)Updates a wireless interface's name, SSID, enabled state or comment, and on RouterOS 7 the configuration profile it uses and who configures it.
create_wifi_configuration, and who configures the radio: local, capsman or capsman-or-local. The radios of a CAP need capsman or capsman-or-local to take their settings from the controllerSets the WiFi passphrase directly on a RouterOS 7 wireless interface. On a legacy /interface wireless device, where passphrases live in security profiles, it says so and changes nothing.
wpa-psk, wpa2-psk, wpa3-psk, owe, wpa-eap, wpa2-eap, wpa3-eap, wpa3-eap-192; anything else is refusedEnables, disables or removes a wireless interface.
Scans for nearby networks with the given interface (the command blocks for the scan duration), and lists the connected clients with signal data.
monitor_wireless_interface takes one snapshot (once) of an interface's real-time status, frequency, CCQ, noise floor and client counts. monitor_wireless_frequency shows frequency usage and noise floor across channels on legacy wireless interfaces (/interface wireless frequency-monitor); running it briefly interrupts the clients connected to that radio.
monitor_wireless_frequency: 1 to 30 seconds, default 5RouterOS 7. Named security settings in /interface wifi security, shared by any number of interfaces. Create, list, show or remove a profile, or assign one to an interface. Passphrases are never printed by these tools.
["wpa2-psk", "wpa3-psk"]RouterOS 7. Rules in /interface wifi access-list that accept or reject clients. A rule with neither mac_address nor interface matches every client. create_wireless_access_list returns the new rule's id, and list_wireless_access_list shows each rule with the id that remove_wireless_access_list_entry takes.
AA:BB:CC:DD:EE:FFaccept (default) or reject*1CAPsMAN — RouterOS 7 Wi-Fi Controller
CAPsMAN lets one router (the controller) configure the Wi-Fi of several MikroTik access points (CAPs). These tools manage the CAPsMAN of the RouterOS 7 Wi-Fi package, /interface wifi, on RouterOS 7.13 and later: the controller (/interface wifi capsman), the configuration profiles (/interface wifi configuration), the provisioning rules (/interface wifi provisioning), the access points that registered (/interface wifi capsman remote-cap), and the access point side (/interface wifi cap).
The legacy CAPsMAN of the wireless package (/caps-man) and the wifiwave2 menu of RouterOS 7.12 and earlier are not supported; on a router without /interface wifi every tool answers with an error and changes nothing. Every change is read back from the router before the tool reports success. These tools never take or print a passphrase: it lives in a security profile (see Wireless).
create_wireless_security_profile(name="sec-home", authentication_types=["wpa2-psk", "wpa3-psk"], passphrase="...")create_wifi_configuration(name="cfg-home", ssid="Home", country="Netherlands", security="sec-home", datapath_bridge="bridge1")create_wifi_provisioning_rule(action="create-dynamic-enabled", master_configuration="cfg-home", supported_bands=["5ghz-ax"])set_wifi_capsman(enabled=True, interfaces=["bridge1"], ca_certificate="auto", certificate="auto")
Then, on each access point: set_wifi_cap(enabled=True, discovery_interfaces=["bridge1"]) and update_wireless_interface(name="wifi1", configuration_manager="capsman-or-local") for each radio. A radio takes its settings from the controller only when its configuration_manager says so; list_wifi_remote_caps on the controller shows the access points that registered.
Shows the CAPsMAN settings (enabled, the interfaces it listens on, the certificates and the upgrade policy), or turns CAPsMAN on or off and changes them. Only the parameters you pass change.
["bridge1"] or ["all"]; [] unsets itauto lets CAPsMAN create its CA certificate, none, or a certificate nameauto or a certificate namenone, suggest-same-version or require-same-versionLists the access points that registered with this controller (address, identity, board, serial, version, state). When there are none, it says whether CAPsMAN is turned off.
Creates a configuration profile: the settings a radio gets (SSID, country, security profile, channel and datapath). CAPsMAN hands profiles out through provisioning rules; a local radio can use one too.
Netherlands or United Statesap, station, station-bridge or station-pseudobridgelocal, capsman or capsman-or-local5ghz-ax; 20/40/80mhz["5180", "5200-5240"]Lists the configuration profiles, or changes one; CAPsMAN pushes the change to the radios that use it. update_wifi_configuration takes name (the profile to change), new_name and the same optional fields as create_wifi_configuration; only the fields you pass change, and channel_frequency=[] unsets the frequency list.
Removes a profile. RouterOS itself would remove a profile that a provisioning rule names and leave the rule pointing at nothing, so the tool refuses while a provisioning rule or a Wi-Fi interface uses the profile, and says which ones.
Creates a provisioning rule, which decides which configuration a CAP's radio gets. The controller checks the rules in order and the first one that matches wins; a new rule goes last. A rule without radio_mac, identity_regexp, address_ranges or supported_bands matches every radio.
create-dynamic-enabled (the usual choice), create-enabled, create-disabled, use-network-config or none["cfg-guest"]["5ghz-ax"]; match one radio["10.0.0.10-10.0.0.50"]cap-%Ifalse)Lists the rules in the order the controller checks them, each with its id, or removes one by that id.
*1Shows the CAP settings of this router (whether a controller manages it, how it finds one and which one it uses), or makes the router a CAP or stops it being one. Only the parameters you pass change.
["bridge1"]; [] unsets it[] unsets itrequest asks the controller for one, none, or a certificate namePoE — Power over Ethernet
Read-only monitoring of Power-over-Ethernet status and per-port
configuration on PoE-capable devices, under /interface ethernet poe. On hardware
without PoE-out ports (e.g. CHR / virtual routers) these tools report that no PoE data is
available.
Reads real-time PoE-out telemetry — status, voltage, current, and power — for
one or more ethernet interfaces. Runs /interface ethernet poe monitor … once.
Lists the PoE-out configuration (PoE-out mode, priority) of PoE-capable ethernet interfaces.
Runs /interface ethernet poe print.
"ether" matches ether1, ether2 …Gets the detailed PoE-out settings of a specific ethernet interface — mode, priority, voltage,
and low/high thresholds. Runs /interface ethernet poe print detail where name=….
"ether1"IP Address — IPv4 Interface Bindings
Assign and remove IPv4 addresses on physical, bridge, or VLAN interfaces. For IPv6, see IPv6 Address.
Bind an address to an interface.
192.168.100.1/24Inspect bindings — list takes optional filters (by interface, address, network, dynamic flag, or disabled-only); get returns one address record by ID.
IPv6 Address — Interface Bindings
Assign and inspect IPv6 addresses on interfaces, under the RouterOS
/ipv6 address tree. IPv6 lives in a separate command tree from IPv4
(/ipv6 … vs /ip …) — this is the IPv6 counterpart of the
IP Address category. These tools cover IPv6 addressing;
IPv6 routing, firewall, DHCPv6/ND, and pools are separate areas.
Adds an IPv6 address to an interface. Runs /ipv6 address add ….
2001:db8::1/64, fe80::1/64. With from_pool, supply the host part only (e.g. ::1/64).ether1, bridgeLists IPv6 addresses, with optional filtering. Runs /ipv6 address print.
"2001:db8", "fe80"fe80::/10Gets details for a single IPv6 address, by RouterOS id or by address value.
Runs /ipv6 address print detail where ….
*1) or the address value (e.g. 2001:db8::1/64)Removes an IPv6 address by id or address value. Runs /ipv6 address remove [find …].
*1) or the address valueIP Pool — Named Address Pools
Named ranges used by DHCP, hotspot, PPP, and VPN servers. Pools can be inspected, updated, and expanded without disruption.
"192.168.1.100-192.168.1.200"Inspect pool definitions, fetch a single pool by name, plus the live used-address table (which addresses are currently leased from a pool). list_ip_pools accepts name_filter / ranges_filter / include_used; list_ip_pool_used filters by pool_name, address_filter, mac_filter, and info_filter.
update edits a pool's name (rename via new_name), ranges, or next-pool chain; expand appends additional ranges without disrupting existing leases.
Remove a pool. Servers using it will refuse new leases.
Neighbors — ARP & IPv6 ND
Read-only views of the neighbour tables: raw, detailed IPv4 ARP entries and IPv6 Neighbor Discovery entries. Useful for answering "what is on this segment, and on which port?" Address and MAC filters use substring matching; interface and status filters use exact matching.
Lists raw detailed IPv4 ARP entries.
Lists raw detailed IPv6 Neighbor Discovery entries.
"fe80" finds link-local neighborsIP Services — Management Exposure
A read-only view over /ip service: which management services answer, on which port, and from where. This is the device's remote-management attack surface in one table.
Lists the management services with their port and address restriction. Runs /ip service print detail. An empty address restriction (the address property, printed as available-from on RouterOS 7.25) means the service is unrestricted: on a router whose WAN holds a public address that means it is published to the internet, whether or not the port was changed from its default. Entries for the sessions open right now (flag c) are listed too. ftp deserves its own look: RouterOS also serves SFTP file transfers through the SSH service to users whose group holds the ftp policy, so the two are not the same control.
winbox, ssh, api, www, www-ssl, ftp, telnet (substring match)false)Logs — System Events
Stream and analyze RouterOS logs by topic, severity, or free-text search.
Pull system events and security logs, aggregate statistics, watch for new entries, and export to a .txt file on the router.
Seven lenses on the log buffer — by topic, by severity
(debug/info/warning/error/critical),
free-text search, system events, the security topic, or aggregate stats.
get_logs also narrows by time_filter, message_filter, and
prefix_filter, and renders as plain / detail /
terse via print_as.
monitor_logs watches for new log entries for duration seconds (default 10, capped at 60) and returns the ones that arrived. export_logs writes the logs to a .txt file on the router; filename defaults to logs_export_<timestamp> and RouterOS adds the extension.
Clears the in-memory log buffer. Doesn't affect file-backed logs.
Netwatch — Probes and Live Status
A read-only view over /tool netwatch. A configuration export shows which probes exist; it cannot show whether a monitored host is up right now, so this tool returns both the configuration and the live state.
The three scripts of a probe are withheld by default. A probe fires commands on every transition, and those commands are a common place to find a credential in clear text, such as a bot token inside a webhook URL or an SMTP password= on an alert mail. Set include_source=true only when you intend to read them; the output is redacted either way, but redaction is pattern-based and is not a guarantee. A probe with no src-address follows whichever WAN is active, so it keeps reporting across a failover; one pinned to a source address reports that path only.
Lists the netwatch probes with their live status and measurements. Runs /tool netwatch print detail, then reads the live state with a second command. The answer has two blocks: the configuration, then a LIVE STATE block with status, since (the time of the last transition) and, on an ICMP probe, the last test's rtt-avg, loss-percent and failed-tests. Match the blocks by host, or by the .id the live block carries. If the live state cannot be read, the configuration is still returned.
down to list only what is currently failing (exact match)icmp (exact match)up-script, down-script and test-script (default false)Diagnostics — Ping, Traceroute, Torch
Bounded diagnostic commands run on the router: ping, traceroute, torch, a quick packet capture and a CPU profile. None of them changes the configuration, so all are annotated READ and stay available with --read-only. The four that reach outside the router or observe live traffic are also marked open-world.
They need RouterOS user policies beyond read. A group for an assistant that may diagnose but not change anything: /user group add name=mcp policy=ssh,read,api,test,sniff. Without the policy the router answers not enough permissions, which the tool returns as a failure.
| Tool | RouterOS command | Policy needed |
|---|---|---|
ping | /ping | test |
traceroute | /tool traceroute | test |
torch | /tool torch | sniff |
sniff_packets | /tool sniffer quick | sniff |
profile_cpu | /tool profile | read |
- Every command ends on its own: ping and traceroute take a bounded
count, and torch, the sniffer and the profiler adurationof 1 to 30 seconds. - Without a terminal RouterOS prints a new copy of the table on every refresh. Only the last one is returned: the text after the last
Columns: ...line. - RouterOS also lays tables out for 80 columns and drops the ones that do not fit, so these tools connect with the console login option
<user>+250wto keep torch's destination and rate columns. - Output is capped at 300 lines. Addresses, ports, protocols, MACs and durations must match narrow patterns, so a value such as
1.1.1.1; /system rebootis refused before anything is sent. - A quiet router is an answer, not a failure: torch, the sniffer and a profile per core print a row only for what they saw, so when nothing matched the tools say so (
No traffic matched on ether1 during the 4 seconds.). Ping and traceroute always print something, so for them no output at all is a failure.
Pings an IPv4/IPv6 address or host name from the router. Runs /ping.
200ms, 1ssize to probe the path MTUinterface)Traces the route from the router to an IPv4/IPv6 address or host name. Runs /tool traceroute.
icmp (default) or udp, with port for UDP500msShows live traffic rates per flow on an interface for a few seconds. Runs /tool torch. Each filter both filters and breaks the table down by that field; with no filter, flows are broken down by IPv4 source and destination address and by IP protocol. While torch runs, RouterOS turns fasttrack off, which raises CPU load on a busy router.
0.0.0.0/0 lists every address::/0 lists every addressany, MAC protocol, VLAN and DSCPCaptures packet headers for a few seconds with the quick packet sniffer. Runs /tool sniffer quick. Shows headers only (interface, direction, MACs, VLAN, addresses and ports, protocol, size, CPU); nothing is saved on the router.
53, 80,443 or 1000-2000Shows which RouterOS processes use the CPU, sampled over a few seconds. Runs /tool profile.
all or a core number) comes after two seconds, so a duration under 3 runs for 3total (default), all for one column per core, or a core numberQueues — Traffic Shaping
Simple queues for per-target rate limits, queue trees for hierarchical policies, and queue types for the underlying discipline (CAKE, fq-codel, SFQ, RED, PCQ, …).
Per-target rate limits — the simplest way to throttle a host or subnet. max_limit takes
an upload/download pair like "10M/20M".
Hierarchical HTB shaping. Attach to a parent, match traffic by packet_mark,
set max_limit / limit_at / burst, and priority (1–8).
Define reusable queue disciplines. kind (default cake) is one of cake,
fq-codel, sfq, red, pcq, pfifo,
bfifo, … each with its own tuning parameters (e.g. cake_flowmode/cake_nat/cake_overhead
for CAKE, pcq_rate/pcq_classifier for PCQ, sfq_perturb for SFQ,
red_* thresholds for RED). Built-in types (default, default-small, …)
can't be modified or removed. update_queue_type changes the CAKE and PCQ parameters; kind and the pfifo, bfifo, sfq, fq_codel and red parameters cannot be changed there, so create a new queue type with create_queue_type.
Routes — Routing Table
Add static, default, and blackhole routes. Inspect active routes, check the path to a destination, dump routing tables, and read the route cache and statistics.
Three flavors of route creation. add_route takes dst_address +
gateway (plus optional distance, scope,
routing_table, pref_src, check_gateway, …). On RouterOS 7
the routing table is named via routing_table (a name from /routing table);
RouterOS 6 called this the routing mark. Listing and path checks use
routing_table_filter / routing_table to match.
Inspect the routing table from several angles: list all, single route, path check (which route MikroTik would use to reach a destination), full table dump (table_name defaults to "main"), the kernel route cache, and aggregate statistics.
Edit a route in place, toggle individual routes by ID, or flush the route cache.
System — Resource, Health, Clock, Packages
Read-only views over /system: what the board is, how it is doing and which RouterOS it runs. They answer the questions an export header only hints at (model, serial, version) and the ones it cannot carry at all: uptime, CPU and memory load, board voltage and temperature, and whether a newer release is available.
Reports uptime, RouterOS version, board name, architecture, CPU and memory. Runs /system resource print. free-memory against total-memory, and cpu-load, are the two numbers worth reading before blaming the network for a slow device. No parameters.
Reports the board sensors: voltage, temperature, fan and PSU state. Runs /system health print. Many boards carry no sensors at all and legitimately report nothing; the tool then answers that no health sensors were reported, which means “this model does not measure it”, not “the reading failed”. No parameters.
Reports the device clock, time zone and DST setting. Runs /system clock print. Log timestamps are only as trustworthy as this: a device without a working time source dates its own evidence wrongly, which matters when correlating an incident across sites. No parameters.
Reports the model, serial number and bootloader firmware revision. Runs /system routerboard print. current-firmware against upgrade-firmware is the RouterBOOT bootloader, which is upgraded separately from RouterOS and is easy to leave behind after a package upgrade. Devices that are not a RouterBOARD, such as a CHR, answer that no RouterBOARD information is available. No parameters.
Lists the installed RouterOS packages and which are disabled. Runs /system package print. No parameters.
Reports the installed RouterOS version against the latest on its update channel. Runs /system package update print. This reads the stored result of the last check and does not contact MikroTik, so latest-version can be stale or empty on a device that has never checked or cannot reach the update server. No parameters.
Scheduler — Tasks and Scripts
Read-only views over /system scheduler and /system script. Script bodies and the on-event commands of a scheduler are withheld by default: a stored RouterOS script is a common place to find a credential in clear text, such as an FTP password for a backup job or an SMTP login for an alert. Pass include_source=true when you need the code; the output is then passed through the server's redaction, which only recognises labelled secrets and is not a guarantee.
Lists the scheduled tasks with their interval, next run and run count. Runs /system scheduler print detail. Read next-run together with interval: a scheduler whose run-count is not advancing is firing into a script that errors out. RouterOS does not surface that here; it shows up in the log under the script topic.
on-event commands, which can carry a bot token or a password inside a URL (default false)Lists the stored scripts: owner, policy, run count and last start. Runs /system script print detail. policy is what the script may do when it runs, which can exceed what the user who scheduled it may do interactively.
false)Backup & Export — Configuration State
Binary backups, RouterOS .rsc exports, section dumps,
file transfer, restore, and import.
Three formats: a binary .backup (full snapshot), a .rsc export (declarative,
choose rsc/json/xml and full/compact/verbose), or a single-section dump.
export_section is a genuine read — it returns the section as an export
script straight from the device without writing anything to storage, so it works on read-only
accounts (policy=ssh,read). Its section is a menu path without the
leading slash, and hide_sensitive defaults to true. To produce an export file on
the device, use create_export instead.
List backup files, inspect a backup's metadata, and download files off the device.
download_file pulls the raw bytes over SFTP and returns them base64-encoded,
so binary .backup files survive the round-trip intact alongside text .rsc exports.
Restore a binary backup (pass password for an encrypted backup), import a .rsc config, or upload an arbitrary file to the device — upload_file takes base64 content and writes the decoded bytes over SFTP.
Removes any file from the device's filesystem.
Users — Accounts, Groups & SSH Keys
Local users, groups, policies, active sessions, and SSH key management.
Used to provision scoped accounts for tooling rather than sharing admin.
Create users and permission groups. Groups take a policy list (e.g. read,write,ssh).
Inspect users, groups, and currently-connected sessions.
Edit users / groups, toggle accounts, or forcibly disconnect an active session.
Import a user's SSH public key (key-based auth), list installed keys, or remove one by ID.
Dumps the full user / group configuration to a file.
Remove a user or a group.
IPsec — Peers, Policies and Tunnel State
Read-only views over the IPsec subsystem (/ip ipsec): which peers, policies, profiles and proposals are configured, and the live state of the tunnels. Output is returned as RouterOS prints it, including the Flags legend.
/ip ipsec identity is deliberately not exposed: its print detail output carries secret= in clear text, and no read tool should be able to surface a pre-shared key. Peers, policies, profiles and proposals show the same topology without the credential.
Lists the configured IPsec peers. Runs /ip ipsec peer print detail.
Lists the IPsec policies with their phase 2 state. Runs /ip ipsec policy print detail. The Flags legend separates configured policies from the ones a peer generated at runtime (D), and ph2-state says whether the child SA is established. A policy whose selectors do not match the far end's is the usual cause of a tunnel that comes up and passes nothing.
Lists the IPsec profiles (phase 1: DH group, hash, encryption, lifetime, DPD). Runs /ip ipsec profile print detail. The phase 1 lifetime must be longer than the phase 2 lifetime on the proposal, so the child SA rekeys inside a live parent SA; equal lifetimes tear the tunnel down on every rekey. dpd-interval multiplied by dpd-maximum-failures is how many seconds of silence the peer tolerates.
Lists the IPsec proposals (phase 2: encryption, authentication, PFS, lifetime). Runs /ip ipsec proposal print detail. Compare lifetime against the phase 1 lifetime on the profile, and against whatever the far end proposes; a cloud provider's own SA lifetime counts as a third value.
Lists the peers with a live IKE session, with uptime and counters. Runs /ip ipsec active-peers print detail. This is the parent (phase 1) side: state, uptime, last-seen and the byte counters. A peer can sit here established while its child SAs carry nothing; use get_ipsec_installed_sa to tell the difference.
established (exact match)Lists the installed security associations (child, phase 2 SAs). Runs /ip ipsec installed-sa print detail. The Flags legend is the point of this view: S (SEEN-TRAFFIC) is the only field that separates an SA carrying traffic from one that is merely installed, H means the cipher runs in hardware and E means ESP. A missing S can mean idle, not broken: put traffic over the selector before concluding anything. Once a peer has several child SAs, per-SA counters do not map onto policies, so watch which counters move under traffic you control instead of pairing SAs by hand.
198.51.100.2:4500