← Software projects

SemanticRouter

Router configuration, without the wall.

SemanticRouter started in the bath. I was reading a book on quantum physics, specifically quantum tunnelling: a wavefunction can extend through an energy barrier, giving a particle some probability of being found on the other side. Earlier, I’d been helping my son Luca make a “ghost material” in Minecraft, something you could walk through as if the wall were air. Two rather different ways of getting through a wall were on my mind.

A small experiment in tunnelling
Transmission—
Reflection—
Barrier status—
Your browser cannot display the wavefunction. The controls and probability readouts remain available.

A stationary wavefunction, not an electron’s path. Amplitude is scaled; phase animation is slowed for clarity.

—

Move a slider to explore the barrier.

At work, we were constantly trying to get over another wall: fiddly core-router configuration files. We’d untangle syntax, follow dependencies and note potential security issues as we went. Understanding a change well enough to make it safely took far too much effort. What if we could go through that wall instead? Turn the individual particles of configuration into a wave of semantic ideas: what a router means, what a firewall permits, what a routing policy intends. That became SemanticRouter. The physics is a metaphor; the practical idea is to change the representation while keeping its meaning inspectable.

CONFIGURED RELATIONSHIPS

Network model

CONFIG ONLY

Select a node to explore. Scroll sideways on a smaller screen.

Matching reverse BGPUnmatched BGPDisabled sessionInferred uplink
border-Y

Experiment with a relationship

Changes affect this example only. No real devices are changed.

Configuration as ideas

A configuration export is a record of commands. I wanted to work with the network concepts behind them. SemanticRouter reads the vendor’s syntax into feature objects, then translates those into a common model: routers, IPv4 firewalls and BGP. The same model can be inspected, checked against policy or rendered into supported target syntax.

That gives the fiddly interpretation work a home. Instead of writing a fresh text search for every question, I can ask about an ordered firewall decision or a route policy using structured objects. Source-file and line references keep a route back to the evidence. An unsupported expression stays visible as an unknown, rather than quietly becoming a reassuring pass.

An interactive lab and validation station

The browser playground makes that model something you can experiment with. Choose a router, inspect its objects, change a rule, peer, MTU or RADIUS setting, then rerun the checks. Probe a packet or a route. Edit the typed model or the policy, preview an export and download the result. The point is to make the consequences of an idea easier to explore before it becomes a router change.

The playground runs the same deterministic Python core as the command-line tools, using Pyodide in a browser worker. Once the runtime is served, configuration processing happens in the browser. Model edits rerun assertions without reparsing the original export. The library itself does not connect to routers or apply changes.

It’s an initial implementation with deliberate boundaries: RouterOS 6/7 import, a supported subset of RouterOS 7.1–7.19 rendering, and Cisco IOS 15 input ACL artifacts. Full exports stop when features are uncovered. A partial fragment has to be requested explicitly and identifies its omissions. That distinction matters: being able to inspect something is different from having enough evidence to validate or convert all of it.

Try it yourself

You’ll need Python 3.10 or later. Start with the synthetic example configurations in the repository; there’s no need to bring a live router into the experiment.

git clone https://github.com/leo-brown/semanticrouter.git
cd semanticrouter
python3 -m venv .venv
. .venv/bin/activate
python3 -m pip install -e .

semanticrouter inspect examples/configs/example-bng.cfg
semanticrouter audit examples/configs --policy examples/demo-policy.json

The demo intentionally includes a RouterOS 6 policy finding. An audit’s exit code 1 means P1 failures; 2 means invalid input, unresolved evidence or an incomplete/unsupported export. A P2-only audit exits 0. The capability matrix explains how to interpret those results.

For the interactive lab, build the standalone playground and serve it locally. The first build downloads the pinned Python browser runtime.

python3 playground/build.py --download-runtime
python3 -m http.server 8000 --directory playground/dist

Open http://localhost:8000, choose a router and start experimenting. The deployment guide covers private datasets and offline runtime copies; the architecture guide explains where new adapters and renderers fit.

I’ve made SemanticRouter open source because the useful conversation is bigger than one set of configuration files. More adapters, more explicit policy and better tests of meaning can make this a better tool for everyone trying to get through the same wall.