Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI Interface for SNMP

Basics of SNMP

  • Last UpdatedFeb 13, 2023
  • 2 minute read

SNMP stands for "Simple Network Management Protocol." SNMP is a protocol for communications among devices on a computer network. SNMP runs on top of TCP/IP and enables communications between devices such as PCs, routers, bridges, and switches.

SNMP devices must run SNMP manager or agent software. SNMP managers retrieve device information from SNMP agents, including standard information as specified by relevant ISO standards and proprietary information that is specific to a particular device or manufacturer.

The type of information exchanged between the SNMP Manager and the SNMP agent is defined by MIBs (Management Information Bases). The most common MIB is called MIB-II (or MIB-2). MIB-II contains information pertinent to network management. It defines information such as the number of octets (group of 8 bits) sent and received on a particular physical interface.

MIBs contain object identifiers (OIDs), which identify the variables that can be read or set using SNMP. For example, the following OIDs identify the variables that contain the number of input and output octets:

.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifInOctets
.iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutOctets

MIB-II supports abbreviated syntax; the preceding OIDs can be abbreviated as follows:

interfaces.ifTable.ifEntry.ifInOctets
interfaces.ifTable.ifEntry.ifOutOctets

The numerical representations of the preceding OIDs are as follows:

.1.3.6.1.2.1.2.2.1.10
.1.3.6.1.2.1.2.2.1.16

A particular occurrence of an OID is called an instance. To address an instance, you add its instance number to the end of the OID. Based on the preceding examples, to address the number of octets received on the first physical interface, specify the instance as follows:

interfaces.ifTable.ifEntry.ifInOctets.1
.1.3.6.1.2.1.2.2.1.10.1

For OIDs where there is only a single occurrence, a zero is used. For example, the only instance of system.sysUptime is specified as follows:

system.sysUptime.0

Some OID values are counters. A counter is an unsigned 32-bit integer ranging from 0 to 4,294,967,295. When a counter value reaches the maximum, it rolls over to 0. The interface can be configured to store counter values as rates. If the location2 attribute for a point is set to 1, the interface stores the difference between two successive readings divided by the scan time. For example:

scanned value = 2000
previous value = 200
scan time = 1 minute
stored value = (2000 – 200)/60 = 30

A trend of such values might be more meaningful for your application, because it provides the number of values transferred per second rather than a series of raw counters.

TitleResults for “How to create a CRG?”Also Available in