Commands For Simple Network Management Protocol Snmp

1.4 Commands for SNMP

1.4.1 debug snmp mib

Command: debug snmp mib
???????????????????no debug snmp mib
Function: Enable SNMP mib debugging. The no command disables the debugging.
Parameters: None.
Command mode: Admin Mode
Default: None.
Usage guide: When a user encounters an issue when applying SNMP, SNMP debugging can help locate the cause of the issue.
Example: Enable SNMP mib debugging.

active500EM#debug snmp mib

1.4.2 debug snmp kernel

Command: debug snmp kernel
???????????????????no debug snmp kernel
Function: Enable SNMP kernel debugging. The no command disables the debugging function.
Parameters: None.
Command mode: Admin Mode
Default: None.
Usage guide: When a user encounters an issue in applying SNMP, SNMP debugging of the kernel can help locate the cause of the issue.
Example: Enable SNMP kernel debugging.

active500EM#debug snmp kernel

1.4.3 rmon enable

Command: rmon enable
???????????????????no rmon enable
Function: Enable RMON. The no command disables RMON.
Parameters: None.
Command mode: Global Mode
Default: RMON is enabled.
Usage guide: Enable RMON.
Example: Enable RMON.

active500EM(config)#rmon enable

Disable RMON.

active500EM(config)#no rmon enable

1.4.4 show private-mib oid

Command: show private-mib oid
Function: Display the original OID of the private MIB.
Parameters: None.
Command mode: Admin and Configuration Mode
Default: None.
Usage guide: Check the beginning OID of the private MIB with this command.
Example: Show the original OID of the private MIB.

active500EM#show private-mib oid
Private MIB OID:1.3.6.1.4.1.6339

1.4.5 show snmp

Command: show snmp
Function: Display all SNMP counter information.
Parameters: None.
Command mode: Admin and Configuration Mode
Default: None.
Usage guide: Display all SNMP counter information.
Example: Display all SNMP counter information.

active500EM#show snmp
        0 SNMP packets input
        0 Bad SNMP version errors
        0 Unknown community name
        0 Illegal operation for community name supplied
        0 Encoding errors
        0 Number of requested variables
        0 Number of altered variables
        0 Get-request PDUs
        0 Get-next PDUs
        0 Set-request PDUs
        0 SNMP packets output
        0 Too big errors (Max packet size 1500)
        0 No such name errors
        0 Bad values errors
        0 General errors
        0 Get-response PDUs
        0 SNMP trap PDUs
Displayed Information Explanation
snmp packets input Total number of SNMP packet inputs.
bad snmp version errors Number of SNMP version error packets.
unknown community name Number of community name error packets.
illegal operation for community name supplied Number of permission community name error packets.
encoding errors Number of encoding error packets.
number of requested variable Number of variables requested by NMS.
number of altered variables Number of variables set by NMS.
get-request PDUs Number of packets received by ?get? requests.
get-next PDUs Number of packets received by ?getnext? requests.
set-request PDUs Number of packets received by ?set? requests.
snmp packets output Total number of SNMP packet outputs.
too big errors Number of ?Too big? error SNMP packets.
maximum packet size Maximum length of SNMP packets.
no such name errors Number of packets requesting non-existent MIB objects.
bad values errors Number of ?Bad-values? error SNMP packets.
general errors Number of ?General-errors? error SNMP packets.
response PDUs Number of response packets sent.
trap PDUs Number of Trap packets sent.

1.4.6 show snmp engineid

Command: show snmp engineid
Function: Display the engine ID commands.
Parameters: None.
Command mode: Admin and Configuration Mode
Default: None.
Usage guide: Display the engine ID commands.
Example: Display the engine ID commands.

active500EM#show snmp engineid
SNMP engineID:3138633303f1276c
Engine Boots is:1
Displayed Information Explanation
SNMP engineID Engine number
Engine Boots Engine boot counts

1.4.7 show snmp group

