Skip to content

labmonkeys-space/nl6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

437 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CI Docs Go Version License Container Image Latest Release

nl6 Logo

πŸ“– Documentation: https://labmonkeys-space.github.io/nl6/

A scalable network and infrastructure simulator that exposes realistic SNMP v2c/v3, SSH, and HTTPS REST interfaces for testing network management software, monitoring systems, and automation tools. nl6 can simulate tens of thousands of network devices, GPU servers, storage systems, and Linux servers β€” each with its own IP address via Linux TUN interfaces and network namespaces.

Highlights

  • Runs 30,000+ simulated devices on a single host β€” see Scaling.
  • 28 device types across 8 categories (core / edge routers, DC and campus switches, firewalls, servers, NVIDIA DGX/HGX GPU servers, and enterprise storage) β€” see Device types.
  • Multi-protocol per device: SNMP v2c/v3 (MD5/SHA1 auth, DES/AES128 privacy), SSH with VT100 terminal emulation, and HTTPS REST β€” see SNMP reference and Web API.
  • Realistic dynamic metrics: CPU / memory / temperature on 100-point sine waves; full IF-MIB counter cycling (octets plus per-direction unicast / multicast / broadcast packet counts, errors, discards) with per-device error-scenario tuning (clean / typical / degraded / failing); per-GPU DCGM metrics β€” see SNMP reference β†’ Dynamic IF-MIB counters and GPU simulation.
  • Self-reporting version: ./nl6 -version, GET /api/v1/version, and a hero-kicker (vX.Y.Z) in the web UI all report the running build β€” no source checkout needed to identify a deployed simulator.
  • Per-device flow export (NetFlow v5 / v9, IPFIX, sFlow v5) with per-device source IPs β€” see Flow export.
  • Per-device SNMPv2c trap / INFORM export β€” central Poisson scheduler with a global rate cap, a user-overridable JSON catalog, and per-device UDP source IPs. Suited to OpenNMS trapd scale testing. Configure with -trap-collector <host:port>; full flag list and catalog schema in CLAUDE.md β†’ "SNMP trap export".
  • Per-device UDP syslog export (RFC 5424 / RFC 3164) β€” central Poisson scheduler with a global rate cap, user-overridable JSON catalog, and per-device UDP source IPs. Ships six generic entries (interface up/down, auth success/failure, config change, system restart) spanning local7 and authpriv; select format with -syslog-format 5424|3164. Suited to OpenNMS syslogd scale testing β€” configure with -syslog-collector <host:port>; full flag list and catalog schema in CLAUDE.md β†’ "UDP syslog export".
  • gNMI streaming telemetry β€” every device serves a read-only OpenConfig dial-in target (gRPC + TLS on :9339, SAMPLE / ON_CHANGE / ONCE), and can additionally push telemetry to a collector via gNMI dial-out (Arista gNMIReverse, per-device opt-in, mixed fleets supported) β€” see gNMI target and gNMI dial-out.

Status & scale

Stable β€” SNMP v2c/v3, SSH, HTTPS REST (storage APIs), NetFlow v5/v9 and IPFIX, TUN-per-device scaling with nl6sim network-namespace isolation, web UI, REST control plane.

Experimental β€” sFlow v5 (synthesised from FlowCache records with a fixed sampling_rate; suitable for collector-plumbing validation, not link-utilisation benchmarking β€” see Flow export reference β†’ sFlow caveat).

Tested scale β€” up to 30,000 concurrent simulated devices on a single host. Toolchain β€” Go 1.26 or later; canonical version pinned in go/go.mod.

Quick start

git clone https://github.com/labmonkeys-space/nl6.git
cd nl6/go/nl6 && go build -o nl6 .

# Auto-create 5 devices starting at 192.168.100.1
sudo ./nl6 -auto-start-ip 192.168.100.1 -auto-count 5

Then query any device:

snmpget -v2c -c public 192.168.100.1 1.3.6.1.2.1.1.1.0
ssh simadmin@192.168.100.1                            # password: simadmin
gnmic -a 192.168.100.1:9339 --skip-verify capabilities

