---
type: Article
title: "SNMP Simulator (snmpsim)"
description: "snmpsim stands up a fake SNMP agent that replays values you control — test alerts and build monitoring against a hundred simulated devices on one laptop."
resource: "https://snmp-monitoring.com/tools/snmpsim/"
tags: [tools, snmp]
timestamp: 2026-07-13T00:00:00Z
---

# 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.

![Terminal screenshot of the snmpsim SNMP simulator responding to an snmpwalk query on port 1161](https://snmp-monitoring.com/img/tools/snmpsim-responder.webp)

## 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:

1. **Install via pip.** In a virtual environment, `pip install snmpsim` pulls the command-line simulator and its dependencies.
2. **Prepare a data directory.** The simulator reads `.snmprec` files — plain-text recordings of OID, type, and value. A default set ships with the package to get you started.
3. **Record a real device (optional).** Capture a live agent's data with a walk and save it as a `.snmprec` file so the simulation mirrors actual hardware.
4. **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.
5. **Query it** with any Net-SNMP client to confirm it answers.

Recording and then querying the simulator looks like this:

```bash
# 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](/tools/net-snmp.md) 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](/tools/mib-browser.md) 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 `.snmprec` file 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](/tools/net-snmp.md). To explore what a device or a simulation exposes through a visual tree, use a [MIB browser](/tools/mib-browser.md). The [tools pillar](/tools/index.md) maps the full toolkit, the [tools comparison](/tools/comparison.md) weighs them against one another, and the [home page](/index.md) 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](/monitoring/double-durability.md) 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](https://ostr.io/service/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.

![Diagram showing snmpsim replaying a recorded .snmprec file to simulate an SNMP agent for a monitoring system under test](https://snmp-monitoring.com/img/tools/snmpsim-architecture.webp)


## FAQ

**Why would I simulate an SNMP agent instead of using a real one?**
To test without the hardware in the loop. A simulator lets you develop monitoring, reproduce a specific fault, or load-test against many devices — all offline and repeatably. You can safely recreate a disk-full or CPU-pegged state that you'd never trigger on production kit just to check an alert.

**Where does snmpsim get its data?**
From `.snmprec` files: plain-text records of OID, type, and value. You typically create them by walking a real device with `snmpwalk -On` and saving the output, so the simulation mirrors genuine hardware. A default data set also ships with the package.

**Can snmpsim simulate changing values, like traffic counters?**
Yes, through its variation modules. A static recording returns the same value each time, but a variation module makes a value move — incrementing a counter, following a curve — so your monitoring is tested against realistic movement rather than a frozen number.

**Does snmpsim support SNMPv3?**
It does. Alongside SNMPv1 and SNMPv2c, snmpsim can simulate SNMPv3 agents with authentication and privacy, so you can test encrypted polling paths, not just clear-text community access.

## Conclusion

snmpsim is the SNMP simulator you reach for when you want to build and prove a monitoring setup without real hardware getting in the way. Record a device into a `.snmprec` file, replay it — optionally with dynamic variation modules — and you have a faithful, reproducible target that speaks genuine OIDs on demand. It's a development and testing tool, full stop. When it's time to watch real infrastructure, take what you validated and point an external monitor at the live endpoints, so the alerts you tested against a fake agent still land when a real one goes quiet.