Command: show snmp group
Function: Display the group information commands.
Parameters: None.
Command mode: Admin and Configuration Mode
Default: None.
Usage guide: Displays the group information commands.
Example: Display the group information commands.

active500EM#show snmp group
Group Name:initial
Security Level:noAuthnoPriv
Read View:one
Write View:<no writeview specified>
Notify View:one
Displayed Information Explanation
Group Name Group name
Security level Security level
Read View Read view name
Write View Write view name
Notify View Notify view name
<no writeview specified> No view name specified by the user

1.4.8 show snmp mib

Command: show snmp mib
Function: Display all MIB supported by the switch.
Parameters: None.
Command mode: Admin and Configuration Mode
Default: None.
Usage guide: Display all MIB supported by the switch.
Example: Display all MIB supported by the switch.

active500EM#show snmp mib

1.4.9 show snmp status

Command: show snmp status
Function: Display SNMP configuration information.
Parameters: None.
Command mode: Admin and Configuration Mode
Default: None.
Usage guide: Display SNMP configuration information.
Example: Display SNMP configuration information.

active500EM#show snmp status
Trap enable
RMON enable
Community Information:
  V1/V2c Trap Host Information:
  V3 Trap Host Information:
  Security IP Information:
Displayed Information Explanation
Community string Community string.
Community access Community access permission.
Trap-rec-address IP address which is used to receive the Trap.
Trap enable Enable or disable to send the Trap.
SecurityIP IP address of the NMS which is allowed to access the Agent.

1.4.10 show snmp user

Command: show snmp user
Function: Display the user commands.
Parameters: None.
Command mode: Admin and Configuration Mode
Default: None.
Usage guide: Display the user commands.
Example: Display the user commands.

active500EM#show snmp user
  User name: initialsha
  Engine ID: 1234567890
  Auth Protocol:MD5 Priv Protocol:DES-CBC
  Row status:active
Displayed Information Explanation
User name User name
Engine ID Engine ID
Priv Protocol Employed encryption algorithm
Auth Protocol Employed identification algorithm
Row status User state

1.4.11 show snmp view

Command: show snmp view
Function: Display the view commands.
Parameters: None.
Command mode: Admin and Configuration Mode
Default: None.
Usage guide: Display the view commands.
Example: Display the view commands.

active500EM#show snmp view
View Name:readview        1.       Included    active
                          1.3.     Excluded    active
Displayed Information Explanation
View Name View name.
1.and1.3. OID number.
Included The view includes sub trees rooted by this OID
Excluded The view does not include sub trees rooted by this OID.
Active State.

1.4.12 snmp-server community

Command: snmp-server community {ro | rw} {0 | 7} <string> [access {<num-std>|<name>}] [ipv6-access {<ipv6-num-std>|<ipv6-name>}] [read <read-view-name>] [write <write-view-name>]
???????????????????no snmp-server community <string> [access {<num-std>|<name>}] [ipv6-access {<ipv6-num-std>|<ipv6-name>}] Function: Configure the community string for the switch. The no command deletes the configured community string.
Parameters:

  • <string>: configured community string. If the key option is set to 0, the specified community string is not encrypted. If the key option is set to 7, the specified community string is encrypted.
  • ro | rw: specified MIB access mode. Set to ro for read-only and rw for read-write.
  • <num-std>: access-class number for the standard numeric ACL. The valid range is between 1 and 99.
  • <name>: access-class name for the standard ACL. The valid character string length is from 1 to 32.
  • <ipv6-num-std>: access-class number for the standard numeric IPv6 ACL The valid range is between 500 and 599.
  • <name>: access-class name for the standard IPv6 ACL. The valid character string length is from 1 to 32.
  • <read-view-name>: name of the readable view. The valid character string length is from 1 to 32.
  • <write-view-name>: the name of writable view. The valid character string length is from 1 to 32.

