snmpset
Modify SNMP object values on agents
TLDR
Set an integer value using SNMPv2c
SYNOPSIS
snmpset [options] agent OID type value [OID type value...]
DESCRIPTION
snmpset communicates with a network entity using SNMP SET requests to modify management information on the device. Each variable to set requires three arguments: the OID, the data type, and the value.
The tool supports SNMPv1, SNMPv2c, and SNMPv3. Write access typically requires a different community string than read-only access, and many devices restrict which OIDs can be modified. SNMPv3 with authentication and encryption is recommended for security.
Common use cases include changing device configurations, enabling/disabling interfaces, modifying system contact or location information, and triggering actions on network equipment.
PARAMETERS
-v version
SNMP version: 1, 2c, or 3.-c community
Community string for SNMPv1/v2c authentication.-u username
SNMPv3 security name (username).-l level
SNMPv3 security level: noAuthNoPriv, authNoPriv, or authPriv.-a protocol
SNMPv3 authentication protocol: MD5 or SHA.-A passphrase
SNMPv3 authentication passphrase.-x protocol
SNMPv3 privacy protocol: DES or AES.-X passphrase
SNMPv3 privacy passphrase.-t timeout
Timeout in seconds before retransmitting.-r retries
Number of retries before giving up.
VALUE TYPES
i
Integeru
Unsigned integers
Stringx
Hexadecimal stringd
Decimal stringn
Nullo
Object identifiert
Timeticksa
IP addressb
Bits
CAVEATS
Modifying SNMP values can affect device operation and network stability. Ensure you have proper authorization and understand the impact before using snmpset. Write community strings should be kept confidential. Many OIDs are read-only and cannot be modified. Incorrect type specifications will cause the request to fail.
HISTORY
snmpset is part of the Net-SNMP project, an open-source suite of SNMP tools and libraries. Net-SNMP evolved from the CMU SNMP implementation and later UCD-SNMP. It provides comprehensive SNMP v1, v2c, and v3 support and is the standard SNMP toolkit on most Unix-like systems.
SEE ALSO
snmpget(1), snmpwalk(1), snmptranslate(1), snmpd(8)
