Skip to main content

SNMP Simulator

PyPI PyPI Downloads Python Versions GitHub license

This is a pure-Python, open source and free implementation of SNMP agents simulator distributed under 2-clause BSD license.

Features

  • SNMPv1/v2c/v3 support
  • SNMPv3 USM supports MD5/SHA/SHA224/SHA256/SHA384/SHA512 auth and DES/3DES/AES128/AES192/AES256 privacy crypto algorithms
  • Runs over IPv4 and/or IPv6 transports
  • Simulates many EngineID's, each with its own set of simulated objects
  • Varies response based on SNMP Community, Context, source/destination addresses and ports
  • Can gather and store snapshots of SNMP Agents for later simulation
  • Can run simulation based on MIB files, snmpwalk and sapwalk output
  • Can gather simulation data from network traffic or tcpdump snoops
  • Can gather simulation data from external program invocation or a SQL database
  • Can trigger SNMP TRAP/INFORMs on SET operations
  • Capable to simultaneously simulate tens of thousands of Agents
  • Offers REST API based control plane
  • Gathers and reports extensive activity metrics
  • Pure-Python, easy to deploy and highly portable
  • Can be extended by loadable Python snippets

Download

SNMP simulator software is freely available for download from PyPI and project site.

Installation

Just run:

$ pip install snmpsim-lextudio

How to use SNMP simulator

Once installed, invoke snmpsim-command-responder and point it to a directory with simulation data:

$ snmpsim-command-responder --data-dir=./data --agent-udpv4-endpoint=127.0.0.1:1024

Simulation data is stored in simple plaint-text files having OID|TYPE|VALUE format:

$ cat ./data/public.snmprec
1.3.6.1.2.1.1.1.0|4|Linux 2.6.25.5-smp SMP Tue Jun 19 14:58:11 CDT 2007 i686
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.8072.3.2.10
1.3.6.1.2.1.1.3.0|67|233425120
1.3.6.1.2.1.2.2.1.6.2|4x|00127962f940
1.3.6.1.2.1.4.22.1.3.2.192.21.54.7|64x|c3dafe61
...

Simulator maps query parameters like SNMP community names, SNMPv3 contexts or IP addresses into data files.

You can immediately generate simulation data file by querying existing SNMP agent:

$ snmpsim-record-commands --agent-udpv4-endpoint=demo.pysnmp.com \
    --output-file=./data/public.snmprec
SNMP version 2c, Community name: public
Querying UDP/IPv4 agent at 195.218.195.228:161
Agent response timeout: 3.00 secs, retries: 3
Sending initial GETNEXT request for 1.3.6 (stop at <end-of-mib>)....
OIDs dumped: 182, elapsed: 11.97 sec, rate: 7.00 OIDs/sec, errors: 0

Alternatively, you could build simulation data from a MIB file:

$ snmpsim-record-mibs --output-file=./data/public.snmprec \
    --mib-module=IF-MIB
# MIB module: IF-MIB, from the beginning till the end
# Starting table IF-MIB::ifTable (1.3.6.1.2.1.2.2)
# Synthesizing row #1 of table 1.3.6.1.2.1.2.2.1
...
# Finished table 1.3.6.1.2.1.2.2.1 (10 rows)
# End of IF-MIB, 177 OID(s) dumped

Or even sniff on the wire, recover SNMP traffic there and build simulation data from it.

Besides static files, SNMP simulator can be configured to call its plugin modules for simulation data. We ship plugins to interface SQL and noSQL databases, file-based key-value stores and other sources of information.

Besides stand-alone deployment described above, third-party SNMP Simulator control plane project offers REST API managed mass deployment of multiple snmpsim-command-responder instances.

Documentation

Detailed information on SNMP simulator usage could be found at snmpsim site.

Getting help

If something does not work as expected, open an issue at GitHub or post your question on Stack Overflow or try browsing snmpsim mailing list archives.

Feedback and collaboration

I'm interested in bug reports, fixes, suggestions and improvements. Your pull requests are very welcome!

Copyright (c) 2010-2019, Ilya Etingof. Copyright (c) 2022, LeXtudio Inc.. All rights reserved.

Metadata

Release files for snmpsim-lextudio 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snmpsim-lextudio 1.1.1
File Size Uploaded
snmpsim_lextudio-1.1.1.tar.gz 239.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for snmpsim-lextudio 1.1.1
File Interpreter ABI Platform
snmpsim_lextudio-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 465.9 kB

Release files / snmpsim_lextudio-1.1.1.tar.gz

Download URL snmpsim_lextudio-1.1.1.tar.gz
Size 239.9 kB
Tags Source
SHA-256 checksum
How to use checksums
55d71a27de878b6c4338e363d6f6a989cad0ae7f265ac187d6c617feb7ea840a
BLAKE2b-256 checksum
How to use checksums
522203a7a5e080cab1a0987ac7d3440cb07e77686bfe447e52e7f49b8a5dbb67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.8.16 Darwin/23.5.0

Release files / snmpsim_lextudio-1.1.1-py3-none-any.whl

Download URL snmpsim_lextudio-1.1.1-py3-none-any.whl
Size 225.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5288a59219789c8831aafe3dcb41f79f918215b870a25579ff2c5a713048a2f
BLAKE2b-256 checksum
How to use checksums
f4d14d2bda1a2245dc95d3e1e6475458f8d199199a0e85b937e74736b46ab069
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.8.16 Darwin/23.5.0

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page