246
SNMP
CP525 cMux User’s Manual Rev. 5.20.12 (3944)
ID: um_tsmux
9.6 Using net-snmp to access MIB information
Net-SNMP is a useful collection of free command line tools that can be downloaded from
. The WEB site provides installation packages for several operating
systems, including Windows.
The most important tools that can be utilized in scripts etc. is
snmpget
for get operations and
snmpset
for set operations.
The WEB site and the tools provides extensive usage information. We do however present some
examples in this chapter for convenience.
9.6.1 Reading a parameter with snmpget
The command line tool to read an SNMP parameter is
snmpget
. The following example shows
how the command is used to read system up time from a device:
snmpget -v 2c -c public <ip-address> sysUpTime.0
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (250792000) 29 days, 0:38:40.00
Note the following parameters used:
-v 2c
This indicates that the version to be used is 2c. This is important as the default value is 3,
which is currently not supported.
-c public
This is the community string (password) used for the request. It should match the config-
ured SNMP agent settings. The default value is “public”.
<
ip-address
>
This is the IP address for the device to read from.
sysUpTime.0
This is the OID for the parameter to read. Since we read a scalar value, we need to add
.0
to the OID from the MIB. Note that it is legal to use a numerical OID in this list; the
OID must match the parameter definition in the MIB file.
9.6.2 Writing a parameter with snmpset
The command line tool to set an SNMP parameter is
snmpset
. The following example shows
how the command is used to change the system name (
sysName
) for a device:
snmpset -v 2c -c private <ip-address> sysName.0 s "New name"
SNMPv2-MIB::sysName.0 = STRING: Siggens
Note the following parameters used:
-v 2c
This indicates that the version to be used is 2c. This is important as the default value is 3,
which is currently not supported.
Summary of Contents for CP525 cMux
Page 2: ......
Page 10: ......
Page 12: ...12 CP525 cMux User s Manual Rev 5 20 12 3944 ID um_tsmux ...
Page 18: ...18 CP525 cMux User s Manual Rev 5 20 12 3944 ID um_tsmux ...
Page 24: ...24 CP525 cMux User s Manual Rev 5 20 12 3944 ID um_tsmux ...
Page 66: ...66 CP525 cMux User s Manual Rev 5 20 12 3944 ID um_tsmux ...
Page 238: ...238 CP525 cMux User s Manual Rev 5 20 12 3944 ID um_tsmux ...
Page 248: ...248 CP525 cMux User s Manual Rev 5 20 12 3944 ID um_tsmux ...
Page 276: ...276 CP525 cMux User s Manual Rev 5 20 12 3944 ID um_tsmux ...