Logo
Home page Net-SNMP

Archive Search:

Require all words?

Site Search:
Google
Net-SNMP Tutorial -- snmpset

Net-SNMP Tutorial -- snmpset

The snmpset command is used to actually modify information on the remote host. For each variable you want to set, you need to specify the OID to update, the data type and the value you want to set it to.

The valid datatypes can be found at the end of the snmpset help output:


So, lets check, set, and check again the value of a variable using snmpget and snmpset:


As you can see, we successfully changed the value of the ucdDemoPublicString.0 object.

Note that if you don't have write permission to the object, the errors will differ greatly between SNMPv1 and SNMPv2c:


SNMPv1 did not have nearly as descriptive error codes, which SNMPv2c fixed. It's a good reason to use SNMPv2c in preference to SNMPv1. Even better, is to use SNMPv3 which has a much better security system and also uses the better error reporting. We'll talk extensively about SNMPv3 later.

Valid CSS!


Last modified: Wednesday, 01-Aug-2018 04:41:28 UTC
For questions regarding web content and site functionality, please write to the net-snmp-users mail list.