Per-device exports (flow + trap + syslog in a single create call):

# Boot without any export CLI flags β€” the subsystems are always-on.
sudo ./nl6

# Create 10 devices that all emit IPFIX flows, SNMPv2c traps, and
# RFC 5424 syslog to one collector. Any of the three blocks is optional.
curl -X POST http://localhost:8080/api/v1/devices \
  -H 'Content-Type: application/json' \
  -d '{
    "start_ip": "10.0.0.1",
    "device_count": 10,
    "flow":   {"collector": "192.168.1.10:4739", "protocol": "ipfix"},
    "traps":  {"collector": "192.168.1.10:162",  "mode":     "trap"},
    "syslog": {"collector": "192.168.1.10:514",  "format":   "5424"}
  }'

# Inspect what each subsystem has attached.
curl http://localhost:8080/api/v1/flows/status   | jq '.data.collectors'
curl http://localhost:8080/api/v1/traps/status   | jq '.collectors'
curl http://localhost:8080/api/v1/syslog/status  | jq '.collectors'

Inter-device topology (LLDP). Link two devices and the neighbor table plus a to_<peer>_<port> ifAlias appear on both ends β€” point OpenNMS Enlinkd at the LLDP root (1.0.8802.1.1.2) to discover the topology:

curl -X POST http://localhost:8080/api/v1/topology \
  -H 'Content-Type: application/json' \
  -d '{"links":[{"a":{"ip":"10.0.0.1","ifindex":1},"b":{"ip":"10.0.0.2","ifindex":2}}]}'

snmpwalk -v2c -c public 10.0.0.1 1.0.8802.1.1.2        # LLDP local + neighbor tables
snmpget  -v2c -c public 10.0.0.1 1.3.6.1.2.1.31.1.1.1.18.1   # ifAlias = to_<peer>_<port>
curl http://localhost:8080/api/v1/topology/status | jq   # {subsystem_active, configured_links, active_links}

Full walkthrough: Getting started β†’ Quick start. Prebuilt packages (.deb / .rpm / NixOS): Getting started β†’ Install packages β€” packaging reference in deploy/packages/. Container deployment: Getting started β†’ Docker. Deployment recipes & worked examples: examples/ β€” Clos fabrics and a ready-to-run OpenNMS Minion (docker compose) stack.

Documentation map

The docs site has four top-level sections:

  • Getting Started β€” build, first run, package install, Docker.
  • Operations β€” scaling, network namespace, flow export, troubleshooting.
  • Reference β€” architecture, CLI flags, web API, device types, SNMP, flow export, resource files, GPU simulation.
  • GPU simulation β€” NVIDIA DCGM OID layout, per-GPU metrics, and the pollaris / parser integration notes (formerly plans/).

Reference content that used to live in this README now lives in the docs site. A bare README.md on GitHub is intentional: the site is the canonical home.

Contributing

Contributions are welcome. Two project policies apply to every patch:

1. Sign off every commit (Developer Certificate of Origin). All commits must carry a Signed-off-by: trailer certifying the DCO. Use -s on every commit:

git commit -s -m "your commit message"

A DCO-check gate will fail any PR whose commits are missing the sign-off trailer.

Suggested workflow

  1. Fork labmonkeys-space/nl6.
  2. Create a feature branch.
  3. Make your changes and add / update tests.
  4. Run make check-tidy && make build && make test locally.
  5. git commit -s each commit.
  6. gh pr create --repo labmonkeys-space/nl6 --base main.

Cutting a release. Maintainers: see RELEASING.md for the tag-driven release workflow and the short post-tag verification checklist.

License

Licensed under the Apache License, Version 2.0. See LICENSE for details.

Heritage

Originally forked from saichler/l8opensim; see commit history for upstream attribution.


nl6 β€” simulate networks, test at scale, develop with confidence.

About

Open network load simulator for SNMP, NetFlow v5,v9, IPFIX, sFlow, Syslog, gNMI

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors