Switch CLI Reference Guide

Simple Network Management Protocol (SNMP) Commands

enable snmpagent
Command Objective

This command enables SNMP agent which provides an interface between a SNMP manager and the Switch. The agent processes SNMP packets received from the manager, frames the appropriate response packets and sends them to the manager.

Syntax

enable snmpagent

ModeGlobal Configuration Mode
disable snmpagent
Command Objective

This command disables SNMP agent.

Syntax

disable snmpagent

ModeGlobal Configuration Mode
snmp community
Command Objective

This command enables SNMP agent which provides an interface between a SNMP manager and the Switch. The agent processes SNMP packets received from the manager, frames the appropriate response packets and sends them to the manager.

Syntax

snmp community name <CommunityName> security

<SecurityName> [transporttag <TransportTagIdentifier | none>] [context <name>]

no snmp community name < CommunityName >

Parameter Description
  • name<CommunityName> - Creates a community name which stores the community string.

  • security<SecurityName> - Stores the security model of the corresponding Snmp community name. string specified by the corresponding instance of snmp community name

  • <TransportTagIdentifier> - Specifies a set of transport endpoints from which a command responder application can accept management request.

  • [context <name>] - Indicates the location of the context through which the management information is accessed when using the community string specified by the corresponding instance of snmp community name

ModeGlobal Configuration Mode
snmp group
Command Objective

This command configures SNMP group details.

The no form of the command removes the SNMP group details.

Syntax

snmp group <GroupName> user <UserName> security-model {v1| v2c | v3 }

no snmp group <GroupName> user <UserName> security-model{v1 | v2c | v3 }

Parameter Description
  • <GroupName> - Creates a name for an SNMP group

  • user<UserName> - Sets an user for the configured group.

  • security-model - Sets the security model for SNMP

    • v1 - Sets the SNMP version as Version 1.

    • v2c - Sets the SNMP version as Version 2.

    • v3 - Sets the SNMP version as Version 3.

ModeGlobal Configuration Mode
snmp access
Command Objective

This command configures the SNMP group access details. To configure an SNMP access along with the group, a group must have already been created using the snmp group command.

The no form of the command removes the SNMP group access details.

Syntax

snmp access <GroupName> {v1 | v2c | v3 {auth | noauth | priv}} [read <ReadView | none>] [write <WriteView | none>] [notify <NotifyView | none>]

no snmp access <GroupName> {v1 | v2c | v3 {auth | noauth | priv}}

Parameter Description
  • <GroupName> - Sets the name of the group for which access is to be provided.

  • v1 | v2c | v3 - Sets the SNMP verison.

    • v1 - Sets the SNMP version as Version 1.

    • v2c - Sets the SNMP version as Version 2.

    • v3 - Sets the SNMP version as Version 3. It is the most secure model as it allows packet encryption with the priv key word

      • auth - Enables Message digest (MD5) or Secure Hash Algorithm (SHA) packet authentication.

      • noauth - Sets no-authentication

      • priv - Sets both authentication and privacy

  • read - Mentions the MIB view of the SNMP context to which read access is authorized by this entry

  • write - Mentions the MIB view of the SNMP context to which write access is authorized by this entry

  • notify - Mentions the MIB view of the SNMP context to which notification access is authorized by this entry

ModeGlobal Configuration Mode
snmp engineid
Command Objective

This command configures the engine ID that is utilized as a unique identifier of a SNMPv3 engine. This engine ID is used to identify a source SNMPv3 entity and a destination SNMPv3 entity to coordinate the exchange of messages between the source and the destination.

The no form of the command resets the engine ID to the default value.

Syntax

snmp engineid <EngineIdentifier>

no snmp engineid

ModeGlobal Configuration Mode
snmp view
Command Objective

This command configures the SNMP view.

The no form of the command removes the SNMP view.

Syntax

snmp view <ViewName> <OIDTree> [mask <OIDMask>] {included| excluded}

no snmp view <ViewName> <OIDTree>

Parameter Description
  • <ViewName> - Specifies the view name for which the view details are to be configured. This is a string value with maximum size as 32.

  • <OIDTree> - Specifies the sub tree value for the particular view.

  • mask <OIDMask> - Specifies a mask value for the particular view.

  • included - Allows access to the subtree

  • excluded - Denies access to the subtree

ModeGlobal Configuration Mode
snmp targetaddr
Command Objective

This command configures the SNMP target address.

The no form of the command removes the configured SNMP target address.

Syntax

snmp targetaddr <TargetAddressName> param <ParamName>

{<IPAddress> | <IP6Address>} [timeout <Seconds(1-1500)] [retries <RetryCount(1-3)] [taglist <TagIdentifier | none>] [port <integer (1-65535)>]

no snmp targetaddr <TargetAddressName>

Parameter Description
  • <TargetAddressName> - Configures a unique identifier of the Target.

  • param<ParamName> - Configures the parameters when generating messages to be sent to transport address.

  • IPAddress - Configures a IP target address to which the generated SNMP notifications are sent.

  • IP6Address - Configures a IP6 target address to which the generated SNMP notifications are sent.

  • timeout<Seconds(1-1500)> - Sets the time in which the SNMP agent waits for a response from the SNMP Manager before retransmitting the Inform Request Message. The value ranges between 1 and 1500 seconds.

  • retries<RetryCount(1-3)> - Sets the maximum number of times the agent can retransmit the Inform Request Message. This value ranges between 1 and 3.

  • taglist<TagIdentifier | none> - Sets the tag identifier that selects the target address for the SNMP. The taglist can also be set as none using the none option.

  • port <integer (1-65535)> - Configures a port number through which the generated SNMP notifications are sent to the target address. The value ranges between 1 and 65535.

