Skip to content

SNMP

Command Objective: This command enables/disables trap generation on the interface.

The interface generated linkUp or linkDown trap. The linkUp trap denotes that the communication link is available and ready for traffic flow. The linkDown trap denotes that the communication link failed and is not ready for traffic flow.

Syntax:

  • snmp trap link-status
  • no snmp trap link-status

Mode: Interface Configuration Mode.

enable snmpagent

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

Syntax: enable snmpagent

Mode: Global Configuration Mode.

disable snmpagent

Command Objective: This command disables SNMP agent.

Syntax: disable snmpagent

Mode: Global Configuration Mode.

snmp community

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

The no form of the command disables the snmp agent.

Syntax:

  • snmp community name <CommunityName> security <SecurityName> [context <name>] [{volatile | nonvolatile}] [transporttag <TransportTagIdentifier | none>]
  • 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.
  • context: Configures the name of the SNMP context.
  • volatile | nonvolatile: Sets the required storage type for the entry.

    • volatile: Sets the storage type as temporary. Erases the configuration setting on restarting the system.
    • nonvolatile: Sets the storage type as permanent. Saves the configuration to the system. The saved configuration is viewed on restarting the system.
  • <TransportTagIdentifier>: Specifies a set of transport endpoints from which a command responder application can accept management request.

Mode: Global 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} [{volatile | nonvolatile}]
  • 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.
  • volatile | nonvolatile: Sets the required storage type for the group entry.

    • volatile: Sets the storage type as temporary. Erases the configuration setting on restarting the system.
    • nonvolatile: Sets the storage type as permanent. Saves the configuration to the system. The saved configuration is viewed on restarting the system.

Mode: Global 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>] [{volatile | nonvolatile}] [context <string(32)>]
  • 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.
  • volatile | nonvolatile: Sets the required storage type for the group entry.

    • volatile: Sets the storage type as temporary. Erases the configuration setting on restarting the system.
    • nonvolatile: Sets the storage type as permanent. Saves the configuration to the system. The saved configuration is viewed on restarting the system.
  • context<string(32)>: Configures the name of the SNMP context. The maximum length of the string is 32.

Mode: Global 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

Mode: Global 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} [{volatile | nonvolatile}]
  • 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.
  • volatile: Sets the storage type as temporary. Erases the configuration setting on restarting the system.
  • nonvolatile: Sets the storage type as permanent. Saves the configuration to the system. The saved configuration can be viewed on restarting the system.

Mode: Global 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(1-20)>] [{volatile | nonvolatile}] [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.
  • volatile: Sets the storage type as temporary. Erases the configuration setting on restarting the system.
  • nonvolatile: Sets the storage type as permanent. Saves the configuration to the system. The saved configuration can be viewed on restarting the system.
  • 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.

Mode: Global 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} [{volatile | nonvolatile}]
  • 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.
  • volatile: Sets the storage type as temporary. Erases the configuration setting on restarting the system.

  • nonvolatile: Sets the storage type as permanent. Saves the configuration to the system. The saved configuration can be viewed on restarting the system.

Mode: Global 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}]] [{volatile | nonvolatile}]
  • 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.
  • volatile: Sets the storage type as temporary. Erases the configuration setting on restarting the system.

  • nonvolatile: Sets the storage type as permanent. Saves the configuration to the system. The saved configuration can be viewed on restarting the system.

Mode: Global 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} }[{volatile | nonvolatile}]
  • 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-waymessage 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.
  • volatile: Sets the storage type as temporary. Erases the configuration setting on restarting the system.

  • nonvolatile: Sets the storage type as permanent. Saves the configuration to the system. The saved configuration can be viewed on restarting the system.

Mode: Global Configuration Mode.

snmp-server enable traps snmp authentication

Command Objective: This command enables generation of authentication traps from the snmp agent (for all snmpv1, snmpv2 and snmpv3).

The no form of the command disables generation of authentication traps.

Syntax:

  • snmp-server enable traps snmp authentication
  • no snmp-server enable traps snmp authentication

Mode: Global Configuration Mode.

snmp-server trap udp-port

Command Objective: This command configures the udp port over which agent sends the trap.

The no form of the command configures the snmp agent to sent trap on default udp port.

Syntax:

  • snmp-server trap udp-port <port>
  • no snmp-server trap udp-port

Mode: Global Configuration Mode.

snmp-server trap proxy-udp-port

Command Objective: This command configures the udp port over which agent sends the trap to the proxy entity.

The no form of the command configures the snmp agent to sent trap on default udp port.

Syntax:

  • snmp-server trap proxy-udp-port <port>
  • no snmp-server trap proxy-udp-port

Mode: Global Configuration Mode.

snmp agent port

Command Objective: This command configures the agent port on which agent listens. The port number value ranges between 1 and 65535.

Syntax: snmp agent port <port>

Mode: Global Configuration Mode.

snmp tcp enable

Command Objective: This command enables sending snmp messages over tcp.

The no form of the command disables sending snmp messages over tcp.

Syntax:

  • snmp tcp enable
  • no snmp tcp enable

Mode: Global Configuration Mode.

