Skip to content

Latest commit

Β 

History

705 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

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 gets its own IP address via Linux TUN interfaces and network namespaces.

Highlights

  • Runs 30,000+ simulated devices on a single host. See Scaling.
  • 29 device types across 9 categories (core / edge routers, DC and campus switches, firewalls, servers, NVIDIA DGX/HGX GPU servers, enterprise storage, and Ciena Waveserver 5 optical transport). See Device types.
  • Multi-protocol per device: SNMP v2c/v3 (RFC 3414 USM: MD5/SHA1 authentication, 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. You need no source checkout 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 SNMP trap / INFORM export (v1, v2c, v3 USM). It uses a central Poisson scheduler with a global rate cap, a user-overridable JSON catalog, and per-device UDP source IPs. Suited to trap-daemon scale testing. Configure with -trap-collector <host:port>; see SNMP traps and the catalog reference.
  • Per-device syslog export (RFC 5424 / RFC 3164 over UDP, TCP or TLS). It uses a central Poisson scheduler with a global rate cap, a user-overridable JSON catalog, and per-device 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 and transport with -syslog-transport udp|tcp|tls. Suited to syslog-collector scale testing. Configure with -syslog-collector <host:port>; see Syslog export and the catalog reference.
  • gNMI streaming telemetry. Every device serves a read-only OpenConfig dial-in target (gRPC + TLS on :9339, SAMPLE / ON_CHANGE / ONCE). It can also 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, SNMP v3 at every USM security level (RFC 3414, verified against net-snmp; see nl6#624), 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. It suits 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.27 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 your NMS's LLDP discovery 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. The packaging reference is in deploy/packages/. Container deployment: Getting started β†’ Docker. Deployment recipes & worked examples: examples/, with 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, load-test scenarios, troubleshooting.
  • Reference: CLI flags, web API, device types, SNMP, flow export, resource files, GPU simulation.
  • Explanation: architecture, why Kubernetes is out of scope, SNMP data fidelity, measuring a collector's ceiling.

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.

Support

nl6 is free and open source under the Apache-2.0 license. It is an open network simulator that stands in for a lab full of hardware (30,000+ devices, real SNMP / NetFlow / IPFIX / sFlow / Syslog / gNMI). If it saved you a test rig, a one-time donation helps keep it maintained: releases, new device types, and protocol upkeep.

No tiers, no gated features. The simulator stays free for everyone. A ⭐ or a good issue helps as much, and there's a spot on SPONSORS.md if you'd like one. πŸ™

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

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages