Quick Start#


SNMP Simulator is written in Python and depends on other Python libraries. The easiest way to deploy SNMP Simulator is by downloading it from PyPI.

Below we quickly set up a Python 3.12 virtual environment and install SNMP Simulator into it.

$ pyenv local 3.12
$ pip install pipenv
$ pipenv --python 3.12
$ pipenv install snmpsim-lextudio


You might want to use some existing data files to get started quickly. Then, you can install snmpsim-data-lextudio package as well. You can learn more about it in the `SNMP Simulator Data`_.

Run SNMP Simulator#

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

$ pipenv run snmpsim-command-responder --data-dir=./data/UPS \

This command starts the Simulator on UDP/IPv4 port 1611. It will respond to SNMP queries with simulation data stored in ./data/UPS directory.

Test the Setup#

Depending on how many data files are loaded, the Simulator initializes a number of agents. You can then try them out with Net-SNMP’s command-line tools which are usually shipped along with your operating system:

$ snmpwalk -v2c -c apc-8932 system
SNMPv2-MIB::sysDescr.0 = STRING: APC Web/SNMP Management Card (MB:v4.1.0 PF:v6.7.2 PN:apc_hw05_aos_672.bin AF1:v6.7.2 AN1:apc_hw05_rpdu2g_672.bin MN:AP8932 HR:02 SN: 3F503A169043 MD:01/23/2019)
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.318.
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (165328680) 19 days, 3:14:46.80
SNMPv2-MIB::sysContact.0 = STRING: Unknown
SNMPv2-MIB::sysName.0 = STRING: pwr-dc01-pdu-rack3-01
SNMPv2-MIB::sysLocation.0 = STRING: Unknown
SNMPv2-MIB::sysServices.0 = INTEGER: 72
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.2 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.3 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB Module from SNMPv2 entities
SNMPv2-MIB::sysORDescr.2 = STRING: SNMP Management Architecture MIB
SNMPv2-MIB::sysORDescr.3 = STRING: Message Processing and Dispatching MIB
SNMPv2-MIB::sysORDescr.4 = STRING: USM User MIB
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (0) 0:00:00.00

Simulation data are simple plain-text file, with .snmprec (or other) file extensions. Each line in represents a single SNMP object in form of pipe-separated fields OID|TYPE|VALUE.

$ cat ./data/UPS/apc-8932.snmprec|4x|415043205765622f534e4d50204d616e6167656d656e74204361726420284d423a76342e312e302050463a76362e372e3220504e3a6170635f687730355f616f735f3637322e62696e204146313a76362e372e3220414e313a6170635f687730355f7270647532675f3637322e62696e204d4e3a4150383933322048523a303220534e3a20334635303341313639303433204d443a30312f32332f3230313929|6||67|165328680|4|Unknown|4x|7077722d646330312d7064752d7261636b332d3031|4|Unknown|2|72|67|0|6||6||6||6||6||4x|546865204d4942204d6f64756c652066726f6d20534e4d50763220656e746974696573|4x|534e4d50204d616e6167656d656e7420417263686974656374757265204d4942|4x|4d6573736167652050726f63657373696e6720616e64204469737061746368696e67204d4942|4x|55534d2055736572204d4942|4x|5641434d204d4942|67|0|67|0|67|0|67|0|67|0

The Simulator analyzes the parameters (such as SNMP community name or SNMPv3 context name and/or IP address) of SNMP query to determine which agent (whose data from a specific .snmprec file) to respond with.

Simulate Existing SNMP Agent#

Besides creating simulation data by hand, you can generate it from some existing SNMP agent. Here we use publicly available SNMP Simulator instance as a donor device:

$ pipenv run snmpsim-record-commands --agent-udpv4-endpoint=demo.pysnmp.com \
SNMP version 2c, Community name: public
Querying UDP/IPv4 agent at
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


We host many simulation data files in snmpsim-data-lextudio package. You can learn more about them in the `SNMP Simulator Data`_.

Simulate from MIB#

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

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

You can even sniff network traffic on the wire recovering SNMP messages there and building 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.