snmp trap tcp enable

Command Objective: This command enables sending snmp trap messages over tcp.

The no form of the command disables sending snmp trap messages over tcp.

Syntax:

  • snmp trap tcp enable
  • no snmp trap tcp enable

Mode: Global Configuration Mode.

snmp-server tcp-port

Command Objective: This command configures the tcp port over which agent sends the snmp message. This value ranges between 1 and 65535.

The no form of the command configures the snmp agent to sent snmp message on default tcp port.

Syntax:

  • snmp-server tcp-port <port>
  • no snmp-server tcp-port

Mode: Global Configuration Mode.

snmp-server trap tcp-port

Command Objective: This command configures the tcp port over which agent sends the trap. This value ranges between 1 and 65535.

The no form of the command configures the snmp agent to sent trap on default tcp port.

Syntax:

  • snmp-server trap tcp-port <port>
  • no snmp-server trap tcp-port

Mode: Global Configuration Mode

snmp-server enable traps

Command Objective: This command enables generation of a particular trap.

The no form of the command disables generation of a particular trap.

Syntax:

  • snmp-server enable traps {[firewall-limit] [linkup] [linkdown] [[sip-states] [sip-cfg-change] [coldstart] [poe-power] [dhcp-pool-limit] [dsx1-line] [auth-trap]}
  • no snmp-server enable traps {[firewall-limit] [linkup] [linkdown] [sip-states] [sip-cfg-change] [coldstart] [poe-power] [dhcp-pool-limit] [dsx1-line] [auth-trap]}

Parameter Description:

  • firewall-limit: Generates a trap for all the firewall attack summary.
  • linkup: Generates a trap whenever there is a linkup.
  • linkdown: Generates a trap whenever there is a linkdown.
  • sip-states: Generates a trap for all the SIP states.
  • sip-cfg-change: Generates a trap for all the SIP configuration.
  • coldstart: Generates a trap for all the Coldstart.
  • poe-power: Generates a trap whenever there is Power on Ethernet.
  • dhcp-pool-limit: Generates a trap for all the DHCP server pool limit trap.
  • dsx1-line: Generates a trap for all the DSX1 line trap.
  • auth-trap: Generates a trap for authentication failure trap.

Mode: Global Configuration Mode.

snmpwalk mib

Command Objective: This command displays all the mib objects of the given table.

Syntax: snmpwalk mib {name | oid} <value> [count <integer(1-100)>] [short]

Parameter Description:

  • name <value>: Gets the next mib object name for the given mib object name. This is a string value with maximum size as 32.
  • oid <value>: Gets the next mib object identifier for the given mib object identifier.
  • count <integer(1-100)>: Sets the number of entries to be displayed in the mib object. This value ranges between 1 and 100.
  • short: Displays the value of the mib object.

Mode: Global Configuration Mode.

show snmp

Command Objective: This command displays the status information of SNMP communications.

Syntax: show snmp

Mode: Privileged EXEC Mode.

show snmp community

Command Objective: This command displays the configured SNMP community details.

Syntax: show snmp community

mode: Privileged EXEC Mode.

show snmp group

Command Objective: This command displays the configured SNMP groups.

Syntax: show snmp group

Mode: Privileged EXEC Mode.

show snmp group access

Command Objective: This command displays the configured SNMP group access details.

Syntax: show snmp group access

Mode: Privileged EXEC Mode.

show snmp engineid

Command Objective: This command displays the Engine Identifier.

Syntax: show snmp engineid

Mode: Privileged EXEC Mode.

show snmp viewtree

Command Objective: This command displays the configured SNMP Tree views.

Syntax: show snmp viewtree

Mode: Privileged EXEC Mode.

show snmp targetaddr

Command Objective: This command displays the configured SNMP target Addresses.

Syntax: show snmp targetaddr

Mode: Privileged EXEC Mode.

show snmp targetparam

Command Objective: This command displays the configured SNMP Target Address Params.

Syntax: show snmp targetparam

Mode: Privileged EXEC Mode.

show snmp user

Command Objective: This command displays the configured SNMP users.

Syntax: show snmp user

Mode: Privileged EXEC Mode.

show snmp notif

Command Objective: This command displays the configured SNMP Notification types.

Syntax: show snmp notif

Mode: Privileged EXEC Mode.

show snmp inform statistics

Command Objective: This command displays the inform message statistics.

Syntax: show snmp inform statistics

Mode: Privileged EXEC Mode.

show snmp-server traps

Command Objective: This command displays the set of traps that are currently enabled.

Syntax: show snmp-server traps

Mode: Privileged EXEC Mode.

show snmp-server proxy-udp-port

Command Objective: This command displays the proxy udp port.

Syntax: show snmp-server proxy-udp-port

Mode: Privileged EXEC Mode.

show snmp tcp

Command Objective: This command displays the configuration for snmp over tcp.

Syntax: show snmp tcp

Mode: Privileged EXEC Mode.

show mib name

Command Objective: This command displays the name of the corresponding mib object identifier.

Syntax: show mib name <Object OID. eg 1.3.6.1.6>

Mode: Privileged EXEC Mode.