From Net-SNMP Wiki
Jump to: navigation, search
Net-SNMP Tool
Manual: snmpset
Tutorial: Tutorial
Code: apps/snmpset.c

The snmpset application sends configuration components to an agent using the SNMP SET protocol operation. The configuration is a list of OIDs and values that make up the configuration that should be set.

Generally you can use OID = value in order to set the objects and Net-SNMP is smart enough, when it has the available MIBs, to figure out what the datatype for the value should be. But, you can always specify it manually if want to ensure the data is sent as the right type (ie, as an OCTET STRING or an INTEGER). See snmpset -h for value types.


 (this example, unlike most others, won't actually work on the demo server)
 # snmpset -v 1 -c demopublic sysContact.0 = 'test'
 SNMPv2-MIB::sysContact.0 = "test"