Skip to main content

SNMP Simulator is a tool that acts as multitude of SNMP Agents built into real physical devices, from SNMP Manager's point of view. Simulator builds and uses a database of physical devices' SNMP footprints to respond like their original counterparts do.

Project description

SNMP Simulator

Become a Sponsor 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

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.

Feedback and collaboration

Bug reports, fixes, suggestions, improvements, and your pull requests are very welcome!

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snmpsim-1.1.5.tar.gz (240.0 kB view details)

Uploaded Source

Built Distribution

snmpsim-1.1.5-py3-none-any.whl (226.1 kB view details)

Uploaded Python 3

File details

Details for the file snmpsim-1.1.5.tar.gz.

File metadata

  • Download URL: snmpsim-1.1.5.tar.gz
  • Upload date:
  • Size: 240.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.8.16 Darwin/23.6.0

File hashes

Hashes for snmpsim-1.1.5.tar.gz
Algorithm Hash digest
SHA256 8daa9a0d92df4c7afd9188d9292fbb0602254b1ab5bb1732ab7e1aff3eb4c33a
MD5 60d22e36760ea36216e3c95b7c75ab00
BLAKE2b-256 d56899b788ee9b20e0ee4a9cd25c2d12299002f91134a833f772c4b28d5bf42a

See more details on using hashes here.

File details

Details for the file snmpsim-1.1.5-py3-none-any.whl.

File metadata

  • Download URL: snmpsim-1.1.5-py3-none-any.whl
  • Upload date:
  • Size: 226.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.8.16 Darwin/23.6.0

File hashes

Hashes for snmpsim-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0e24ca3c569d0ae0aeac7b092c18a7d4b8e62fb722d7245dd2d274bf1753bca9
MD5 7cc9ed3103671060b94a2aa3b7c2ffb6
BLAKE2b-256 1da71aa6be14a7b02376109932b3f72de01e0765b3fc4a0e168d8c39a2d8115c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page