How I Use LLMs to Configure MikroTik Networks Without the Headache

LLM Networking with MikroTik

I have been successfully using Large Language Models to configure MikroTik networks, turning a traditionally complex task into a manageable process. By leveraging the REST/JSON API and tools like CAPsMAN, I can automate setups while maintaining strict oversight. My approach includes verifying configurations across multiple models, using MAC Telnet for reliable access, and testing every change to prevent hallucinations from disrupting connectivity.

LLMs are a chaotic force multiplier; they definitely know about MikroTiks, but they also still get things wrong, so you must keep a tight leash and verify everything.
  1. adamcharnock

    I've been a long-time fan of Mikrotik. I even ran an ISP on it a fair while ago. I have a couple of archived GitHub projects if they are useful to anyone:

    - Router OS Diff - Can diff two configs and give you the commands needed to bring the existing config up to date with the desired config. It's certainly not perfect, but a starting point of anyone needs something like this. [1]

    - Netbox Routeros – A netbox plugin for updating the config of RouterOS devices directly from the Netbox interface. [2]

    It has been many years since I touched these, but perhaps they will be of interest to someone.

    Aside from that, I have had excellent experience with Mikroik. Everywhere from in-datacenter to it running in an off-grid hut on a mountainside. I've even heard reports of people finding rain streaming through a CRS and it just happily ticking along.

    [1] https://github.com/adamcharnock/routeros-diff

    [2] https://github.com/adamcharnock/netbox-routeros

  2. mateja

    MikroTik recently updated their documentation site from an Atlassian Confluence Wiki to much more AI-friendly Docusaurus here: https://manual.mikrotik.com/

    Any page can be easily converted into Markdown by appending .md to the URL. I mention this because in my experience, the agent is much more accurate when it has access to the docs.

  3. x2tyfi

    It’s interesting to observe and build LLM-driven solutions in Networking.

    The biggest challenges that most of us networking people have are around velocity (how fast we can build and scale networks) and how effectively we can operate them (avoid defects, fix them fast when something breaks).

    LLMs are great in both areas. AI helps with deployment challenges by speeding up tooling development and the creation of workflows on orchestration platforms. A manual process step today, say - reserving an IP address in an IP DB — is automated the next day instead of on a backlog for years. This post is an example of that (config-gen/config-deploy).

    Operations use-cases are more interesting, IMO, and address the “too many signals” problems that we face. Network substrate telemetry, overlay telemetry, service host metrics, service metrics, customer metrics, recent change data, prior alarms - the list goes on. Being a network operator is not for the faint of heart and is under-mentioned on high stress job lists. AI makes AMAZINGLY good network operations triage agents, since they are able to immediately process so many signals.

    Exciting times!

  4. briHass

    I would expect LLMs to be especially excellent at configuring Mikrotik stuff, given MT publishes markdown reference docs for LLM ingestion, the full config without secrets can be dumped to one text file, and their cli commands are very stable between versions.

    I switched recently to OpenWrt from MT, which code agents are also good at. I'd wager most issues are going to be related to the user not specifying what they want clearly enough. The translation from network concepts to RouterOS config is pretty 'fat-free', so there's not much room for hallucinations beyond syntax errors, which can be verified via the API.

  5. alanwreath

    Yes! Recently connected two disparate systems (ubiquiti and mimrotik) using their exposed API’s and a Claude session so that systems I have on either environment could talk to each other. I am not a network engineer so it was liberating to get my gear working together. That said it’s a work in progress and just today I noticed something weird that one of my computers can’t access Minecraft servers while the rest of my network can

More from this day

2026-07-16