communicate with a network entity using SNMP SET requests
snmpset [-p port] [-r retry] [-t timeout] -v 1 host community variable_name type value [variable_name type value] snmpset [-p port] [-r retry] [-t timeout] [-v 2] host noAuth variable_name type value [variable_name type value] snmpset [-p port] [-r retry] [-t timeout] [-v 2] host scrparty dstparty context variable_name type value [variable_name type value]
The snmpset utility uses the SET request to set information about a network entity. You can specify one or more fully qualified object identifiers in the format specified in the file mib.txt.
If you're using SNMP version 2, the following files must be configured:
For a description on how to configure the files please see the ``Administrative model'' section in the SNMPv2 chapter, and the file page for each of the configuration files listed above. If you wish to change the location of your configuration files, you must include a snmpd.conf file.
Set the variable sysContact.0 to ``John Doe'':
snmpset -v 1 netdev-kbox.cc.cmu.edu public system.sysContact.0 s "John Doe"
snmpset netdev-kbox.cc.cmu.edu manager_party agent_party agent_context system.sysContact.0 s "John Doe"
The output is similar to:
system.sysContact.0 = "John Doe"
This ID:
system.syscontact.0
will be printed as:
syscontact.0
This ID:
udp.udpTable.udpEntry.udpLocalAddress.0.0.0.161
will be printed as:
udpLocalAddress.0.0.0.161
If the network entity has an error processing the request packet, an error packet is returned and snmpset displays a message to help pinpoint how the request was malformed.
snmpd,
snmpget,
snmpgetnext,
snmpnetstat,
snmpstatus,
snmptest,
snmptrap,
snmptrapd,
snmpwalk
/etc/acl.conf file,
/etc/context.conf file,
/etc/mib.txt file,
/etc/party.conf file,
/etc/snmpd.conf file,
/etc/view.conf file
RFC 1065, RFC 1066, RFC 1067, ISO 8824 (ASN.1)
RFC 1441, RFC 1445, RFC 1446
RFC 1448, RFC 1449
Marshall T. Rose, The Simple Book: An Introduction to
Internet Management, Revised 2nd ed. (Prentice-Hall,
1996, ISBN 0-13-451659-1)