chsnmpserver

Use the chsnmpserver command to modify the parameters of an existing SNMP server.

Syntax

This diagram is for SNMPv2.
Read syntax diagramSkip visual syntax diagram chsnmpserver -nameserver_name -ipip_address_or_domain_name-communitycommunity-erroronoff-warningonoff-infoonoff-portportsnmp_server_namesnmp_server_id
This diagram is for SNMPv3.
Read syntax diagramSkip visual syntax diagram chsnmpserver -nameserver_name -ipip_address_or_domain_name-communitycommunity-erroronoff-warningonoff-infoonoff-portport-engineidengine_id-securitynameusername-authprotocolprotocol-authpassphraseauth_password-privprotocolprotocol-privpassphrasepriv_password-noauth-noprivsnmp_server_namesnmp_server_id-nopriv-tlsonoff

Parameters

-name server_name
(Optional) Specifies a name to assign to the SNMP server. The name must be unique. When specifying a server name, snmp is a reserved word.
-ip ip_address_or_domain_name
(Optional) Specifies an IP address or domain name to assign to the SNMP server. The IP address must be a valid IPv4 or IPv6 address, or a fully qualified domain name. If you specify a domain name, a DNS server must be configured on your system. You can use the mkdnsserver command to configure DNS servers.
-community community
(Optional) Specifies the community name for the SNMP server.
-error on | off
(Optional) Specifies whether the server receives error notifications. Set to on, error notifications are sent to the SNMP server. Set to off, error notifications are not sent to the SNMP server.
-warning on | off
(Optional) Specifies whether the server receives warning notifications. Set to on, warning notifications are sent to the SNMP server. Set to off, warning notifications are not sent to the SNMP server.
-info on | off
(Optional) Specifies whether the server receives information notifications. Set to on, information notifications are sent to the SNMP server. Set to off, information notifications are not sent to the SNMP server.
-port port
(Optional) Specifies the remote port number for the SNMP server. This must be a value of 1 - 65535.
-engineid engine_id
(Optional) Specifies the engine ID that identifies the local system to the SNMPv3 server. This value has a maximum of 32 bytes, and must meet the requirements outlined in RFC 3411. You must specify -securityname with this parameter.
-securityname username
(Optional) Specifies the security name for the SNMPv3 server. This value has a max of 32 characters. You must specify -engineid with this parameter.
-authprotocol protocol
(Optional) Specifies the authentication protocol for the SNMPv3 server. Available values are sha1 or md5, sha224, sha256, sha384 or sha512. You must specify -authpassphrase with this parameter.
-authpassphrase auth_password
(Optional) Specifies the authentication password for the SNMPv3 server. This value must be in the range of 8 - 64 characters. You must specify -authprotocol with this parameter.
-privprotocol protocol
(Optional) Specifies the privacy protocol for the SNMPv3 server. Available values are aes128 or des, aes192, aes256. You must specify -privpassphrase with this parameter.
-privpassphrase priv_password
(Optional) Specifies the privacy password for the SNMPv3 server. This value must be in the range of 8 - 64 characters. You must specify -privprotocol with this parameter.
-tls on | off
(Optional) Specifies whether SNMP traps sent over a TLS connection. Values can be on or off. Default is set to off.
-noauth
(Optional) Removes all authentication and privacy settings from the SNMPv3 server. It is not possible to have privacy settings without authentication.
-nopriv
(Optional) Removes the privacy protocol and passphrase settings from the SNMPv3 server.
snmp_server_name | snmp_server_id
(Required) Specifies the name or ID of the server to be modified.

Description

Use this command to change the settings of an existing SNMP server. You must specify either the current name of the server or the ID returned at creation time. Use the lssnmpserver command to obtain this ID.

To switch from an SNMPv3 server to an SNMPv2 server, you must specify the -community parameter.

For syslog servers, SNMP servers, and email users with type set to local, the valid combinations of notification types are:
  • error, warning, and info
  • error and warning
Note: The port defaults to 10162 instead of 162 if tls is set to on and no other port is specified.

An invocation example to change the name of snmpserver 0

chsnmpserver -name newserver 0

The resulting output:

No feedback