SNMP Simulator (snmpsim)
Testing a monitoring setup against real hardware is a hassle. You need the device, it has to be reachable, and you certainly can't ask a production switch to pretend its CPU just hit 100% so you can check your alert fires. That's where snmpsim comes in. It's an SNMP simulator — a tool that stands up a fake agent answering on UDP 161 exactly as real kit would, replaying values you control. This page explains what snmpsim is, how to install it and simulate an SNMP agent, the commands and features that matter, its strengths and limits, and how it fits alongside the external monitoring you'll eventually point at real devices.
What is SNMP Simulator (snmpsim)
snmpsim is a tool that emulates SNMP agents. Instead of a physical device answering queries, snmpsim runs as software that responds to snmpget, snmpwalk, and snmpbulkwalk requests with data you've defined ahead of time. To the manager doing the polling, it's indistinguishable from a real agent — same OIDs, same MIB structure, same protocol versions (SNMPv1, SNMPv2c, and SNMPv3).
Where does the data come from? Usually from a snapshot of a real device. You capture a live agent's responses once — often by walking it and saving the output — then feed that recording to the simulator, which replays it. The result is a faithful stand-in exposing genuine OIDs like hrProcessorLoad at 1.3.6.1.2.1.25.3.3.1.2 or the interface counters in ifTable at 1.3.6.1.2.1.2.2.1. That's enormously useful when you're building or testing monitoring: you can develop against a hundred simulated devices on one laptop, reproduce a specific fault condition on demand, or hand a colleague a reproducible test target without shipping them hardware. It removes the physical device from the loop entirely while keeping the data honest.

Install & basic use
snmpsim is a Python package, which makes getting it running straightforward on any system with Python. Here's the path from install to a working simulated agent:
- Install via pip. In a virtual environment,
pip install snmpsimpulls the command-line simulator and its dependencies. - Prepare a data directory. The simulator reads
.snmprecfiles — plain-text recordings of OID, type, and value. A default set ships with the package to get you started. - Record a real device (optional). Capture a live agent's data with a walk and save it as a
.snmprecfile so the simulation mirrors actual hardware. - Launch the responder, binding it to a local address and port. Non-root users typically use a high port like 1161 to avoid needing privileges for 161.
- Query it with any Net-SNMP client to confirm it answers.
Recording and then querying the simulator looks like this:
# Capture a real agent's processor table into a .snmprec recording
snmpwalk -v2c -c public -On 10.0.0.5 1.3.6.1.2.1.25.3.3.1.2
# ...then query the running simulator the same way you'd query real kit
snmpwalk -v2c -c public 127.0.0.1:1161 1.3.6.1.2.1.25.3.3.1.2
Notice the client side is ordinary Net-SNMP — the Net-SNMP tools page covers those commands in depth. The only thing that's changed is what's answering. If you want to explore a recording visually, a MIB browser can point at the simulator just as it would a real device.
Key commands / features
snmpsim's behavior is driven by its data files and launch options rather than a big command vocabulary. This table covers the pieces you'll work with most.
| Feature / flag | What it does |
|---|---|
.snmprec data file | Plain-text OID–type–value records the simulator replays |
| Community as data path | The community string selects which recording to serve — one instance, many virtual devices |
--agent-udpv4-endpoint | Binds the responder to an address and port |
Record via snmpwalk -On | Numeric walk output feeds straight into a recording |
| Variation modules | Make values dynamic — counters that tick, values that follow a script |
| SNMPv3 support | Simulate authenticated, encrypted agents, not just v2c |
The feature that makes snmpsim more than a static playback tool is its variation modules. A plain recording returns the same number every time, which is fine for structure but poor for testing counter-based metrics. Variation modules let a value change on each query — an interface's ifInOctets that actually increments, a load figure that walks up and down — so your monitoring logic gets exercised against movement, not a frozen snapshot. Combined with the community-as-path trick, one process can present dozens of distinct virtual devices, each with its own data and behavior.
Pros & cons
snmpsim is a testing and development tool. It's brilliant in that role and pointless outside it — it's not something you monitor in production.
- Pro — no hardware needed. Develop and test against realistic SNMP data on a single machine, offline.
- Pro — reproducible. A recorded
.snmprecfile gives everyone the exact same target, so bugs and tests are repeatable. - Pro — scale on demand. Simulate many devices at once to load-test a monitoring system or a polling pipeline.
- Pro — fault injection. Recreate a specific bad state — a pegged CPU, a full disk — to confirm your alerts actually fire.
- Con — it's fake. Simulated data is only as accurate as the recording behind it; it won't surface real device quirks you didn't capture.
- Con — not for production. snmpsim answers with canned data. It tells you nothing about a live system's real health.
- Con — some assembly required. Getting realistic, dynamic behavior means learning the data format and variation modules.
Alternatives
If you need to query real devices rather than fakes, that's the Net-SNMP command-line suite. To explore what a device or a simulation exposes through a visual tree, use a MIB browser. The tools pillar maps the full toolkit, the tools comparison weighs them against one another, and the home page shows how SNMP monitoring fits together end to end.
Here's the honest framing: snmpsim helps you build and prove a monitoring setup, but at some point you point that setup at real infrastructure — and then you want it watching from outside, not from a box that could go down with everything else. That's the double durability principle: an independent, external checker still reports when the host itself can't. Once you've validated your thresholds against a simulator, ostr.io Monitoring polls the real endpoints over SNMPv2c from outside your network and sends real-time email and SMS alerts — the agentless, zero-setup counterpart to the fake agent you tested with.