Command mode: Global Mode
Default: None.
Usage guide: The active500EM supports up to four community strings. The switch can recognize the access-control for a specific community view by binding the community name in readable or writable view.
Example: Add a community string named ?private? with read-write permission.

active500EM(config)#snmp-server community rw 0 private

Add a community string named ?public? with read-only permission.

active500EM(config)#snmp-server community ro 0 public

Modify the read-write community string named ?private? to read-only.

active500EM(config)# snmp-server community ro 0 private

Delete the community string ?private?.

active500EM(config)#no snmp-server community 0 private

Bind the read-only community string ?public? to the readable view ?pviewr?.

active500EM(config)#snmp-server community ro 0 public read pviewr

Bind the read-write community string ?private? to the readable view ?pviewr? and the writable view ?pvieww?.

active500EM(config)#snmp-server community rw 0 private read pviewr write pvieww

1.4.13 snmp-server enable

Command: snmp-server enable
???????????????????no snmp-server enable
Function: Enable the SNMP proxy server function on the switch. The no command disables the SNMP proxy server function.
Parameters: None.
Command mode: Global Mode
Default: SNMP proxy server function is disabled.
Usage guide: To perform configuration management on the switch with network manage software, the SNMP proxy server function needs to be enabled via this command.
Example: Enable the SNMP proxy server function on the switch.

active500EM(config)#snmp-server enable

1.4.14 snmp-server enable traps

Command: snmp-server enable traps
???????????????????no snmp-server enable traps
Function: Enable the switch to send Trap messages. The no command disables the switch from sending Trap messages.
Parameters: None.
Command mode: Global Mode
Default: Do not allow Trap messages to be sent.
Usage guide: When Trap message is enabled and if there is a change in the Down/Up status in the device ports or the system, the active500EM will send Trap messages to the NMS that receives the Trap messages.
Example: Enable the switch to send Trap messages.

active500EM(config)#snmp-server enable traps

Disable the sending of Trap messages.

active500EM(config)#no snmp-server enable traps

1.4.15 snmp-server engineid

Command: snmp-server engineid <engine-string>
???????????????????no snmp-server engineid
Function: Configure the engine ID. The no command restores to the default engine ID.
Parameter:

  • <engine-string>: engine ID. Valid values are 1-32 digits in hex characters.

Command mode: Global Mode
Default: Default value is the company ID plus the local MAC address.
Usage guide: Configure the engine ID.
Example: Set the current engine ID to A66688999F.

active500EM(config)#snmp-server engineid A66688999F

Restore the default engine ID.

active500EM(config)#no snmp-server engineid

1.4.16 snmp-server group

Command: snmp-server group <group-string> {NoauthNopriv | AuthNopriv | AuthPriv} [ [read <read-string>] [write <write-string>] [notify <notify-string>] ] [access {<num-std>|<name>}] [ipv6-access {<ipv6-num-std>|<ipv6-name>}]
???????????????????no snmp-server group <group-string> {NoauthNopriv | AuthNopriv | AuthPriv} [access {<num-std>|<name>}] [ipv6-access {<ipv6-num-std>|<ipv6-name>}] Function: This command is used to configure a new group. The no command deletes this group.
Command mode: Global Mode
Parameters:

  • <group-string>: group name. Valid values are between 1 and 32 characters.
  • NoauthNopriv: applies the non-authorized and non-encrypting safety level.
  • AuthNopriv: applies the authorized but non encrypting safety level.
  • AuthPriv: applies the authorized and encrypting safety level.
  • read-string: name of the readable view. Valid values are between 1 and 32 characters.
  • write-string: name of the writable view. Valid values are between 1 and 32 characters.
  • notify-string: name of the trappable view. Valid values are between 1 and 32 characters.
  • <num-std>: access-class number for the standard numeric ACL. Valid values are between 1 and 99.
  • <name>: access-class name for the standard ACL. Valid values are between 1 and 32 characters.
  • <ipv6-num-std>: access-class number for the standard IPv6 ACL. Valid values are between 500 and 599.
  • <name>: access-class name for the standard IPv6 ACL. Valid values are between 1 and 32 characters.

