Modifying SNMP variables
The
setany(ADMN)
command is used to modify the values of variables. Its basic syntax is:
setany node community variable type value
The legal values for the type argument are given in Table 8-1, ``setany type values'', along with their corresponding object types. For a complete explanation of these types, refer to RFC 1155.
Table 8-1 setany type values
--------------------------------------------------------------------- Object type setany type arguments --------------------------------------------------------------------- Integer -i Octet string -o Object identifier -d IP address -a Counter -c Gauge -g Time_ticks -t Display string -s Null -nThe following shows an example of using setany to alter the status of an interface. The status is checked before and after the change to verify that the change took place correctly. Changing the status from 1 to 2 marks the interface as ``down'':
Example 8-12 Altering interface status
# getone paris public ifAdminStatus.2Name: ifAdminStatus.2 Value: 1
# setany paris public ifAdminStatus.2 -i 2
Name: ifAdminStatus.2 Value: 2
# getone paris public ifAdminStatus.2
Name: ifAdminStatus.2 Value: 2
See also: