Skillshub routeros-fundamentals
RouterOS v7 domain knowledge for AI agents. Use when: working with MikroTik RouterOS, writing RouterOS CLI/script commands, calling RouterOS REST API, debugging why a Linux command fails on RouterOS, or when the user mentions MikroTik, RouterOS, CHR, or /ip /system /interface paths. Scope: RouterOS 7.x (long-term and newer) only — v6 is NOT covered and accuracy for v6 problems will be low.
git clone https://github.com/ComeOnOliver/skillshub
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/aiskillstore/marketplace/tikoci/routeros-fundamentals" ~/.claude/skills/comeonoliver-skillshub-routeros-fundamentals && rm -rf "$T"
skills/aiskillstore/marketplace/tikoci/routeros-fundamentals/SKILL.mdRouterOS Fundamentals
RouterOS Is NOT GNU/Linux
RouterOS runs a Linux kernel (5.6.3) but everything above the kernel is MikroTik's proprietary
system. This is the single most important fact for agents to internalize.nova
What does NOT exist on RouterOS:
- No
,/bin
,/usr
,/etc
— no FHS layout/var - No bash, sh, ash, zsh — no Unix shell at all
- No coreutils (
,ls
,cat
,grep
,ps
,mount
,ip
, etc.)iptables - No glibc, musl, busybox
- No apt, pkg, opkg — no package manager (packages are
files installed via upload + reboot).npk - No
,systemctl
, init systemservice - No
or/proc
accessible from userland/sys - No
,docker
— RouterOS has its ownpodman
subsystem (7.x+)/container
What DOES exist:
- RouterOS CLI — its own language, not shell. Accessed via SSH, serial, WinBox, or WebFig
- REST API at
(HTTP, port 80 by default) — the primary programmatic interface/rest/ - RouterOS scripting language (
files) — its own syntax, not bash. See Scripting reference.rsc - WebFig (web UI) on port 80
- WinBox protocol on port 8291
Common agent mistakes to avoid:
- Do NOT try
— it opens RouterOS CLI, not a shellssh admin@host 'ls /' - Do NOT suggest
,mount
,fdisk
— usemkfs
commands instead/disk - Do NOT look for config files at
— configuration is in the RouterOS database/etc/ - Do NOT assume
works the same — it'sping
or/tool/ping
in CLI/ping - Do NOT suggest installing packages via
orapt
— uploadopkg
via SCP then.npk/system/reboot - See Extra packages reference for the full package list and installation pattern
RouterOS CLI Syntax
RouterOS CLI uses path-based navigation, not Unix command pipelines:
# Navigation /ip/address/print /interface/print /system/resource/print # Adding entries /ip/address/add address=192.168.1.1/24 interface=ether1 # Modifying (by internal ID or find expression) /ip/address/set [find interface=ether1] address=10.0.0.1/24 # Removing /ip/address/remove [find address="192.168.1.1/24"] # Running a command /system/reboot /tool/fetch url="http://example.com/file.npk" dst-path="/"
Key syntax differences from shell:
assigns properties (no spaces around it)=
is the query expression (like WHERE)[find ...]- Strings use
(double quotes only)"" - Comments use
# - Variables:
and:local myVar "value"$myVar - No pipes, no redirection, no subshell
REST API Patterns
RouterOS REST API (v7.x+) at
http://HOST:PORT/rest/:
// Base pattern — use fetch() or Bun-native HTTP const base = "http://192.168.1.1/rest"; const auth = { headers: { Authorization: `Basic ${btoa("admin:")}` } }; // GET = print (list/read) const interfaces = await fetch(`${base}/interface`, auth).then(r => r.json()); // PUT = add (create new entry) await fetch(`${base}/ip/address`, { method: "PUT", ...auth, headers: { ...auth.headers, "Content-Type": "application/json" }, body: JSON.stringify({ address: "192.168.1.1/24", interface: "ether1" }), }); // PATCH = set (modify existing) await fetch(`${base}/ip/address/*1`, { method: "PATCH", ...auth, body: JSON.stringify({ address: "10.0.0.1/24" }), }); // DELETE = remove await fetch(`${base}/ip/address/*1`, { method: "DELETE", ...auth }); // POST = command (execute an action) await fetch(`${base}/ip/dns/cache/flush`, { method: "POST", ...auth });
REST gotchas:
creates,PUT
updates — opposite of many APIsPATCH- Empty password:
(colon required, empty string after)admin: - WebFig (port 80, GET
) returns HTTP 200 without auth — useful for health checks/ - REST API (
) returns HTTP 401 without auth/rest/ - Property names may differ from CLI names (hyphens vs underscores vary by version)
field is.id
format (e.g.,*HEX
,*1
)*A- POST to
— no body needed for action commands/rest/system/reboot
Version Scheme
Format:
MAJOR.MINOR[.PATCH][betaN|rcN] — e.g., 7.22, 7.22.1, 7.23beta2, 7.22rc1
Channels (from
upgrade.mikrotik.com/routeros/NEWESTa7.<channel>):
— production recommendedstable
— conservative, gets backported fixeslong-term
— pre-release candidatestesting
— beta featuresdevelopment
// Resolve current version for a channel const version = await fetch( "https://upgrade.mikrotik.com/routeros/NEWESTa7.stable" ).then(r => r.text());
Download URLs:
- Standard:
(x86_64)https://download.mikrotik.com/routeros/<ver>/chr-<ver>.img.zip - ARM64:
https://download.mikrotik.com/routeros/<ver>/chr-<ver>-arm64.img.zip
Architecture Names
MikroTik uses these architecture identifiers (not standard Linux arch names):
| MikroTik name | CPU | Common hardware |
|---|---|---|
| x86_64 | CHR, x86-based RouterBOARDs |
| aarch64 | Modern ARM boards (RB5009, Chateau) |
| ARMv7 | Older ARM boards |
| MIPS big-endian | Legacy RouterBOARDs |
| MIPS multi-core | hAP ac, RB4011 |
| MIPS single-core | hAP lite, mAP |
| PowerPC | CCR1xxx series |
| Tilera | CCR (older models) |
CHR (Cloud Hosted Router) is available only for
x86 and arm64.
Default Credentials
- Username:
admin - Password: (empty — no password)
- On first login via SSH/console, RouterOS 7.x prompts to set a password or press
to skipa - REST API and WebFig allow empty-password access
Inspecting Hardware from RouterOS CLI
# PCI devices (the RouterOS equivalent of lspci) /system/resource/hardware/print # IRQ assignments (shows driver binding) /system/resource/irq/print # System overview /system/resource/print # Disk info /disk/print # Installed packages /system/package/print # IP services and ports /ip/service/print # Network interfaces /interface/print
Additional Resources
Reference files:
- For REST API details and
command tree: see REST API reference/console/inspect - For version parsing, comparison, and download URL logic: see Version parsing reference
- For extra packages (container, iot, zerotier, etc.): see Extra packages reference
- For device-mode (modes, feature matrix, physical confirmation): see Device-mode reference
- For RouterOS scripting language syntax: see Scripting reference
Related skills:
- For the /container subsystem (VETH, device-mode, lifecycle): see the
skillrouteros-container - For netinstall-cli and device flashing: see the
skillrouteros-netinstall - For the /app YAML container format (7.22+): see the
skillrouteros-app-yaml - For /console/inspect tree traversal and schema generation: see the
skillrouteros-command-tree - For running CHR in QEMU (local or CI): see the
skillrouteros-qemu-chr - For QEMU user-mode emulation and macOS VM bridging: see the
skilltikoci-qemu-user-emulation - For building OCI images for RouterOS: see the
skilltikoci-oci-image-building
MCP tools:
- For command tree browsing and property lookups: use the
MCP server tools (rosetta
,routeros_search
,routeros_get_page
)routeros_command_tree