Command mode: Global Mode
Default: None.
Usage guide: The default view is ?v1defaultviewname?. This view name should be used for the notification view name. If the read or write view name is empty, the operation will be disabled.
Example: Create a group CompanyGroup, with the safety level of authorized and encrypting, read viewname is readview, and writing is disabled.

active500EM(config)#snmp-server group CompanyGroup AuthPriv read readview

Delete the group.

active500EM(config)#no snmp-server group CompanyGroup AuthPriv

1.4.17 snmp-server host

Command: snmp-server host { <host-ipv4-address> | <host-ipv6-address> } {v1 | v2c | {v3 {NoauthNopriv | AuthNopriv | AuthPriv}}} <user-string>
???????????????????no snmp-server host { <host-ipv4-address> | <host-ipv6-address> } {v1 | v2c | {v3 {NoauthNopriv | AuthNopriv | AuthPriv}}} <user-string>
Function: For the v1/v2c versions, this command configures the IPv4 or IPv6 address and Trap community character string of the network management station receiving the SNMP Trap message. For the v3 version, this command is used to receive the network management station IPv4 or IPv6 address and the Trap user name and safety level. The no command cancels this IPv4 or IPv6 address.
Parameters:

  • <host-ipv4-addr>: IP address of the NMS management station which receives the Trap message.
  • <host-ipv6-addr>: IPv6 address of the NMS management station which receives the Trap message.
  • v1 | v2c | v3: version when sending the trap.
  • NoauthNopriv | AuthNopriv | AuthPriv: safety level for the v3 trap that is applied, which may be non-encrypted and non-authenticated.
  • <user-string>: community character string applied when sending the Trap message at v1/v2, and will be the user name at v3.

Command mode: Global Mode
Default: None.
Usage guide: The community character string configured in this command is the default community string of the RMON event group. If the RMON event group has no community character string configured, the community character string configured in this command will be applied when sending the RMON trap. If the community character string is configured, its configuration will be applied when sending the RMON trap. This command allows the configuration of the IPv4 or IPv6 addresses of the SNMP management station that receives trap messages simultaneously.
Example: Configure an IP address to receive the trap.

active500EM(config)#snmp-server host 1.1.1.5 v1 usertrap

Delete an IPv6 address that receives the trap.

active500EM(config)#no snmp-server host 2001::1 v1 usertrap

1.4.18 snmp-server securityip

Command: snmp-server securityip {<ipv4-address> | <ipv6-address>}
???????????????????no snmp-server securityip {<ipv4-address> | <ipv6-address>}
Function: Configure security IPv4 or IPv6 addresses allowed to access the NMS management station. The no command deletes security IPv4 or IPv6 addresses that are configured.
Parameters:

  • <ipv4-address>: NMS security IPv4 address. The valid format is dotted decimal notation.
  • <ipv6-address>: NMS security IPv6 address. The valid format is colon hexadecimal.

Command mode: Global Mode
Default: None.
Usage guide: The consistency between the NMS administration station IPv4 or IPv6 address and the security IPv4 or IPv6 address is configured by this command. The command sends a SNMP packet to be processed by the switch. The command only applies to SNMP. It allows configuration of the IPv4 or IPv6 addresses of the network management station receiving the SNMP Trap message.
Example: Configure the security of the NMS management IP address.

active500EM(config)#snmp-server securityip 1.1.1.5

Delete the security on the IPv6 address.

active500EM(config)#no snmp-server securityip 2001::1

1.4.19 snmp-server securityip

Command: snmp-server securityip {enable | disable}
Function: Enable/disable security IP address authentication on the NMS management station.
Parameters: None.
Command mode: Global Mode
Default: Enable the security IP address authentication function.
Usage guide: Enable/disable the security IP address authentication on the
NMS management station.
Example: Disable the security IP address authentication function.

