LLM Networking with MikroTik

(blog.greg.technology)

47 points | by gregsadetsky 3 hours ago

6 comments

  • x2tyfi 41 minutes ago
    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!

  • briHass 2 hours ago
    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.

  • arjie 25 minutes ago
    I only have the agent investigate directly. To actually configure the Mikrotik, I have the agent write a script that is aimed to be idempotent and then run the script. Investigation is fine, but the script acts as a memory of intent which I find useful. As agents get better, it can be a textual representation rather than a script, but for now that suffices.
    • abound 5 minutes ago
      > I have the agent write a script that is aimed to be idempotent and then run the script.

      You can take this one step further and have the agent write Terraform configs [1]. I did this (including having the agent import all the initial resources from the live device), works great and is generally more robust than a script.

      [1] https://github.com/terraform-routeros/terraform-provider-rou...

  • alanwreath 2 hours ago
    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
    • x2tyfi 11 minutes ago
      Probably a routing issue. Shot in the dark would be that one of these routers is NATing traffic, and the other router doesn’t have a route to that NAT’d range.
      • tonyarkles 6 minutes ago
        Other shot in the dark, misconfigured bridging or similar where ARP isn’t getting forwarded and rewritten quite right
    • doubleg72 25 minutes ago
      What possibly could you even be talking about? Networking gear already works together due to standards.
  • syntaxing 2 hours ago
    I want something similar to this but for Ubiquiti. I don’t need anything fancy, just something that audits my home config and tell me if I’m doing something stupid, dangerous, or both.
    • gregsadetsky 2 hours ago
      Have you tried poking at the unifi api?
    • varenc 1 hour ago
      Same. Recently Ubiquiti has been putting more and more into the local API, so this should be getting easier to do. The Home Assistant UniFi integration just recently has started moving from private undocumented API endpoints to the newer public API endpoints.

      In other news, Meraki has an AI assistant feature now.

  • Lownin 1 hour ago
    Wish I could configure pfSense via API or config files.
    • gonesilent 1 hour ago
      The main pfsense dev who exited the project is working on just that. Forget the name.