Go to main content

Oracle® ILOM Protocol Management Reference for SNMP and IPMI Firmware Release 3.2.x

Exit Print View

Updated: January 2017
 
 

snmpset Command

While the syntax of the snmpset command is similar to that of the snmpget command, the commands are quite different. The snmpget command merely reads the value of the specified object ID, while the snmpset command writes the value specified to the object ID. Further, along with the value to be written to the object ID, you must also specify the data type of the object ID in the snmpset command because SNMP objects support more than one data type.

The following example shows the use of the snmpget and snmpset commands together. The sequence of steps is as follows:

  1. Use the snmpget command to check the current value of the MIB object.

  2. Use the snmpset command to change the value of the MIB object.

  3. Use the snmpget command to verify that the MIB object was in fact changed to the requested value.

    % snmpget  SNMP_agent ilomCtrlHttpEnabled.0
    SUN-ILOM-CONTROL-MIB::ilomCtrlHttpEnabled.0 = INTEGER: false(2)
    % snmpset  SNMP_agent ilomCtrlHttpEnabled.0 i 1
    SUN-ILOM-CONTROL-MIB::ilomCtrlHttpEnabled.0 = INTEGER: true(1)
    % snmpget  SNMP_agent ilomCtrlHttpEnabled.0
    SUN-ILOM-CONTROL-MIB::ilomCtrlHttpEnabled.0 = INTEGER: true(1)
    

Note that if you try to execute this snmpset command using a public community, instead of private, it will not work. This is because the private community has write permission, but the public community does not. The reason code returned by the command does not make this clear because it simply states that the object is not writable.

Here is an example:

% snmpset SNMP_agent ilomCtrlHttpEnabled.0 i 1
Error in packet.
Reason: notWritable (That object does not support modification)