Server data from the Official MCP Registry
Why a BGP/OSPF route won in a containerlab, netlab or CML lab, from the lab's collected state
About
Why a BGP/OSPF route won in a containerlab, netlab or CML lab, from the lab's collected state
Security Report
Valid MCP server (0 strong, 2 medium validity signals). No known CVEs in dependencies. Imported from the Official MCP Registry.
2 files analyzed · No issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Permissions Required
This plugin requests these system permissions. Most are normal for its category.
How to Install
Install command not verified. See the repository for install instructions.
View repositoryDocumentation
View on GitHubFrom the project's GitHub README.
network-xray
rclab-dev/network-xray — explains, to people and to AI agents, why the routers in a containerlab or netlab lab are in the state they are in: which BGP path each router chose and why, and which OSPF adjacency is missing and what differs (FRR, SR Linux, Cisco IOL). Read-only.
The same state through other doors: an MCP server for AI agents (quickest setup), SolvedKit for a solved check (hand exercises out as a HandsOn Pack), and Grafana or any page by embedding. It is a part that fits into what you already run; it does not configure the network.
Why is an OSPF adjacency not coming up? It compares the values both ends must share — area, MTU, hello and dead intervals, network type, authentication — and names the one that differs, e.g. r1 Ethernet0/1 ⇔ r2 Ethernet0/1: OSPF no adjacency — hello 10 ⇔ 5, dead 40 ⇔ 20. Which BGP session is down? It lists each session that is not Established with its state, e.g. r1 → 10.0.0.2 (AS 65002): BGP Active (the state, not the cause).
Why did BGP pick this path? network-xray shows, for a network lab, which path each router chose, what the other candidates were, and why. It reads the live state of the FRR, Nokia SR Linux and Cisco IOL routers in your containerlab or netlab lab and draws it in the browser.
English | 日本語
Already have containerlab? Jump to the Quick start.
Fastest: the recorded demo (no routers, no setup).
▶ Open the recorded Best-Path Decision demo — no routers needed
Recorded from a real FRR / containerlab lab and replayed in the browser. Three things to look at:
- Click r1 to look inside it.
- In its BGP table, compare the two candidates for
8.8.8.0/24. - Read the Best-Path Decision panel: why the winner won (here, Local Preference).
Three ways to try it — start with 1; open 2 when you want to break and fix something yourself:
- Just look — opens at once, no setup — the recorded demo above, or the recorded 30-second video (1.4 MB) of the best path moving after one Local Preference change. Or paste your own router's output:
frr-paste.html(OSPF, routes) ·bgp-paste.html(BGP). It all runs in your browser. - Change a router — GitHub Codespaces, about 2–3 minutes — a real 3-router FRR lab in your browser that you can change: Live lab — GitHub Codespaces.
- Your own running containerlab lab — one line — run in the lab's folder, then open http://localhost:8600/:
Before you run it: memory — about 20 MB per FRR router, plus network-xray — about 30 MB between reads, and while it reads the routers (one reader per router) up to about 110 MB with 3 routers and 260 MB with 10; Windows — in WSL2 (WSL2 guide); routers it reads — FRR, Nokia SR Linux, Cisco IOL (the table); yourdocker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v "$(pwd)":/lab:ro -p 127.0.0.1:8600:8600 ghcr.io/rclab-dev/network-xray:1 --topo /lab/<lab>.clab.yml.clab.ymlis not changed (the folder is mounted read-only). You can pin the image asghcr.io/rclab-dev/network-xray@sha256:<digest>(the digest is in that version's release notes; a made-up one will not pull); see the release page.
[!CAUTION] Way 3 gives the container the Docker socket (root-equivalent on the host): use it on lab machines only. It sends only read-only commands (
show; Cisco IOL also getsterminal length 0/terminal width 0, which set only its own SSH session). Security notes
- Why the socket: to run
showin each router's container (FAQ, with three more ways to do without it).- No socket needed: the recorded demo, the paste pages (
frr-paste.html·bgp-paste.html) and GitHub Codespaces.
Using netlab? Add the tools: network_xray: declaration and load docker/netlab-defaults.yml through defaults.sources.extra: netlab tool.
What the page does not show on a live lab: a route-map result, a prefix-list deny, next-hop-self,
update-source or a duplicate Router ID. The bundled collectors do not fill those fields
(the list); an adapter you write can.
Other ways to try it
Live example lab — clone this repository and run ./xray.sh examples/q21-bgp-lp/q21.clab.yml (Quick start; xray.sh listens on 127.0.0.1 by default and has no login; see the security notes).
▶ Live lab — GitHub Codespaces
Needs a GitHub login · starts in about 2–3 minutes · runs a real 3-router FRR lab where you can change the config and watch the picture follow.
Before you start: it runs on your own Codespaces quota (delete the codespace when you are done). The page is forwarded on port 8600; Codespaces keeps a forwarded port private to you (signed in to GitHub) unless you make it public — keep it private.
Try it in your browser — the button starts a GitHub Codespace that deploys a 3-router FRR lab with containerlab and opens the X-Ray graph on port 8600 (about 2–3 minutes). Click any router to look inside it; shut an interface (sudo docker exec clab-q21-bgp-lp-r1 vtysh -c 'conf t' -c 'interface eth2' -c 'shutdown') and the picture updates by itself in a few seconds.
- Uses your own Codespaces quota (personal accounts: 120 core-hours/month free; this demo asks for a 4-core machine, so about 30 hours of it a month). Delete the codespace when you are done.
- Container-based nodes only (FRR etc.) — Codespaces has no nested virtualization.
Next: your own containerlab lab · netlab · what it supports
Live hosted lab with hints and explanations: The same X-Ray runs on RouteCrushLab — try Q21 as a guest (no sign-up; the lab is ready in under a minute).
When to use
- Use it when you run FRR, Nokia SR Linux or Cisco IOS-XE (IOL) routers in containerlab or netlab (or IOS routers in a Cisco CML2 lab, with
cml-xray.js— tried on CML 2.10 with IOL) and want to see, from the routers' current state, why BGP chose a path or why an OSPF adjacency is not Full (OSPFv2 on all three; on FRR, OSPFv3 and VRFs too: the BGP table and the routing table of each VRF, one VRF at a time). - Not for: production monitoring; checking configurations before deployment (that is Batfish — it reads configs, network-xray reads live state); collecting and querying state across many devices over time (that is SuzieQ — tables of state; network-xray draws one router's decision); modelling a production network from its LSDB / BGP feeds and simulating failures (that is Topolograph — a model of the network; network-xray reads a lab's routers as they are now); devices other than FRR / SR Linux / Cisco IOL, or in CML the IOS node types listed in the CML section (they appear in the topology, but are not read). Not read yet, even on those three: the IPv6 BGP table, IS-IS, EVPN, and VRFs on IOL. A
bridge,ovs-bridgeorhostnode with links is drawn as a node of its own (there is no router in it to read), so routers on a shared LAN behind it appear linked to the bridge, not to one another. - What it reads (read-only commands; the collector changes nothing. Only the example labs (their
exec:lines),xray.shand therun.shin a release folder, right after deploying, restart FRR in a router whose FRR did not come up — see Troubleshooting):- FRR, through
docker exec <node> vtysh -c '…':show ip bgp vrf all json(for each path:bestpathandselectionReason— the winner and FRR's own reason — pluslocPrf,weight,path(AS path),origin,metricand the next hop; the Best-Path Decision panel lines the candidates up on these),show ip bgp vrf all summary json,show ip ospf vrf all neighbor json,show ip ospf vrf all interface json,show ip route vrf all json,show interface json,show running-config(an FRR that does not answervrf allin JSON is read with the plain command; the configuration is read only to see which protocols are configured, the BGP AS number and the configured static routes, and its text is not saved in the state or sent to the page; only with--policy-config/XRAY_POLICY_CONFIG=1are the BGP / OSPF policy names and prefixes (route-maps, prefix-lists) kept aspolicy_config, forexplain_plan- never a password, key, description or community); OSPFv3 on routers withrouter ospf6:show ipv6 ospf6 vrf all neighbor json,show ipv6 ospf6 vrf all interface json,show ipv6 route vrf all json. On a router with VRFs, the Routing table and the BGP Table show one VRF at a time: use the VRF buttons above them to switch (the management VRFmgmtgets no button). The IPv6 BGP table is not read. - netlab
validate:tests use the same per-prefix check asnetlab validate(show bgp ipv4 unicast <prefix> json), where the winner isbestpath.overall. - SR Linux:
sr_cli 'info from state … | as json'. - Cisco IOS-XE (containerlab kind
cisco_iol), over SSH: plain-textshowcommands — see Cisco IOS-XE (IOL).
- FRR, through
Which routers it reads:
| Router (containerlab kind) | Read through | OSPF | BGP |
|---|---|---|---|
FRR (linux, FRR images) | docker exec … vtysh | ✓ (OSPFv2; OSPFv3 too) | ✓ (IPv4) |
Nokia SR Linux (nokia_srlinux) | docker exec … sr_cli | ✓ | ✓ |
Cisco IOS-XE IOL (cisco_iol) | SSH show | ✓ | ✓ |
| Arista cEOS, Juniper, Linux hosts, … | — | drawn, not read (FAQ) |
The IPv6 BGP table is not read.
Tested with (only these versions have been tried; others may work):
| Versions | |
|---|---|
| containerlab | 0.81.0 and 0.82.0 (host) · 0.83.0 (inside the image) |
| FRR | 8.4 (the example labs, pinned) · 10.7.1 (netlab 26.10's default) |
| SR Linux | 26.3.3 (read by network-xray, containerlab). 26.7.2 appeared only as the device under test in netlab's BGP tests; network-xray read its FRR neighbors, not the SR Linux itself |
| Cisco IOL (IOS-XE) | 17.18.02 (containerlab cisco_iol, image built with vrnetlab) |
| netlab | 26.10 |
| Node.js | 18 and 24 (for xray.sh / the collector without the image; the tests run on both, and CI and the image use 24) |
Issues and ideas are very welcome: open one with the raw output and I'll make the fix here, and the release notes name you (unless you'd rather not be named). The code keeps a single author so the license stays simple, so pull requests aren't merged; a pull request is still a fine way to show an idea. Released versions stay MIT, and forks are welcome.
Walkthrough: See why BGP picked that path — a browser X-ray for your containerlab lab (dev.to)
See why a router chose its path. network-xray turns a router's live state (show / JSON) into a picture of the forwarding decision — which route won, which lost, and why. The gallery pages (below) are zero-install, browser-only.
Under the hood the drawing is a plain-JS library (xray-core.js) you can also embed in your own page — see Embed the engine.
It is descriptive, not a simulator: it draws the state your feed reports. And it is
vendor-neutral in its state shape — the fields it draws are standard show-command concepts. FRRouting,
Nokia SR Linux and Cisco IOS-XE (IOL) are implemented today (a mixed lab renders uniformly).
Other NOSes (Arista, Junos, …) would need their own collector that maps their show output to the same
state shape (see DATA-CONTRACT.md); the IOL collector is a worked example.
Status: network-xray supports containerlab and netlab with FRR, SR Linux and Cisco IOL (IOS-XE), and Cisco CML2 labs with cml-xray.js (tried on CML 2.10 with IOL).
Not a config verifier. network-xray reads live state (show / JSON = the state the device reports) to show why a
router decided as it did — it is not a config checker. For pre-deployment simulation from config
(intent), use Batfish. Different input (state vs config), different question.
On CLI parsing. CLI parsing is best-effort and version-fragile; the robust path is structured
input (show … json, or the collector reading device state directly — the FRR collector already
reads vtysh … json). Screen-scraped CLI is a convenience fallback — for a vendor or version it does not read,
please open an issue with the raw output (show … json) attached as a fixture.
Why
I learned to think about networks by drawing them. At an ISP support desk I'd take what a customer described over the phone — what connects to what — and turn it into a topology diagram I could reason about and ask others about. Later, while learning routing protocols myself, I drew a different kind of diagram: what's happening inside a router as OSPF/BGP do their thing. Both taught me the same lesson — a picture in your own head is worthless if the person you're talking to can't see the same one. X-Ray is those two diagrams turned into a tool: the topology at a glance, and a look inside the router at the forwarding decision (the deepdive).
How it works
lab (containerlab / netlab) network-xray (on the lab host, or in the image) browser
+-------------------------+ +--------------------------------------------+ +------------------------+
| FRR docker exec, |<--read---| collector (clab-xray-collect.js) | | the page |
| vtysh show | | every 1 s with xray.sh, 2 s in the image | | xray-graph-nextui.html |
| SR Linux docker exec, |<--read---| (Cisco IOL: every 10 s) | | (the default) |
| sr_cli info | | writes xray-states.js | | |
| Cisco IOL SSH, show |<--read---| and xray-states.sig.js | | every 1 s: GET |
+-------------------------+ | | HTTP | xray-states.sig.js; |
| containerlab graph = static file server |<---------| if it changed: GET |
| :8080 (xray.sh) / :8600 (image) | GET | xray-states.js |
+--------------------------------------------+ +------------------------+
scripts/xray-query.js and the MCP server read the same state files from disk (no router, no network).
Arrows point from the side that asks; the answer flows back.
- The collector never changes a router: it only reads (
showon FRR and Cisco IOL,info from stateon SR Linux; Cisco IOL every 10 s with both./xray.shand the image). It writesxray-states.jsandxray-states.sig.jsnext to the page. - The page is static files served by
containerlab graph; the browser asks for them with ordinary HTTP GET. There is no WebSocket and no push: the page reads the small.sig.jsevery second (the simplerxray-graph.html: every 3 s) and loadsxray-states.jsonly when it changed. ./xray.shruns the collector andcontainerlab graphon the lab host; the image (docker run, the netlab tool) runs both inside one container, and:8600is the port it publishes on the lab host (-p 127.0.0.1:8600:8600). With the image the state files are inside the container: from the host,curl http://localhost:8600/static/xray-states.js. That file is JavaScript for the page (window.LIVE_STATES = {…};); for JSON, give it tonode scripts/xray-query.js state <file>(JSON is the default output) or to the MCP tools. The image also reads each router's running configuration every 30 s to choose OSPF or BGP (show running-config/sr_cli 'info from running …', read-only; Cisco IOL from the last collected state, no second login).- Viewing a lab only reads the routers; it never changes them. Only starting a lab can (it restarts FRR that did not come up): see Read-only below.
Read-only: what it means, and the exceptions
network-xray reads; it does not configure. "Read-only" means the commands are fixed in the source: show on FRR and
Cisco IOL (on IOL also terminal length 0 / terminal width 0, which set only its own SSH session), info from state / info from running on SR Linux, and show running-config on FRR for the image's 30 s
check. Nothing on the router side enforces that (there is no allowlist), and the login it uses may be allowed to do more:
the limit is the code. The exceptions, all on purpose:
- Starting a lab:
./xray.shand a release'srun.sh, right after deploy, restart FRR (watchfrr.sh restart all, at most 3 times) in a router whose FRR did not come up. The configuration is not changed.--attachskips this, and viewing a lab never does it. - Logins: Cisco IOL is read over SSH with containerlab's default login (
admin/admin, orNX_IOS_USER/NX_IOS_PASSWORD); it does not typeenable. For the same reasoncml-xray.jsneeds a user with privilege 15 in a Cisco CML lab. - The CML jump host: if nx-jump's configuration still says
<your public key>,cml-xray.jswrites the public key ofNX_JUMP_KEYinto it and stops, wipes and starts nx-jump. That is its only change to the lab (the routers keep running); its other CML API calls are reads (GET, and the login). --console(CML, off by default): typesenable,terminal length 0and theshowcommands on the CML consoles, so they appear on the console you use. A console whose log has not changed for--quiet-wait(default 60 s) and does not end with a prompt (a router nobody has pressed Enter on since it booted) first gets one return, to show the prompt; a console whose log is changing (someone is on it) is not touched.- Files on your machine: the collector writes
xray-states.jsandxray-states.sig.jsnext to the page; the netlab tool writesnetwork-xray.json(it holds the lab's passwords;netlab downremoves it). - Nothing is sent anywhere else: no telemetry, no analytics, no account. The "Powered by RCL" link in the DeepDive and
the routecrushlab.com links in this README are ordinary links with
ref=/utm_tags, so the site can count visits that came from here; nothing is sent until you click one. Every connection is listed in docs/network.md.
What the router reports, and what network-xray works out
| On the page | Where it comes from |
|---|---|
| Neighbors, sessions, routes, the routing table | Reported by the router (show … json, info from state, IOS show) |
| Which BGP path won | Reported by the router (its > mark or best: true); network-xray never picks one |
| Why it won: Weight, LocPref, AS path, Origin, MED, eBGP over iBGP | Worked out by network-xray from the collected attributes (eBGP over iBGP only when the collector recorded how each path was learned) |
| A tie past those | FRR's own selectionReason, marked "(FRR)"; with no stored reason, "a step the table does not show", without naming one |
| Why it won on Cisco IOL | Worked out by the collector from the printed columns (IOS prints no reason); the panel says it is inferred |
| IGP metric, router ID, cluster list | Not compared |
The MCP why_path tool gives the same split in reason_source (device = the router reported it, derived = the IOS-XE
collector worked it out from the printed columns, comparison = network-xray compared the attributes, null); the CLI
xray-query.js why returns the stored reason with a reason_source that says where it came from (or reason: null and a note). More in
docs/dev/likely-questions.md (§14).
See it
Why one BGP route wins — and the picture follows live. r1 hears 8.8.8.0/24 from two upstreams, r2 and r3, and
gives each path a different Local Preference on the way in (an inbound route-map on r1). Open r1: the BGP table shows both candidates and a Best-Path
Decision panel that explains why the winner won (LocPref) — then change the LocPref on the running
lab and the best path flips in place, no reload (in the GIF below, recorded on the q21 example: via r3 at 100 ⇄ via r2 at 150). X-Ray re-reads the
real FRR state and redraws — it's descriptive, not a simulator. The winner is always the path the router itself marked best (FRR's bestpath, the *> line on Cisco IOL, SR Linux's best-route); the panel finds the reason by lining the candidates up on the attributes in order (Weight, Local Preference, AS path, origin, MED), and where those do not decide it shows FRR's own selectionReason; when no reason is stored, it says a step the table does not show decided it and does not name one. The later steps (eBGP over iBGP, IGP cost to the next hop, router ID, cluster list) are not compared, and MED only between paths from the same neighbor AS. network-xray never re-runs the decision or picks a different winner. Or open the recorded, no-install
version: Best-Path Decision demo:

The same in one script: bash scripts/demo-locpref-flip.sh deploys the q21 lab, changes one Local Preference on r1 and prints the winner and the reason before and after (it shows the answer of q21). A real run: docs/demo-locpref-flip.md.
Also a recorded OSPF lab — OSPF goes Full (green tunnels, LSDB sync indicator), a link drops and a router is isolated (route lost, packet dropped), then it recovers and re-converges:

Inside the router — the DeepDive cylinder (an OSPF adjacency at Full: hello, LSDB sync indicator based on neighbor state, the reported installed route):

▶ Paste reported state — no install: paste a router's show output → it draws the topology, then click a
router to look inside. https://rclab-dev.github.io/network-xray/ (or jump straight to
paste-your-output).
▶ Watch a recorded lab converge & recover — frames captured from a running FRR/containerlab lab, replayed in the browser with no backend (steady → link down / router isolated → re-forms → converged): Best-Path Decision (eBGP: competing LocPref → why one path wins) · OSPF replay · BGP replay (eBGP sessions, AS-paths, BGP table).
Quick start: run a lab in containerlab

You need: Linux (or Windows with WSL2 — WSL2 guide — or a Linux VM) · Docker · containerlab · Node.js 18+ · about 2 GB of free memory (each FRR router is a small container; measured with docker stats on FRR 8.4: about 20 MB per router, and the network-xray container about 30 MB between reads and, while it reads the routers (one Node.js reader per router), up to about 110 MB with 3 routers and 260 MB with 10; a memory limit on the container should be above that peak, e.g. docker run --memory 300m or deploy.resources.limits.memory: 300m in compose for up to 10 routers) · your user can run docker without sudo (the docker group: how).
Which way? First time? To try an example lab, use xray.sh below: it deploys the lab and serves the page on port 8080. To look at a lab that is already running, use the docker run line at the top (port 8600) instead — xray.sh deploys the lab again (containerlab deploy --reconfigure), which wipes anything you changed by hand (or run ./xray.sh --attach <lab.clab.yml>, which graphs the running lab without redeploying it). A problem downloaded from Releases runs with its own run.sh (port 50080).
Before you start: use a lab machine — containerlab runs with
sudo.xray.shserves the page on this machine only (127.0.0.1, port 8080 by default). To open it from other machines, add--bind 0.0.0.0; the page has no login, so anyone who can reach the machine can then see the lab — keep it on a trusted network.--interval <seconds>reads the routers less often (default 1). More
git clone https://github.com/rclab-dev/network-xray.git
cd network-xray
./xray.sh --check examples/q21-bgp-lp/q21.clab.yml # optional: check docker, containerlab, node, the port and the lab (starts nothing)
./xray.sh examples/q21-bgp-lp/q21.clab.yml # deploy -> keep collecting -> serve the graph
xray.sh was called demo.sh before; ./demo.sh still works (it runs xray.sh).
- Wait for
==> open http://<this machine>:8080/(the first run pulls the FRR image — this can take a few minutes). Stuck or failing (Docker Hub rate limit, Docker permission, port in use)? See FAQ / Troubleshooting and docs/troubleshooting.md. - Open http://localhost:8080/ (from another machine: run it with
--bind 0.0.0.0, thenhttp://<host-ip>:8080/). - The problem is the band at the top (English / 日本語 toggle at the top right). Below it: the topology view (the whole lab) — click a router to open its DeepDive (Routing Engine, Routing table, BGP Table / LSDB, Best-Path Decision).
- Fix the lab in a router's shell — the picture follows within a few seconds:
docker exec -it clab-q21-bgp-lp-r1 vtysh - Compare with the solved version: stop (Ctrl-C) and run
./xray.sh examples/q21-bgp-lp-solved/q21.clab.yml. - Clean up: Ctrl-C, then
sudo containerlab destroy -t examples/q21-bgp-lp/q21.clab.yml --cleanup(if you also started the solved version:sudo containerlab destroy -t examples/q21-bgp-lp-solved/q21.clab.yml --cleanup).
More labs: examples/ has 21 problems (q1–q21, OSPF / BGP / static) plus one BGP best-path sample, each with a broken version and a -solved version, and a README (the problem, how to check it, how to start and stop). Run any of them the same way: ./xray.sh examples/<problem>/<file>.clab.yml.
No git? Download one problem as a folder from the Releases page and run ./run.sh in it (opens on :50080).
Your own problem: put a problem.json next to your *.clab.yml (the problem text, the route to focus on, and a check that turns the band to ✓ Solved) — the format is in docs/problem-format.md.
Labs started another way (e.g. with netlab): xray.sh redeploys the lab, which would wipe the configuration netlab pushed, so don't use it there. Start the lab as usual (netlab up), then, in the lab folder, run the collector and the graph yourself:
Before you start: the graph below binds to
127.0.0.1:8080. If you change it to0.0.0.0:8080for remote access, it has no login — keep the machine on a trusted network. More
node <network-xray>/clab-xray-collect.js clab.yml <network-xray> bgp --exclude-mgmt --watch &
containerlab graph --topo clab.yml --template <network-xray>/xray-graph-nextui.html --static-dir <network-xray> -s 127.0.0.1:8080
--static-dirserves every file in that folder. When it is your clone, keep-s 127.0.0.1:…; to open the page from other machines, use./xray.sh --bind 0.0.0.0, which serves only the page files. Useospfinstead ofbgpfor an OSPF-only lab. For a lab with both OSPF and BGP, usebgp: it reads the OSPF neighbors too (the container andxray.shchoose this by themselves).--exclude-mgmttakes the management subnet fromclab.yml.<network-xray>is the folder you cloned. Then openhttp://localhost:8080/. The path display is inferred from the routing table each router reports. To stop: Ctrl-C, thenkill %1for the collector. If aproblem.jsonis left in<network-xray>(e.g. from an olderxray.sh), remove it first (rm -f <network-xray>/problem.json): otherwise the previous problem's band shows on this lab. A lab without a problem has no band. Any topologyprefix:works (no prefix,clab,"",__lab-nameor your own word): the routers are found by the labels containerlab puts on their containers. Routers with no links are read too. A node labelledgraph-hidewith no links (nrx's graphite web view, which hides itself from its own picture with this label) is left out, not shown as a node network-xray cannot read.
Before you start (netlab tool /
docker run): the container is given the Docker socket (root-equivalent on the host) — lab machines only. Its page has no login: thedocker runexample below publishes it on this machine only (127.0.0.1), and the netlab defaults file does too. With netlab,network-xray.jsonholds the lab's values, passwords included, while the lab is up (with network-xray'snetlab-defaults.yml,netlab downremoves it). Withdocker run,-p 127.0.0.1:8600:8600(instead of-p 8600:8600) opens the page to this machine only. More
netlab tool (Docker image): network-xray also comes as a container that netlab starts for you next to the lab. In your netlab topology, add
defaults.sources.extra: [ <network-xray>/docker/netlab-defaults.yml ] # the tool definition (netlab 26.10)
tools:
network_xray:
The bundled defaults file publishes the page on the lab host only (-p 127.0.0.1:8600:8600). To open it from other machines, change that -p line in your copy of docker/netlab-defaults.yml to -p 8600:8600; the page has no login, so use it on a trusted network only. You can also pin the image there as ghcr.io/rclab-dev/network-xray@sha256:<digest> (the digest is in that version's release notes; a made-up one will not pull) (see the release page). Security notes
In CI: do not keep the lab folder (network-xray.json and netlab's own files) as a CI artifact; it holds the lab's passwords. Stop the lab with netlab down --cleanup.
On a shared machine, keep the lab folder readable by you only (for example chmod 700 <lab folder>); the network-xray container still reads it, as root.
In netlab the tool is named network_xray (underscore), because tool names are also used in environment variable names; the product, repository and image keep the name network-xray.
netlab 26.11 and later also have their own network_xray tool definition (netlab's page): there tools: network_xray: alone starts network-xray (graph and DeepDive). netlab's own definition publishes the page on all host interfaces; network-xray's defaults file above publishes it on 127.0.0.1 only. That definition does not write network-xray.json: the band where network-xray checks the validate: tests itself (below) does not appear — netlab's own results from network_xray/validate.json (below) still do — and a network-xray.json you write yourself is not removed by netlab down. For network-xray's own check, keep the defaults.sources.extra line above (its tool definition also removes the file on netlab down).
If your topology already has a defaults.sources.extra list (the BGP Labs do), add the file to that list instead of adding a second line. Then run netlab up: when the lab is configured, netlab starts ghcr.io/rclab-dev/network-xray:1 and prints Open http://localhost:8600/ in a browser on this host. It finds OSPF / BGP by itself (and follows you if you add BGP later), and netlab down removes it. With the multilab plugin (plugin: [ multilab ], defaults.multilab.id: N) each lab gets its own port, 8600 + N (the plugin is needed: without it the labs' management addresses clash). Checked as a netlab tool with FRR labs (ipSpace BGP Labs 3-rr, an OSPF example); SR Linux routers are read too (checked with containerlab). network-xray reads FRR, SR Linux and Cisco IOS-XE (containerlab kind cisco_iol): other devices (Linux hosts, cEOS, …) are drawn in the topology and their DeepDive says so. A router that is stopped or does not answer is drawn grey with the reason; one that stops answering keeps its last state, marked as old, and the rest of the picture keeps updating.
Without netlab (any running containerlab lab): docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v "$(pwd)":/lab:ro -p 127.0.0.1:8600:8600 ghcr.io/rclab-dev/network-xray:1 --topo /lab/<lab>.clab.yml (<lab>.clab.yml = the topology file in the current folder, e.g. q21-bgp-lp.clab.yml; the page opens on this machine only; use -p 8600:8600 to open it to other machines) — the page has no login, so use a trusted network for remote access. You can pin the image as ghcr.io/rclab-dev/network-xray@sha256:<digest> (the digest is in that version's release notes; a made-up one will not pull) (see the release page). For the example labs (examples/) the problem band and ✓ Solved show too (from the problem.json next to the topology); a lab without one has no band. The image is built for linux/amd64 and linux/arm64.
If netlab up says the lab is already running, a lab with the same name is still up from another folder (netlab status --all): run netlab down there first.
netlab validate tests on the page: if the lab has validate: tests (the ipSpace BGP Labs do), the page shows them as a band above the graph — "3 / 12", one line per test (done = green ✓), ✓ Solved when all pass — and colours the BGP session or the router a failing test is about. network-xray judges the tests itself every few seconds (FRR routers, bgp_neighbor and bgp_prefix, using the checks and messages of netlab's FRR rules for those two tests), so the band follows you while you configure. Tests it does not read (ping, OSPF, show/valid, other devices) stay grey and keep ✓ Solved off — run netlab validate for those. Right after the lab starts the band waits instead of judging too early (these waits are network-xray's own, so for a short time its verdict can differ from netlab validate): no ✓ Solved for 60 s, a check that a route is not there waits until the router's BGP sessions have been up for 30 s (or the test's wait:), and ✓ Solved needs all checks to keep passing for 20 s. BGP Labs: use a copy from 2026-10-15 or later (bgplab commit 02b8860) — with an older copy netlab validate cannot run the tests that use bgp.originate on netlab 26.x. The tool definition makes netlab create / netlab up also write network-xray.json (the lab data the tests refer to) for this. While the lab is up, that file holds what netlab writes about the lab, passwords in the topology included (it is not shown on the page); netlab down removes it — stop the lab with netlab down (not only docker kill or a power-off), or delete the file yourself. If netlab up fails part-way, the tool's clean-up does not run either: delete network-xray.json yourself.
netlab's results come first: if the lab folder has network_xray/validate.json (the output of netlab validate --format json, netlab 26.11 or later), the band shows those results as they are — netlab's own verdict, in netlab's words, for every test kind and every device, under "netlab validate results" with how old the results are. When the file gets old, the band stays and is dimmed, with its age shown. Only without the file does network-xray check the bgp_neighbor / bgp_prefix tests itself (above) — a guide while you configure, not netlab's verdict. network-xray does not run netlab validate. With netlab 26.11 or later, netlab's network_xray tool keeps the file up to date: tools: { network_xray: { validate: True } } runs it every validate_interval seconds (default 30) while the lab is up (netlab's page). This only helps when the topology has validate: tests: without them there are no results for the band to show. Otherwise run it yourself in the lab folder, for example: mkdir -p network_xray; while sleep 30; do netlab validate --format json > network_xray/validate.json.tmp && mv network_xray/validate.json.tmp network_xray/validate.json; done (each run logs in to the devices, which is heavy on a large lab: pick the interval yourself).
Documentation truncated — see the full README on GitHub.
Reviews
No reviews yet
Be the first to review this server!
More Developer Tools MCP Servers
Rea
Freeby Morluto · Developer Tools
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
Paperclip
Freeby Paperclipai · Developer Tools
Trending hip-hop artist momentum scores across four cultural dimensions.
Scrapling
Freeby D4Vinci · Developer Tools
Web scraping with stealth HTTP, real browsers, and Cloudflare bypass. CSS selectors supported.
Server Time
Freeby Modelcontextprotocol · Developer Tools
Current time lookup and conversion between IANA timezones
Toleno
Freeby Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
MCP Marketplace
Freeby mcp-marketplace · Developer Tools
Search and install MCP servers from inside your AI client.
