<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://doc.expecco.de/index.php?action=history&amp;feed=atom&amp;title=SNMP_Plugin_Reference%2Fen</id>
	<title>SNMP Plugin Reference/en - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://doc.expecco.de/index.php?action=history&amp;feed=atom&amp;title=SNMP_Plugin_Reference%2Fen"/>
	<link rel="alternate" type="text/html" href="https://doc.expecco.de/index.php?title=SNMP_Plugin_Reference/en&amp;action=history"/>
	<updated>2026-08-25T08:09:57Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in expecco Wiki (Version 26.x)</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://doc.expecco.de/index.php?title=SNMP_Plugin_Reference/en&amp;diff=31738&amp;oldid=prev</id>
		<title>Sv: SNMP plugin description: library blocks, protocol versions, MIBs, tables, traps, Test/Demo variables</title>
		<link rel="alternate" type="text/html" href="https://doc.expecco.de/index.php?title=SNMP_Plugin_Reference/en&amp;diff=31738&amp;oldid=prev"/>
		<updated>2026-08-21T12:01:07Z</updated>

		<summary type="html">&lt;p&gt;SNMP plugin description: library blocks, protocol versions, MIBs, tables, traps, Test/Demo variables&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== SNMP Plugin ==&lt;br /&gt;
The SNMP plugin lets a test suite talk to SNMP capable equipment - routers, switches, printers, servers,&lt;br /&gt;
UPS units, sensors - and receive the notifications such a device sends. It delivers the &amp;#039;&amp;#039;&amp;#039;SNMP Library&amp;#039;&amp;#039;&amp;#039;,&lt;br /&gt;
whose blocks cover the manager side of SNMP v1, v2c and v3: reading and writing objects, walking subtrees,&lt;br /&gt;
reading whole tables, resolving MIB names, and receiving as well as sending traps.&lt;br /&gt;
&lt;br /&gt;
Everything is implemented in expecco itself. No &amp;#039;&amp;#039;net-snmp&amp;#039;&amp;#039; installation and no other external library is&lt;br /&gt;
needed, and the blocks behave the same on every supported platform.&lt;br /&gt;
&lt;br /&gt;
=== The SNMP Library ===&lt;br /&gt;
The blocks are found in the library &amp;quot;&amp;#039;&amp;#039;SNMP Library&amp;#039;&amp;#039;&amp;quot;, grouped into six categories. Every block carries its&lt;br /&gt;
own documentation, every pin explains what it expects, and every block has a Test/Demo network which shows it&lt;br /&gt;
in use.&lt;br /&gt;
&lt;br /&gt;
==== SNMP Connection ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Open SNMP Session&amp;#039;&amp;#039;&amp;#039; - open a session to a device with SNMP v1 or v2c, using a community string.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Open SNMPV3 Session&amp;#039;&amp;#039;&amp;#039; - open an SNMPv3 session with a user name, an authentication and an encryption protocol, and the two passphrases. The context name and context engine id can be given for agents which partition their MIB into contexts.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Close SNMP Session&amp;#039;&amp;#039;&amp;#039; - release the session and its socket.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;SNMP Timeout/Retries&amp;#039;&amp;#039;&amp;#039; - how long to wait for an answer and how often to repeat a request.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;SNMP Session Info&amp;#039;&amp;#039;&amp;#039; - which host, port, version, community and context a session handle refers to.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;SNMP Last Error&amp;#039;&amp;#039;&amp;#039; - why the last request did not deliver a value, as a symbolic reason (noResponse, timedOut, noSuchName, wrongDigest, notWritable, ...).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;SNMP Max Repetitions&amp;#039;&amp;#039;&amp;#039; - how many objects one GetBulk request asks for; this is what a walk uses.&lt;br /&gt;
&lt;br /&gt;
==== SNMP Requests ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;SNMP Get&amp;#039;&amp;#039;&amp;#039; / &amp;#039;&amp;#039;&amp;#039;SNMP Get Next&amp;#039;&amp;#039;&amp;#039; / &amp;#039;&amp;#039;&amp;#039;SNMP Get Bulk&amp;#039;&amp;#039;&amp;#039; - read one object, the object following it, or a batch of following objects.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;SNMP Get Subtree&amp;#039;&amp;#039;&amp;#039; - walk everything below an object (for instance the whole &amp;#039;&amp;#039;system&amp;#039;&amp;#039; group or an entire table) and answer it as an oid to value dictionary.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;SNMP Set&amp;#039;&amp;#039;&amp;#039; - write one object. Without an explicit type the type is taken from the MIB definition, and the object is read back afterwards, so the outputs show what the agent really stored.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;SNMP Multi Get&amp;#039;&amp;#039;&amp;#039; / &amp;#039;&amp;#039;&amp;#039;Multi Get Next&amp;#039;&amp;#039;&amp;#039; / &amp;#039;&amp;#039;&amp;#039;Multi Get Bulk&amp;#039;&amp;#039;&amp;#039; / &amp;#039;&amp;#039;&amp;#039;Multi Set&amp;#039;&amp;#039;&amp;#039; - the same for several objects in ONE request, which is much faster than asking one by one.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;SNMP Get with Default&amp;#039;&amp;#039;&amp;#039; - read an object which only some devices implement, answering a default instead of failing.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Read SNMP Table&amp;#039;&amp;#039;&amp;#039; - read a whole conceptual table (ifTable, ipAddrTable, tcpConnTable, ...) and answer its rows in index order. The rows are also delivered one by one, so a following step can run once per row.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Table Row Value&amp;#039;&amp;#039;&amp;#039; / &amp;#039;&amp;#039;&amp;#039;Table Row Index&amp;#039;&amp;#039;&amp;#039; / &amp;#039;&amp;#039;&amp;#039;Table Row as Dictionary&amp;#039;&amp;#039;&amp;#039; - read a column of a row by name or number, the decoded INDEX of a row, or the whole row as a columnName to value dictionary.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;SNMP Get on Hosts&amp;#039;&amp;#039;&amp;#039; / &amp;#039;&amp;#039;&amp;#039;SNMP Multi Get on Hosts&amp;#039;&amp;#039;&amp;#039; - ask many devices the same question at once. The hosts are queried in parallel, so the block takes about as long as the slowest device rather than the sum of all of them; a host which does not answer is reported, not an error.&lt;br /&gt;
&lt;br /&gt;
==== MIB Access ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Name to OID&amp;#039;&amp;#039;&amp;#039; / &amp;#039;&amp;#039;&amp;#039;OID to Name&amp;#039;&amp;#039;&amp;#039; - translate between a MIB name (&amp;#039;&amp;#039;sysDescr.0&amp;#039;&amp;#039;, &amp;#039;&amp;#039;SNMPv2-MIB::sysDescr.0&amp;#039;&amp;#039;) and the numeric object identifier.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolve OIDs in Dictionary Keys&amp;#039;&amp;#039;&amp;#039; / &amp;#039;&amp;#039;&amp;#039;... Values&amp;#039;&amp;#039;&amp;#039; - replace the OIDs in the result of a walk or a multi get by their MIB names, which is what makes such a result readable in the report.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Describe MIB Object&amp;#039;&amp;#039;&amp;#039; - what the MIB knows about an object: full name, syntax, access, status, unit, the labels of an enumerated INTEGER, and whether it is a table or a table row with its INDEX.&lt;br /&gt;
&lt;br /&gt;
==== MIB Management ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Add MIB Directory&amp;#039;&amp;#039;&amp;#039; - parse the MIB files of a directory and add them, so vendor specific names can be used in the other blocks.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Shutdown MIB&amp;#039;&amp;#039;&amp;#039; - forget everything read from MIB files; the next name to resolve reads them again.&lt;br /&gt;
&lt;br /&gt;
==== SNMP Traps ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Start Trap Listener&amp;#039;&amp;#039;&amp;#039; - listen for notifications on a UDP port. The standard port 162 needs root privileges on unix, so an unprivileged port such as 11162 is often used.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Wait for Trap&amp;#039;&amp;#039;&amp;#039; - wait for the next notification and answer its sender, version, identifier (resolved through the MIB) and all its variables. Notifications which arrived before the block ran are not lost, and an inform request is acknowledged automatically.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Stop Trap Listener&amp;#039;&amp;#039;&amp;#039; - stop listening and release the port.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Send Trap&amp;#039;&amp;#039;&amp;#039; - send a notification to a trap receiver, as a plain trap or as an inform request which the receiver has to acknowledge.&lt;br /&gt;
&lt;br /&gt;
=== Protocol versions and security ===&lt;br /&gt;
SNMP &amp;#039;&amp;#039;&amp;#039;v1&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;v2c&amp;#039;&amp;#039;&amp;#039; identify the caller with a community string, which travels in clear text.&lt;br /&gt;
&lt;br /&gt;
SNMP &amp;#039;&amp;#039;&amp;#039;v3&amp;#039;&amp;#039;&amp;#039; authenticates and encrypts with the User-based Security Model. Supported protocols:&lt;br /&gt;
* authentication: &amp;#039;&amp;#039;md5&amp;#039;&amp;#039; and &amp;#039;&amp;#039;sha1&amp;#039;&amp;#039; (RFC 3414), and the SHA-2 protocols &amp;#039;&amp;#039;sha224&amp;#039;&amp;#039;, &amp;#039;&amp;#039;sha256&amp;#039;&amp;#039;, &amp;#039;&amp;#039;sha384&amp;#039;&amp;#039; and &amp;#039;&amp;#039;sha512&amp;#039;&amp;#039; (RFC 7860). Current net-snmp builds refuse MD5, so prefer SHA-256.&lt;br /&gt;
* encryption: &amp;#039;&amp;#039;des&amp;#039;&amp;#039; and &amp;#039;&amp;#039;aes128&amp;#039;&amp;#039; (RFC 3826). Encryption is only possible together with authentication.&lt;br /&gt;
&lt;br /&gt;
Engine discovery and the clock synchronisation an authenticated session needs happen automatically.&lt;br /&gt;
&lt;br /&gt;
=== MIBs ===&lt;br /&gt;
A current set of MIB modules is delivered with the library, so the usual names - those of SNMPv2-MIB, IF-MIB,&lt;br /&gt;
IP-MIB, TCP-MIB, UDP-MIB, HOST-RESOURCES-MIB and many more - resolve without any setup. Vendor MIBs are added&lt;br /&gt;
with &amp;quot;&amp;#039;&amp;#039;Add MIB Directory&amp;#039;&amp;#039;&amp;quot;, either from a directory of your own or from &amp;#039;&amp;#039;~/.snmp/mibs&amp;#039;&amp;#039;, which is read&lt;br /&gt;
automatically.&lt;br /&gt;
&lt;br /&gt;
The deprecated RFC1213-MIB groups &amp;#039;&amp;#039;at&amp;#039;&amp;#039;, &amp;#039;&amp;#039;egp&amp;#039;&amp;#039; and &amp;#039;&amp;#039;ipRouteTable&amp;#039;&amp;#039; are not part of the delivered set;&lt;br /&gt;
objects below them are shown numerically. Their replacements are &amp;#039;&amp;#039;ipNetToMediaTable&amp;#039;&amp;#039;, &amp;#039;&amp;#039;ipCidrRouteTable&amp;#039;&amp;#039;&lt;br /&gt;
and &amp;#039;&amp;#039;inetCidrRouteTable&amp;#039;&amp;#039;. If a device really needs the old names, drop &amp;#039;&amp;#039;RFC1213-MIB.txt&amp;#039;&amp;#039; into a MIB&lt;br /&gt;
directory.&lt;br /&gt;
&lt;br /&gt;
=== Reading a table ===&lt;br /&gt;
&amp;quot;&amp;#039;&amp;#039;Read SNMP Table&amp;#039;&amp;#039;&amp;quot; answers the rows of a conceptual table. A row knows its columns by name and the INDEX&lt;br /&gt;
which identifies it, and &amp;quot;&amp;#039;&amp;#039;Table Row Index&amp;#039;&amp;#039;&amp;quot; decodes that INDEX as the MIB defines it - the interface number&lt;br /&gt;
for &amp;#039;&amp;#039;ifTable&amp;#039;&amp;#039;, the IP address for &amp;#039;&amp;#039;ipAddrTable&amp;#039;&amp;#039;, the four parts of a connection for &amp;#039;&amp;#039;tcpConnTable&amp;#039;&amp;#039;.&lt;br /&gt;
Values arrive as Smalltalk objects: a counter as a number, an &amp;#039;&amp;#039;ifOperStatus&amp;#039;&amp;#039; as its label (&amp;#039;&amp;#039;up&amp;#039;&amp;#039;, &amp;#039;&amp;#039;down&amp;#039;&amp;#039;),&lt;br /&gt;
an IP address as an address, &amp;#039;&amp;#039;sysUpTime&amp;#039;&amp;#039; as a time duration.&lt;br /&gt;
&lt;br /&gt;
=== Traps and informs ===&lt;br /&gt;
A test can wait for a notification instead of polling: start a listener, let the device do whatever should&lt;br /&gt;
trigger the trap, and read it with &amp;quot;&amp;#039;&amp;#039;Wait for Trap&amp;#039;&amp;#039;&amp;quot;. Traps of all three versions are accepted; for SNMPv3&lt;br /&gt;
the sender is the authoritative engine, so the listener localizes the keys per sending device by itself.&lt;br /&gt;
Notifications which do not authenticate, or whose community is not accepted, are dropped silently.&lt;br /&gt;
&lt;br /&gt;
An inform request is acknowledged automatically, and &amp;quot;&amp;#039;&amp;#039;Send Trap&amp;#039;&amp;#039;&amp;quot; can send one, so a suite can also play&lt;br /&gt;
the role of the device.&lt;br /&gt;
&lt;br /&gt;
=== Test/Demo networks ===&lt;br /&gt;
Every block has a Test/Demo network. The ones which need a device use these environment variables of the&lt;br /&gt;
library, so that one place decides which equipment the demos talk to:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| DemoSNMPHost || the device the demos read from&lt;br /&gt;
|-&lt;br /&gt;
| DemoSNMPCommunity || the community string used for v1 / v2c&lt;br /&gt;
|-&lt;br /&gt;
| DemoSNMPV3User || the SNMPv3 user name&lt;br /&gt;
|-&lt;br /&gt;
| DemoSNMPV3AuthPassphrase || its authentication passphrase (the demo agent uses SHA-256)&lt;br /&gt;
|-&lt;br /&gt;
| DemoSNMPV3PrivPassphrase || its encryption passphrase (the demo agent uses AES-128)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Change them to a device of your own before running the demos. The trap demos need nothing on the network -&lt;br /&gt;
they start a listener, send themselves a trap and read it back.&lt;br /&gt;
&lt;br /&gt;
=== See also ===&lt;br /&gt;
* [https://www.rfc-editor.org/rfc/rfc3416 RFC 3416] - the SNMP protocol operations&lt;br /&gt;
* [https://www.rfc-editor.org/rfc/rfc3414 RFC 3414] - the User-based Security Model of SNMPv3&lt;br /&gt;
* [https://www.rfc-editor.org/rfc/rfc7860 RFC 7860] - the SHA-2 authentication protocols&lt;br /&gt;
* [https://www.rfc-editor.org/rfc/rfc2578 RFC 2578] - SMIv2, how a MIB module is written&lt;br /&gt;
&lt;br /&gt;
[[Category:Plugins]]&lt;/div&gt;</summary>
		<author><name>Sv</name></author>
	</entry>
</feed>