# snmp

> The snmp identity: Simple Network Management Protocol. Every field and what is required.

`snmp` is the Simple Network Management Protocol (RFC 3411). The target is `host:port` (default 161). The step sends and receives raw datagram bytes as hex over UDP, and the session persists across steps, so a solution can stage an exchange and continue it.

## Write it in English

A step reads as sentences, the same byte-session forms as [tcp](/docs/solution/identity/tcp/): `send hex "<hex>"` (or `send hex of "<text>"`), `receive <n> bytes`, `receive until "<hex>"`, `port <n>`, `timeout <n> seconds`, `close the connection`, and `expect ...`.

## Fields

`snmp` uses the byte-session fields from [tcp](/docs/solution/identity/tcp/): `send`, `recv`, `recv_until`, `timeout`, `close`, and `capture`. Each send is one datagram and each read returns the next datagram.

## Example

```text
snmp baseline
  # a normal SNMPv2c GET for sysDescr.0 with community "public"
  send hex "302902010104067075626c6963a01c020401020304020100020100300e300c06082b060102010101000500"
  recv 4096
  expect "4c696e7578" in the response
```