The other main SNMP operation for retrieving information is the GETNEXT request - a "fuzzy-matching" version of GET.
+
The other main SNMP operation for retrieving information is the [[GETNEXT]] request - a "fuzzy-matching" version of GET, and is implemented by the [[snmpgetnext]] tool.
    
== Basic Example ==
 
== Basic Example ==
 
     % snmpgetnext -v 2c -c demopublic test.net-snmp.org SNMPv2-MIB::sysUpTime.0
 
     % snmpgetnext -v 2c -c demopublic test.net-snmp.org SNMPv2-MIB::sysUpTime.0
 
     SNMPv2-MIB::sysContact.0 = Wes Hardaker wjhardaker@ucdavis.edu
 
     SNMPv2-MIB::sysContact.0 = Wes Hardaker wjhardaker@ucdavis.edu
 +
 +
    % snmptranslate -On SNMPv2-MIB::sysUpTime.0 SNMPv2-MIB::sysContact.0
 +
    .1.3.6.1.2.1.1.3.0
 +
    .1.3.6.1.2.1.1.4.0
 +
    
At first sight, this might seem an odd thing to do, but it is actually extremely useful,
 
At first sight, this might seem an odd thing to do, but it is actually extremely useful,
    
     % snmpgetnext -v 2c -c demopublic test.net-snmp.org sysORDescr
 
     % snmpgetnext -v 2c -c demopublic test.net-snmp.org sysORDescr
     SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module to describe generic objects for network interface sub-layers<BR>
+
     SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module for SNMPv2 entities<BR>
 
     % snmpgetnext -v 2c -c demopublic test.net-snmp.org sysORDescr.1
 
     % snmpgetnext -v 2c -c demopublic test.net-snmp.org sysORDescr.1
     SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for SNMPv2 entities<BR>
+
     SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module to describe generic objects for network interface sub-layers<BR>
 
     % snmpgetnext -v 2c -c demopublic test.net-snmp.org sysORDescr.2
 
     % snmpgetnext -v 2c -c demopublic test.net-snmp.org sysORDescr.2
 
     SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing IP and ICMP implementations
 
     SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing IP and ICMP implementations
      −
== Multiple Variables ==
+
== Multiple Values ==
    
Just as with [[TUT:snmpget|snmpget]], it's also possible to run a single GETNEXT request with several OIDs, and it will retrieve the next valid instance for each of these:
 
Just as with [[TUT:snmpget|snmpget]], it's also possible to run a single GETNEXT request with several OIDs, and it will retrieve the next valid instance for each of these:
    
     % snmpgetnext -v 2c -c demopublic test.net-snmp.org sysORDescr sysORID sysORUpTime
 
     % snmpgetnext -v 2c -c demopublic test.net-snmp.org sysORDescr sysORID sysORUpTime
Exception encountered, of type "Error"