Category 04 of 08Layer 73 Native ProtocolsFrameAssembly v3.2.2
Raw .mdllms-full.txt

SNMPv1, SNMPv2c & Encrypted SNMPv3 USM Protocols

Validating Zabbix, PRTG, Checkmk, LibreNMS, or snmptrapd alert pipelines normally requires either pulling live fiber on a maintenance window or fighting snmptrap MIB search paths and Net-SNMP engineBoot caches. FrameAssembly encodes ASN.1 BER Object Identifiers and all 9 SMI varbind types directly from numeric OIDs with zero external MIB files.

For snmp3, the compiler executes genuine RFC 3414 and RFC 7860 password-to-key (Ku -> Kul) localization against your hex engineid, signs the whole message with live HMAC (md5, sha, sha256, sha384, or sha512), and encrypts the ScopedPDU with aes (AES-128-CFB) or des so Wireshark and snmptrapd decrypt the capture natively.

Keywords in Category 04:snmp1snmp2snmp3
Wire & Endpoint Rules

Wire Framing & Endpoint Rules for SNMPv1 / v2c / v3 Monitoring

Rule 01

Automatic Port 161 vs. Port 162 Selection

trap, inform, and report default to UDP dstport 162; get, getnext, getbulk, set, and response default to UDP dstport 161.

Rule 02

Strict SMI Value Keywords (string & oidval)

Repeatable varbind <oid> <type> <val> clauses use string "<text>" (never str), int, oidval <oid>, ipval <ipv4>, counter32, gauge32, timeticks, counter64, opaque, or null.

Rule 03

SNMPv2c / SNMPv3 Trap OID Convention

Pass sysuptime <ticks> to prepend sysUpTime.0 (1.3.6.1.2.1.1.3.0) and varbind 1.3.6.1.6.3.1.1.4.1.0 oidval <trap_oid> for snmpTrapOID.0 (never a hallucinated trapoid keyword).

Rule 04

Even-Length Hex engineid Validation

snmp3 validates at compile time that engineid is even-length ASCII hex (e.g. "80001f888001020304") before deriving localized authPriv keys.

Multi-Protocol Capture Example

SNMPv1 Enterprise Trap, SNMPv2c GetBulk & Encrypted SNMPv3 USM Trap

Generates an RFC 1157 SNMPv1 enterprise trap, an SNMPv2c 64-bit interface counter getbulk + response poll on UDP 161, and an RFC 7860 SHA-256 + AES-128 encrypted SNMPv3 linkDown trap on UDP 162.

snmp_v1_v2c_v3_usm.frasm9 lines
Open in Playground
host core_rtr { ip 10.40.1.1 }
host nms_srv { ip 10.40.1.100 }
compile {
core_rtr -> nms_srv snmp1 trap community "noc-ro" enterprise 1.3.6.1.4.1.9.9.43 gentrap 6 spectrap 1 sysuptime 125000 varbind 1.3.6.1.2.1.1.5.0 string "core-rtr-01" wait 3ms
nms_srv -> core_rtr snmp2 getbulk community "noc-ro" reqid 901 nonrepeaters 0 maxrepetitions 5 oid 1.3.6.1.2.1.31.1.1.1.6 wait 2ms
nms_srv <- core_rtr snmp2 response community "noc-ro" reqid 901 varbind 1.3.6.1.2.1.31.1.1.1.6.1 counter64 98412044500 wait 3ms
core_rtr -> nms_srv snmp3 trap user "secops" engineid "80001f888001020304" engineboots 4 enginetime 3600 auth sha256 "AuthSecret2026!" priv aes "PrivSecret2026!" sysuptime 410000 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.6.3.1.1.5.3 varbind 1.3.6.1.2.1.2.2.1.2.1 string "TenGigE0/0/1"
}
Terminal Commands (FrameAssembly CLI v3.2.2)
# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show snmp_v1_v2c_v3_usm.frasm

# 2. Compile .frasm -> classic .pcap (tcpdump/tcpreplay/Suricata) or nanosecond .pcapng
frameassembly snmp_v1_v2c_v3_usm.frasm snmp_v1_v2c_v3_usm.pcap
frameassembly snmp_v1_v2c_v3_usm.frasm snmp_v1_v2c_v3_usm.pcapng

# 3. Round-trip .pcap <-> .frasm whenever you want to scrub or tweak an existing capture
frameassembly reverse snmp_v1_v2c_v3_usm.pcap snmp_v1_v2c_v3_usm_edited.frasm

# 4. Verify dissected protocol fields in tshark
tshark -r snmp_v1_v2c_v3_usm.pcap -Y "snmp"
All 3 Protocols

All 3 Native Protocols in Layer 7 SNMPv1, SNMPv2c & Encrypted SNMPv3 USM

Select any lowercase protocol keyword below for its full RFC wire layout, modifier table, cross-layer wrappers, and runnable lab capture.

#KeywordProtocol & Wire SummaryDefault Port / ProtoEndpoint RuleWireshark Filter
32snmp1Simple Network Management Protocol v1

snmp1 — MIB-Free RFC 1157 Traps, Enterprise OIDs & Polls

UDP 162 (trap) / UDP 161 (get/set)Dual-Stack IPv4/IPv6snmp
33snmp2Simple Network Management Protocol v2c

snmp2 — MIB-Free SNMPv2c Traps, Informs & GetBulk Sweeps

UDP 162 (trap/inform) / UDP 161 (get/getbulk)Dual-Stack IPv4/IPv6snmp
34snmp3Simple Network Management Protocol v3 with USM Auth & Privacy

snmp3 — Real SHA-256 + AES-128 Encrypted USM Traps & Polls

UDP 162 (trap/inform/report) / UDP 161 (get/getbulk)Dual-Stack IPv4/IPv6snmp