active500EM(config)#snmp-server securityip disable

1.4.20 snmp-server trap-source

Command: snmp-server trap-source {<ipv4-address> | <ipv6-address>}
???????????????????no snmp-server trap-source {<ipv4-address> | <ipv6-address>}
Function: Set the source IPv4 or IPv6 address which is used to send the trap packet. The no command deletes the configuration.
Parameters:

  • <ipv4-address>: IPv4 address used to send the trap packet. Valid format is dotted decimal notation
  • <ipv6-address>: IPv6 address used to send the trap packet. Valid foramt is colon hexadecimal.

Command mode: Global Mode
Default: None.
Usage guide: If there is no configuration, select the source address according to the interface address sent by the actual trap packet. When the IP address is configured, the configured source address becomes the source address of the trapped packet.
Example: Set the IP address which is used to send the trapped packet.

active500EM(config)#snmp-server trap-source 1.1.1.5

Delete the configured source address which is used to send the IPv6 trap packet.

active500EM(config)#no snmp-server trap-source 2001::1

1.4.21 snmp-server user

Command: snmp-server user <use-string> <group-string> [{authPriv | authNoPriv} auth {md5 | sha} <word>] [access {<num-std>|<name>}] [ipv6-access {<ipv6-num-std>|<ipv6-name>}]
???????????????????no snmp-server user <user-string> [access {<num-std>|<name>}] [ipv6-access {<ipv6-num-std>|<ipv6-name>}] Function: Add a new user to an SNMP group. The no command deletes this user.
Parameters:

  • <user-string>: username. Valid values are between 1 and 32 characters.
  • <group-string>: name of the group the user belongs to. Valid values are between 1 and 32 characters.
  • authPriv: use DES for packet encryption.
  • authNoPriv: do not use DES for packet encryption.
  • auth: perform packet authentication.
  • md5: packet authentication using HMAC MD5 algorithm.
  • sha: packet authentication using HMAC SHA algorithm.
  • <word >: user password. Valid values are between 8 and 32 characters.
  • <num-std>: access-class number for standard numeric ACL. Valid values are between 1 and 99.
  • <name>: access-class name for the standard ACL. Valid values for the character string length are between 1 and 32.
  • <ipv6-num-std>: access-class number for the standard numeric IPv6 ACL. Valid values are between 500 and 599.
  • <name>: access-class name for the standard IPv6 ACL. Valid values for the character string length are between 1 and 32.

Command mode: Global Mode
Default: None.
Usage guide: If encryption and authentication are not selected, the default settings will be no encryption and no authentication. If encryption is selected, authentication is also required. When deleting a user, if the correct username and incorrect group name are entered, the user can still be deleted.
Example: Add a new user tester in the UserGroup with an encryption safety level and HMAC md5 for authentication. Set the password to hellohello.

active500EM(config)#snmp-server user tester UserGroup authPriv auth md5 hellohello.

Delete the user ?tester'.

active500EM(config)#no snmp-server user tester

1.4.22 snmp-server view

Command: snmp-server view <view-string> <oid-string> {include | exclude} no snmp-server view <view-string> [ <oid-string> ] Function: This command is used to create or renew view information. The no command deletes the view information.
Parameters:

  • <view-string>: view name. Valid values are between 1 and 32 characters.
  • <oid-string>: OID number or corresponding node name. Valid values are between 1 and 255 characters.
  • include | exclude: include/exclude this OID.

Command mode: Global Mode
Default: None.
Usage guide: This command supports using the character string for the variable OID as a parameter and also supports using the node name of the parameter.
Example: Create a view. The name is readview, including iso node but not including the iso.3 node.

active500EM(config)#snmp-server view readview iso include
active500EM(config)#snmp-server view readview iso.3 exclude

Delete the view.

active500EM(config)#no snmp-server view readview


Return to Controller Wired CLI Table of Contents