ModeGlobal Configuration Mode
snmp targetparams
Command Objective

This command configures the SNMP target parameters.

The no form of the command removes the SNMP target parameters.

Syntax

snmp targetparams <ParamName> user <UserName> security- model {v1 | v2c | v3 {auth | noauth | priv}} message-processing {v1 | v2c | v3}

no snmp targetparams <ParamName>

Parameter Description
  • <ParamName> - Sets a unique identifier of the parameter.

  • User <UserName> - Sets an user for which the target parameter is to be done.

  • security-model - Sets the security model

    • v1 - Sets the SNMP version as Version 1.

    • v2c - Sets the SNMP version as Version 2.

    • v3 - Sets the SNMP version as Version 3. It is the most secure model as it allows packet encryption with the priv key word

      • auth - Enables Message digest (MD5) or Secure Hash Algorithm (SHA) packet authentication

      • noauth - Sets no-authentication

      • priv - Specifies both authentication and privacy

  • message-processing - Sets the message processing model

    • v1 - Sets the SNMP version as Version 1.

    • v2c - Sets the SNMP version as Version 2.

    • v3 - Sets the SNMP version as Version 3. It is the most secure model as it allows packet encryption with the priv key word

ModeGlobal Configuration Mode
snmp user
Command Objective

This command configures the SNMP user details.

The no form of the command removes the SNMP user details.

Syntax

snmp user <UserName> [auth {md5 | sha} <passwd> [priv {{{DES| AES_CFB128} <passwd> } | None}]]

no snmp user <UserName>

Parameter Description
  • <UserName> - Configures an user name which is the User- based Security Model dependent security ID.

  • auth - Sets an authentication Algorithm . Options are:

    • md5 - Sets the Message Digest 5 based authentication.

    • sha - Sets the Security Hash Algorithm based authentication.

  • <Passwd> - Sets the authentication password that will be used for the configured authentication algorithm.

  • priv - Sets the DES encryption and also the password to be used for the encryption key. Options are:

    • DES - Configures the data encryption standard algorithm related configuration.

    • AES_CFB128 - Configures Advanced Encryption Standard (AES) algorithm for encryption.

    • <Passwd> - Sets the authentication password that will be used for the configured authentication algorithm.

    • None - Sets no encryption configurations.

ModeGlobal Configuration Mode
snmp notify
Command Objective

This command configures the SNMP notification details.

The no form of this command removes the SNMP notification details.

Syntax

snmp notify <NotifyName> tag <TagName> type {Trap | Inform}

no snmp notify <NotifyName>

Parameter Description
  • <NotifyName> - Configures an unique identifier associated with the entry.

  • tag<TagName> - Sets a notification tag, which selects the entries in the Target Address Table.

  • type - Sets the notification type. The list contains:

    • Trap - Allows routers to send traps to SNMP managers. Trap is a one-way message from a network element such as a router, switch or server; to the network management system.

    • Inform - Allows routers / switches to send inform requests to SNMP managers

ModeGlobal Configuration Mode
system name
Command Objective

This command sets the system name.

Syntax

system name <system name>

ModeGlobal Configuration Mode
system location
Command Objective

This command sets the location name.

Syntax

system location <location name>

ModeGlobal Configuration Mode
system contact
Command Objective

This command sets the contact information.

Syntax

system contact <contact info>

ModeGlobal Configuration Mode
show snmp
Command Objective

This command displays the status information of SNMP communications.

Syntax

show snmp

ModePrivileged EXEC Mode
show snmp community
Command Objective

This command displays the configured SNMP community details.

Syntax

show snmp community

ModePrivileged EXEC Mode
show snmp group
Command Objective

This command displays the configured SNMP groups.

Syntax

show snmp group

ModePrivileged EXEC Mode
show snmp group access
Command Objective

This command displays the configured SNMP group access details.

Syntax

show snmp group access

ModePrivileged EXEC Mode
show snmp engineid
Command Objective

This command displays the Engine Identifier.

Syntax

show snmp engineID

ModePrivileged EXEC Mode
show snmp viewtree
Command Objective

This command displays the configured SNMP Tree views.

Syntax

show snmp viewtree

ModePrivileged EXEC Mode
show snmp targetaddr
Command Objective

This command displays the configured SNMP target Addresses.

Syntax

show snmp targetaddr

ModePrivileged EXEC Mode
show snmp targetparam
Command Objective

This command displays the configured SNMP Target Address Parameters

Syntax

show snmp targetparm

ModePrivileged EXEC Mode
show snmp user
Command Objective

This command displays the configured SNMP users.

Syntax

show snmp user

ModePrivileged EXEC Mode
show snmp notif
Command Objective

This command displays the configured SNMP Notification types.

Syntax

show snmp notif

ModePrivileged EXEC Mode

Was This Article Helpful?

Help us to improve our support portal

Techdocs Article Helpful form

Techdocs Article NOT Helpful form

  • Still can't find what you're looking for? Try our knowledge base or ask our community for more help.