Difference between revisions of "Snmpset"

From Net-SNMP Wiki
Jump to: navigation, search
(Created page with "{{tool|snmpset|tutorial=1|manual=1|code=apps/snmpset.c}} The '''snmpset''' application sends configuration components to an agent using the SNMP SET protocol operation. The...")
 
(No difference)

Latest revision as of 23:23, 30 June 2011

Net-SNMP Tool
snmpset
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.

Example

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