netbridgeng
Network devices already know a great deal. Their interfaces don't show it.
Status: proof of concept (alpha). Read-only telemetry plus the device's own CLI, one device at a time. The web page has no login and the server opens SSH sessions on request, so it listens on
127.0.0.1by default: keep it there unless something in front of it authenticates. See Security.
pip install netbridgeng
netbridgeng
Then open http://127.0.0.1:8470/?demo for the demo (http://127.0.0.1:8470/?demo=junos for the Juniper one), or http://127.0.0.1:8470/ to connect to a switch. Everything it needs is bundled: it runs with no internet access.
Why this exists
A modern switch carries a remarkable amount of live, structured information: every neighbor it can see, the traffic on every port, dozens of temperature sensors with their own limits, the state and history of every routing session. Most of it is one show command away, and on many platforms it already comes back as clean JSON.
What it comes back to is a CLI built for the 1990s, or a web UI that was an afterthought. The information is there. The interface is the bottleneck.
For most of networking's history that was simply the deal: the vendor shipped the box and the vendor decided how you got to see it. That has changed. The data is structured, the browser can draw anything, and building an interface is no longer a project measured in quarters. As customers, we can now decide what our own equipment looks like.
netbridgeng is a proof of concept with that point to make. It connects to one switch over SSH, runs ordinary show commands, and renders the answers as a ship's bridge: a 3D radar of the device's neighbors, a skyline of port utilization over time, a see-through chassis with its sensors and airflow, a shield of BGP sessions, a map of OSPF adjacencies, and the device's own CLI in a console of its own.
It is not trying to be practical. It is not a monitoring system, it keeps no history beyond the open page, and nobody needs a radar to read show lldp neighbors. Its job is to explore what is possible, and to make the case that the distance between the data a device holds and the way we are shown it is a choice, not a law.
Arista EOS was the first example because | json makes it easy. Juniper Junos is the second, picked from the connect dialog: see Not just Arista.
What it shows
All screenshots are from the built-in demo mode (?demo): a fictional spine in a spine/leaf fabric with sample data that moves, drops a leaf link and flaps a BGP session now and then.
| LLDP / OSPF radar. Every LLDP neighbor is a contact. Bearing is the local port's order on the chassis, range is the neighbor's tier (border and spine close in, leaves further out), height separates tiers above and below. Traffic streams along each link at a density set by load; a ring marks an OSPF FULL adjacency. A neighbor that ages out leaves a fading red ghost. | |
| Interface utilization. The front panel as a skyline: in and out columns per port, height on a labelled square-root scale so 1% links still show beside a busy 100G uplink, heat from amber (over 50%) to red (over 80%). The last 40 polls recede behind the front row, so a burst and a sustained climb look different. Discards throw red sparks. | |
| Environment. The chassis as a translucent hull. Each sensor is a heat point with a gauge whose rings mark the device's own setpoint, alert and critical limits. Fans spin at their reported speed, PSUs glow with their draw, and airflow particles cross the box in the reported direction, warming as they pass hot sensors. | |
| Environment detail. Every sensor grouped and readable: temperature, a bar marked with all three limits, headroom, and a sparkline of the session so far. Fans and PSUs below. | |
| BGP. The router inside a shield, one segment per peer. iBGP peers orbit close, eBGP further out. Columns are received prefixes (log scale), arcs are session uptime, particles on each beam are UPDATE traffic from the message counters. | |
| A session drops. The peer falls out to the NOT ESTABLISHED ring, its beam breaks, its shield segment flickers red, a shockwave crosses the shield and the whole bridge goes to CRITICAL with the reason in the header. | |
| OSPF. Adjacencies on one ring per area. The conduit's color is the adjacency state, the sleeve is BFD, a pulse runs while it holds. Beads count state changes (red ones happened since the page opened); retransmissions that rose since the last poll throw amber sparks. The column over the router stacks its OSPF routes by type. | |
| An adjacency is lost when the leaf link drops: red, fading, and counted in the header. | |
The device's own CLI, in a console that sits over the bridge rather than in it: a solid, extruded slab, draggable and resizable, on the same session as the telemetry. In demo mode a small shell answers a few show commands from the sample data. |
|
| Connect straight to a device: pick the platform (Arista EOS or Juniper Junos), then SSH key on the server, an uploaded key, or a password. The server tests SSH before it creates the session. | |
| On a phone the stations stack under the main screen. |
The same bridge on Juniper
?demo=junos is a fictional MX960 edge router: two transits with full tables, an IX, two cores over OSPF and iBGP, aggregation and customer ports. It is stored as raw | display xml replies, and the server runs them through the real Junos adapter on every load, so what you see is the adapter's output, animated: traffic, an aggregation link loss that takes its LLDP and OSPF neighbor with it, and an IX session flap. The page has no Junos code.
Radar from show lldp neighbors and show ospf neighbor detail. Transits, IX switch, cores, aggregation and customers by role; ports in FPC/PIC/port order. |
|
xe-2/0/3 drops. agg-02 goes dark, its OSPF adjacency is counted lost in the header, and syslog shows SNMP_TRAP_LINK_DOWN and RPD_OSPF_NBRDOWN. |
|
Utilization from show interfaces extensive octets and drops: 100G et- and 10G xe- ports on one panel, transit-A bursting into discards. |
|
Environment from show chassis environment: four PEMs with their own temperatures, three fan trays, FPC and CB sensors. Junos reports no per-sensor limits, so the gauges show status words instead of setpoint rings. |
|
BGP from show bgp summary, with v4 and v6 transits, IX peers and iBGP. An IX peer goes Idle: CRITICAL, with the reason in the header. |
|
Console demo shell takes Junos command names (show bgp summary | no-more) and answers from the data on screen. |
Side stations (BGP peers, environment, interfaces, syslog) stay in view around the main screen, and tapping one switches the main screen to its 3D view. The header carries one status, HEALTHY / DEGRADED / CRITICAL, with the reason beside it.
Every visual is a value the device already reports
| What you see | Where it comes from |
|---|---|
| Radar contacts, bearings, names | show lldp neighbors | json and the port list from show interfaces status | json |
| Traffic on links, utilization skyline, discard sparks | show interfaces counters | json, differenced between polls, against each port's bandwidth |
| Sensor heat, gauge rings, headroom | show system environment all: each sensor's temperature, setpoint, alert and critical limits |
| Fans, PSUs, airflow direction | the same command: fan speed and status, PSU draw and capacity, airflow |
| BGP shield, orbits, prefix columns, uptime arcs | show ip bgp summary | json: state, remote AS, prefixes, upDownTime, message counters |
| OSPF rings, conduits, BFD sleeves, beads, sparks | show ip ospf neighbor | json: area, state, DR state, BFD state, state changes, retransmissions |
| OSPF route column, RIB totals | show ip route summary | json |
| Header: model, EOS, uptime, CPU | show version | json, show processes top once | json |
| Syslog station | show logging last 50 |
Nothing is installed on the device and nothing is configured on it. It is SSH and show commands, the same access an engineer uses every day.
Health, by the box's own rules
The header status follows what the device itself reports rather than thresholds invented for the page:
- CRITICAL: the device's temperature status reports critical, overheating or shutdown; a sensor at its critical limit; every PSU failed; a BGP session down.
- DEGRADED: temperature or cooling status other than Ok; a sensor past its alert limit; a fan or a PSU not Ok; an LLDP neighbor or OSPF adjacency lost; an adjacency not FULL (2-WAY with a DROTHER is normal and ignored).
- A sensor past its setpoint is normal: that is where the fans ramp. It shows amber in the environment views and does not change the status.
Quick start
Python 3.10 or newer, and a browser with WebGL2. three.js, xterm.js and the fonts are bundled, so neither the server nor the browser needs internet access.
From PyPI:
pip install netbridgeng
netbridgeng --print-config > config.yaml
netbridgeng
From source:
git clone https://github.com/scottpeterman/netbridgeng.git
cd netbridgeng
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
netbridgeng
Open http://127.0.0.1:8470/, pick Arista EOS or Juniper Junos and connect, or http://127.0.0.1:8470/?demo for the demo. The page also runs the demo straight from disk: open netbridgeng/static/index.html?demo in a browser, no server needed.
config.yaml only pre-fills the connect dialog and sets the poll interval (15 s by default) and where the server listens. It is read from --config, then $NETBRIDGENG_CONFIG, then ./config.yaml; --host and --port override the listen address. requirements.txt pins paramiko to 4.0.0 for older devices; the package itself accepts any 4.x.
How it works
switch <--- SSH: show ... | json ---> collector (netmiko)
|
server (FastAPI): a session per device,
a poll loop, the latest state in memory
|
/ws: one JSON document per poll, pushed to the page
|
page (one HTML file): three.js views, side stations, health
|
/ws/terminal: xterm.js <--> paramiko interactive shell
netbridgeng/collectors/arista/runs the commands over one persistent SSH session and returns a single dictionary per poll (JSON where EOS offers it, parsers for the environment and syslog text).netbridgeng/collectors/juniper/does the same over| display xml, andadapter.pymaps the Junos replies onto the EOS-shaped contract below, so the page needs no Junos code.netbridgeng/server.pyholds sessions, runs the poll loop, pushes each result over/ws, proxies the SSH terminal over/ws/terminal, and creates sessions throughPOST /api/connect.netbridgeng/static/index.htmlis the whole frontend: no build step, no framework. Rates (bits per second, discards, BGP messages, OSPF retransmits) are worked out in the page from counter deltas between polls, and history lives in the page for as long as it is open.
Not just Arista
The page does not know it is talking to Arista. It reads one JSON document per poll, and any collector that produces the same keys lights up the same views. The shapes are EOS's own | json output, which makes them a reasonable, documented contract:
| Key | Shape | Used by |
|---|---|---|
version |
hostname, modelName, version, serialNumber, uptime or bootupTimestamp |
header |
lldp.lldpNeighbors[] |
port, neighborDevice, neighborPort, ttl |
radar, OSPF names |
interfaces.interfaceStatuses{port} |
linkStatus, bandwidth, interfaceType, description |
radar, utilization, interfaces |
counters.interfaces{port} |
inOctets, outOctets, inDiscards, outDiscards |
traffic, utilization |
bgp.vrfs.default |
asn, routerId, peers{ip} with peerState, asn, prefixReceived, prefixAccepted, upDownTime, msgSent, msgReceived, description |
BGP |
ospf.vrfs.default.instList{id}.ospfNeighborEntries[] |
routerId, interfaceName, interfaceAddress, adjacencyState, drState, priority, details{areaId, bfdState, retransmissionCount, numberOfStateChanges} |
OSPF |
routes.vrfs.default |
totalRoutes, ospfCounts{...}, bgpCounts{...} |
OSPF, BGP |
environment |
sensors[] (id, description, temp, setpoint, alert_limit, critical_limit, psu), fans[], power_supplies[], airflow, temp_status, cooling_status, ambient_temp |
environment, health |
logging[] |
timestamp, source, severity, mnemonic, message |
syslog |
meta |
hostname, timestamp, poll_count, poll_time, error, stale |
header, rates |
The second collector, Juniper Junos, is that point made. It runs | display xml (old Junos has no | display json), and collectors/juniper/adapter.py maps each reply onto these keys. The page has no Junos code; the platform is chosen in the connect dialog and enforced by the server.
| Bridge key | Junos source |
|---|---|
version |
show version, show chassis hardware, show chassis routing-engine |
interfaces, counters |
show interfaces extensive (physical ports only; logical units dropped) |
lldp |
show lldp neighbors (units stripped so ports match) |
bgp |
show bgp summary, local AS and router ID from show configuration routing-options |
ospf |
show ospf neighbor detail |
routes |
show route summary (inet.0) |
environment |
show chassis environment, with show chassis alarms as the temperature / cooling status |
proc |
master routing engine CPU from show chassis routing-engine |
logging |
show log messages | last 50 |
What Junos does not report is left empty rather than invented, and the page copes: no per-sensor setpoint or alert limits (sensor status words and chassis alarms carry the health instead), fan speed as text rather than a percent, no PSU watts, no OSPF retransmission or state-change counters, OSPF routes as one bucket (no intra/inter/external split), and syslog severity is not in the default messages format.
To check the adapter against a real box once and then iterate offline:
python -m netbridgeng.collectors.juniper capture --host edge1.example.net --user scott --out cap/edge1
python -m netbridgeng.collectors.juniper adapt cap/edge1
capture saves each raw reply and prints a coverage report; adapt re-runs the adapter on the saved replies.
NX-OS (| json), IOS-XE (TextFSM, Genie or RESTCONF) and OpenConfig over gNMI can be mapped the same way.
Honest notes
- One device per session. The bridge is a view of a single switch, not of a network.
- Sensor placement is grouped by name (switch chip, CPU, PSU, front, rear). The data carries no physical positions, and the views say so.
- Rates and history live in the page. They start when the page opens and go when it closes.
- Tested against an Arista 7280R-series switch on EOS 4.21, and the demo. Other EOS versions and platforms may name sensors differently.
- The Junos adapter has been run against synthetic replies (
tests/fixtures/junos-synthetic/) written to the documented XML tags. Runcaptureagainst your own box before trusting it. show interfaces extensiveis the heaviest Junos command in the poll on a router with many logical units.device.juniper.interfaces_commandinconfig.yamlswaps it (show interfaces detailis lighter but has no drop counters).
Security
The server opens SSH sessions on request and the web UI has no login. It listens on 127.0.0.1 by default; keep it there unless you put it behind something that authenticates. Uploaded keys are written to a temporary file readable only by the server's user and deleted when the session ends. Host keys are accepted on first connect (paramiko AutoAddPolicy), which is fine for a proof of concept and not for anything more. The SSH agent is never used.
License
GPL-3.0-or-later (see LICENSE). The bundled libraries keep their own licenses: three.js, xterm.js and xterm-addon-fit (MIT), Chakra Petch and Share Tech Mono (SIL Open Font License 1.1). Details and license texts are in netbridgeng/static/vendor/.
Layout
netbridgeng/
__main__.py python -m netbridgeng (same as the netbridgeng command)
server.py sessions, poll loop, /ws, /ws/terminal, /api/connect, /api/defaults
config.example.yaml netbridgeng --print-config
collectors/arista/ collector.py (netmiko, show | json), parsers.py (environment, syslog)
collectors/juniper/ collector.py (netmiko, show | display xml), adapter.py (Junos -> bridge keys),
__main__.py (capture / adapt), demo/ (synthetic MX replies for ?demo=junos)
static/index.html the bridge
static/vendor/ three.js, xterm.js, fonts, and their licenses
screenshots/ demo mode
tests/ adapter tests, synthetic Junos replies
tools/make_junos_demo.py writes collectors/juniper/demo/
pyproject.toml
requirements.txt
LICENSE GPL-3.0
netbridgeng grew out of nethuds, an earlier experiment in heads-up displays for network devices.
Metadata
Release files for netbridgeng 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| netbridgeng-0.2.0.tar.gz | 384.8 kB | Without provenance | Details for netbridgeng-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| netbridgeng-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for netbridgeng-0.2.0-py3-none-any.whl |
Total release size: 771.3 kB
Release files / netbridgeng-0.2.0.tar.gz
| Download URL | netbridgeng-0.2.0.tar.gz |
|---|---|
| Size | 384.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1e2148f963961a2085bcc0266df8d0dcfedfd070353a29f883895a620efc2b4
|
|
BLAKE2b-256 checksum How to use checksums |
789c4dad56e1d65d89fad839881da52211514f86b45a0e2a53bcc80719c9c46a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / netbridgeng-0.2.0-py3-none-any.whl
| Download URL | netbridgeng-0.2.0-py3-none-any.whl |
|---|---|
| Size | 386.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
91c165406fa2ca3d5fc10de57edbd53e087105733cdcee8f7f7e1f9cfe2384dd
|
|
BLAKE2b-256 checksum How to use checksums |
83144f7d3cbb855f97ce358a3b1926bc6c888c44123d65c797dbdf6ad7340d26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for netbridgeng 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.