routeros-fundamentals
Core knowledge for working with MikroTik RouterOS 7, the entry point to the other routeros-* skills. Covers CLI syntax and the menu hierarchy, item names versus numbers, print and find filters, argument types, safe mode, undo and redo, export and import, and the rules for changing a live router without locking yourself out. Use when starting any RouterOS or MikroTik task, when unsure which RouterOS skill applies, when asked what a console command or argument type means, or before running configuration commands on a real device.
How do I install this agent skill?
npx skills add https://github.com/wiresage/routeros-skills --skill routeros-fundamentalsIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill provides a comprehensive educational framework and technical reference for MikroTik RouterOS 7. It covers CLI fundamentals, configuration management, and critical safety features like Safe Mode. The content encourages secure administrative practices, such as masking sensitive data and performing backups, and contains no malicious code or suspicious network activity.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
RouterOS fundamentals
RouterOS is MikroTik's network operating system. Everything it can do is reachable from one command tree (the console, also exposed by SSH, the API and the REST API). This skill teaches the shared conventions; the other routeros-* skills cover one feature area each. The reference pages are the manual from manual.mikrotik.com, written for RouterOS 7 (snapshot date in references/INDEX.md).
Read the router before you touch it
- Identify the device and version first. Behaviour differs between RouterOS 6 and 7 and between architectures.
/system/resource/print
/system/routerboard/print
/system/package/print
- Read the current state with
printandexport, never assume it. - Make a rollback point before a change (see "Changing a live router" below).
The console in six rules
- Paths. Menus nest:
/ip/firewall/filter. Write the full path with/(preferred in scripts) or with spaces (/ip firewall filter)./jumps to the top,..goes up one level, and a command can use a path from anywhere:/ping 10.0.0.1. - Common commands. Most menus accept
add,set,remove,print,find,get,enable,disable,move,comment,edit,reset,export. Menus that hold a single configuration only havesetandprint. - Arguments are
name=valuepairs. Quote values with spaces or special characters. A trailing\continues a command on the next line. - Items have names and numbers. Numbers come from the last
printin your session and change between prints. Names are properties of the item and stay stable. Never use numbers in scripts: select withfind.
/ip/firewall/filter/add chain=forward place-before=[find where comment=CommentX]
/interface/set [find where name=ether1] mtu=1460
- Filter prints with
where;~matches a regular expression:
/log/print where topics~"interface|dhcp"
/file/print where name~"config-before"
/ip/address/print detail
/interface/print count-only
- Flags in the first columns describe state (
Xdisabled,Iinvalid,Ddynamic,Rrunning,*system default). Dynamic and default items cannot be removed by hand. Argument types (enum,time,ipPrefix,multi, ...) are explained inreferences/guides/cli-reference.md.
Tab completes, a second Tab lists options, F1 shows context help, Ctrl+C interrupts. Abbreviations work (pin 10.1 c 3 is a ping) but write full names in anything that is saved or shared.
Changing a live router
The goal is to never lose the management session.
- Back up and export first.
/export file=before-changewrites readable text (user-edited settings only, sensitive values hidden unless you addshow-sensitive)./system/backup/save name=before-change password=...writes a binary backup that only restores reliably on the same device. Seerouteros-initial-setup. - Safe mode (Ctrl+X or F4 in an interactive terminal) undoes everything done in the session if the connection drops (TCP timeout about 9 minutes) or if you leave with Ctrl+D.
/quitkeeps the changes. It remembers the last 100 actions, so work in small steps. It does nothing for commands that need a reboot, such as a configuration reset or a backup restore. - Undo and redo. Every action is recorded in
/system/history;/undoand/redoreplay it. - Non-interactive channels (SSH one-liners, API, REST, MCP tools) cannot use safe mode. Prefer small reversible steps, keep one working session open while testing from a second one, and for risky network changes schedule a rollback (an entry in
/system/schedulerthat restores the export or backup) that you remove once the change is proven. - Order matters for access. Do not add a drop rule in the
inputchain or change the address or bridge the session depends on before the accept rule for your own connection exists (seerouteros-firewall). - Destructive commands need an explicit yes from the user:
/system/reset-configuration,/system/backup/load,/system/reboot,/system/shutdown, removing users or interfaces,/file/remove, package changes. A reset asksDangerous! Reset anyway? [y/N]. - Secrets. Do not print or store passwords, private keys, WireGuard keys or backup passwords. Export without
show-sensitiveunless the user asks, and treat any file made with it like a password.
Export and import
/export file=router-full # whole configuration, compact by default
/ip/firewall/export file=firewall # only one menu and its sub-menus
/export path=/ip/firewall,!/ip/firewall/nat # include and exclude menus
/export terse # one full command per line, easy to diff
/import file-name=firewall.rsc verbose=yes dry-run # check syntax and execution, change nothing
Export does not contain user passwords, installed certificates, SSH keys, or the Dude and User Manager databases. Import on the RouterOS version that made the export. Files named *.auto.rsc run automatically when uploaded by FTP or SFTP.
RouterOS 6 versus 7
- v7 merged most packages, added WireGuard, containers, REST API, Let's Encrypt, CAKE and FQ-CoDel queues, IPv6 NAT, VXLAN and a new kernel. LCD and KVM packages were dropped; do not run v7 on less than 64 MB RAM.
- Routing was redesigned:
/routing/bgp/connection,template,session; OSPFv2 and v3 in one/routing/ospfwith no default instance or area; routing filters are script-likeif ... thenrules; PIM-SM is/routing/pimsm. Seerouteros-routing,routeros-bgp,routeros-ospf. - Wireless has two command trees:
/interface/wifi(Wi-Fi 6 and 7 devices, and 802.11ac ARM devices with thewifi-qcom-acpackage) and the legacy/interface/wireless(packagewireless, the only choice for MIPS devices and 802.11 a/b/g/n). Their properties differ; do not mix them. Seerouteros-wireless. - The routing-protocol configuration upgrade from v6 runs only once; the details are in
routeros-install-upgrade.
Where to look
| Need | Open |
|---|---|
| Which skill covers a menu or topic | references/skill-map.md |
What a type such as ipPrefix or super means | references/guides/cli-reference.md |
| Console keys, safe mode, hot-lock, login options | references/guides/management-tools/console.md |
| Every file in this skill | references/INDEX.md |
Single commands such as /import, /password, /undo, /safe-mode | references/cli/ |
Skills by topic
| Topic | Skills |
|---|---|
| Start | routeros-initial-setup, routeros-install-upgrade, routeros-troubleshooting |
| Security and access | routeros-firewall, routeros-users-aaa, routeros-certificates, routeros-management-tools, routeros-api |
| Interfaces and IP services | routeros-ethernet, routeros-bridging-switching, routeros-switch-chip, routeros-ip-addressing, routeros-dhcp, routeros-dns, routeros-queues, routeros-network-services |
| Routing, tunnels, redundancy | routeros-routing, routeros-ospf, routeros-bgp, routeros-mpls, routeros-vpn, routeros-ipsec, routeros-high-availability |
| Wireless and access networks | routeros-wireless, routeros-mobile-networking, routeros-hotspot, routeros-user-manager |
| Operations and automation | routeros-system-utilities, routeros-diagnostics-monitoring, routeros-scripting |
| Hardware, storage, apps | routeros-hardware, routeros-storage, routeros-containers, routeros-iot |
Related skills: routeros-initial-setup (first configuration, backup, reset), routeros-scripting (the scripting language), routeros-firewall, routeros-ip-addressing, routeros-api (REST and API access).
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/wiresage/routeros-skills/routeros-fundamentals">View routeros-fundamentals on skillZs</a>