26-SNMP-RMON Commands

Download


Chapter 1  SNMP Configuration Commands

 

&  Note:

l      The configuration of creating a MIB view with the mask of a MIB subtree is added. See section snmp-agent mib-view for details.

l      The configuration of encrypting a plain-text password is added. See section snmp-agent calculate-password.

l      The configuration of adding “interface description” and “interface type” into a linkUp/linkDown trap is added. See section 1.1.21  snmp-agent trap ifmib.

 

1.1  SNMP Configuration Commands

1.1.1  display snmp-agent

Syntax

display snmp-agent { local-engineid | remote-engineid }

View

Any view

Parameters

local-engineid: Displays the local SNMP entity engine ID.

remote-engineid: Displays all the remote SNMP entity engine IDs. At present, the device does not support application of the keyword.

Description

Use the display snmp-agent command to display the local SNMP entity engine ID or all the remote SNMP entity engine IDs.

Each device managed by the NMS needs a unique engine ID to identify an SNMP agent. By default, each device has a default engine ID. You should ensure that each engine ID is unique within an SNMP domain.

The creation of username and generation of cipher text password are related to engine ID in SNMPv3. If you change an engine ID, the username and password configured on the agent with this engine ID become invalid.

You can use the snmp-agent local-engineid command to configure an engine ID for the device.

Examples

# Display the local SNMP entity engine ID.

<Sysname> display snmp-agent local-engineid

   SNMP local EngineID: 800007DB000FE20F12346877

SNMP local EngineID in the above information represents the local SNMP entity engine ID.

1.1.2  display snmp-agent community

Syntax

display snmp-agent community [ read | write ]

View

Any view

Parameters

read: Displays the information about the SNMP communities with read-only permission.

write: Displays the information about the SNMP communities with read-write permission.

Description

Use the display snmp-agent community command to display the information about the SNMPv1/SNMPv2c communities with the specific access permission.

SNMPv1 and SNMPv2c use community name authentication. Therefore, the SNMPv1 and SNMPv2c messages carry community names; if the carried community names are not permitted by the NMS/agent, the messages will be discarded.

You need to create a read community name and a write community name separately, and these two kinds of community names on the NMS and on the device should be consistent.

If you execute the command when the SNMP agent is not started, the device prompts “SNMP Agent disabled”.

To display the current configuration username information of SNMPv3, use the display snmp-agent usm-user command.

Examples

# Display the information about all the existing SNMPv1/SNMPv2c communities.

<Sysname> display snmp-agent community

   Community name:public

       Group name:public

       Storage-type: nonVolatile

 

   Community name:private

       Group name:private

       Storage-type: nonVolatile

Table 1-1 display snmp-agent community command output description

Field

Description

Community name

Community name

SNMPv1 and SNMPv2c use community name authentication. A community name functions like a password; it is used to restrict access between the NMS and the agent.

Group name

Group name

If you use the snmp-agent community command to configure a community name for SNMPv1 or SNMPv2c, the group name is the community name.

If you use the snmp-agent usm-user { v1 | v2c } command to configure a username, the group name is the group to which the user belongs, and the corresponding community name has the attribute of the group.

Storage-type

Storage type, which can be:

l      volatile: Information will be lost if the system is rebooted

l      nonVolatile: Information will not be lost if the system is rebooted

l      permanent: Modification is permitted, but deletion is forbidden

l      readOnly: Read only, that is, no modification, no deletion

l      other: Other storage types

 

1.1.3  display snmp-agent group

Syntax

display snmp-agent group [ group-name ]

View

Any view

Parameters

group-name: Name of the desired SNMP group, a string of 1 to 32 characters.

Description

Use the display snmp-agent group command to display the information about an SNMP group, including group name, security mode, related views, and storage mode.

A group is used to define security mode and related views. Users in the same group have the common attributes.

Security mode falls into three types: authPriv (authentication with privacy), authNoPriv (authentication without privacy), noAuthNoPriv (no authentication no privacy).

Related views include: read MIB view, write MIB view, and MIB view in which traps can be sent.

For the configuration of an SNMP group, refer to the snmp-agent group command.

Examples

# Display the information about all the SNMP groups.

<Sysname> display snmp-agent group

   Group name: v3group

       Security model: v3 noAuthnoPriv

       Readview: ViewDefault

       Writeview: ViewDefault

       Notifyview : ViewDefault

       Storage-type: nonVolatile

Table 1-2 display snmp-agent group command output description

Field

Description

Group name

SNMP group name of the user

Security model

SNMP group security mode, which can be AuthPriv (authentication with privacy), AuthnoPriv (authentication without privacy), and noAuthnoPriv (no authentication no privacy).

Readview

Read-only MIB view corresponding to the SNMP group

Writeview

Writable MIB view corresponding to the SNMP group

Notifyview

Notify MIB view in which traps can be sent. It corresponds to the SNMP group

storage-type

Storage type, which can be:

l      volatile: Information will be lost if the system is rebooted

l      nonVolatile: Information will not be lost if the system is rebooted

l      permanent: Modification is permitted, but deletion is forbidden

l      readOnly: Read only, that is, no modification, no deletion

l      other: Other storage types

 

1.1.4  display snmp-agent mib-view

Syntax

display snmp-agent mib-view [ exclude | include | viewname view-name ]

View

Any view

Parameters

exclude: Specifies the SNMP MIB views that are of the excluded type.

Include: Specifies the SNMP MIB views that are of the included type.

view-name: Name of an SNMP MIB view to be displayed.

Description

Use the display snmp-agent mib-view command to display the MIB view configuration of the current Ethernet switch, including view name, MIB subtree, subtree mask, and so on.

For the description of the configuration items of MIB view, refer to the related description in the snmp-agent mib-view command.

Examples

# Display the information about the currently configured MIB view.

<Sysname> display snmp-agent mib-view

   View name:ViewDefault

       MIB Subtree:iso

       Subtree mask:

       Storage-type: nonVolatile

       View Type:included

       View status:active

 

   View name:ViewDefault

       MIB Subtree:snmpUsmMIB

       Subtree mask:

       Storage-type: nonVolatile

       View Type:excluded

       View status:active

       View name:ViewDefault

       MIB Subtree:snmpVacmMIB

       Subtree mask:

       Storage-type: nonVolatile

       View Type:excluded

       View status:active

 

   View name:ViewDefault

       MIB Subtree:snmpModules.18

       Subtree mask:

       Storage-type: nonVolatile

       View Type:excluded

       View status:active

The above output information indicates that MIB view ViewDefault includes all MIB objects under the ISO MIB subtree except snmpUsmMIB, snmpVacmMIB and snmpModules.18.

1.1.5  display snmp-agent statistics

Syntax

display snmp-agent statistics

View

Any view

Parameters

None

Description

Use the display snmp-agent statistics command to display the statistics on SNMP packets.

The statistics are collected from the time when the switch is started, and the statistics will not be cleared if the SNMP is restarted.

If you execute the command when SNMP agent is not started, the device prompts “SNMP Agent disabled”.

Examples

# Display the statistics on SNMP packets.

<Sysname> display snmp-agent statistics

  1276 Messages delivered to the SNMP entity

  0 Messages which were for an unsupported version

  0 Messages which used a SNMP community name not known

  0 Messages which represented an illegal operation for the community supplied

  0 ASN.1 or BER errors in the process of decoding

  1291 Messages passed from the SNMP entity

  0 SNMP PDUs which had badValue error-status

  0 SNMP PDUs which had genErr error-status

  7 SNMP PDUs which had noSuchName error-status

  0 SNMP PDUs which had tooBig error-status (Maximum packet size 1500)

  3669 MIB objects retrieved successfully

  26 MIB objects altered successfully

  420 GetRequest-PDU accepted and processed

  832 GetNextRequest-PDU accepted and processed

  0 GetBulkRequest-PDU accepted and processed

  1276 GetResponse-PDU accepted and processed

  24 SetRequest-PDU accepted and processed

  15 Trap PDUs accepted and processed

  0 Alternate Response Class PDUs droped silently

  0 Forwarded Confirmed Class PDUs droped silently

Table 1-3 display snmp-agent statistics command output description

Field

Description

Messages delivered to the SNMP entity

The total number of messages delivered to the SNMP entity from the transport service.

Messages which were for an unsupported version

The total number of SNMP messages delivered to the SNMP protocol entity and were for an unsupported SNMP version.

Messages which used a SNMP community name not known

The total number of SNMP messages delivered to the SNMP protocol entity which used an SNMP community name not known to said entity.

Messages which represented an illegal operation for the community supplied

The total number of SNMP messages delivered to the SNMP protocol entity which represented an SNMP operation which was not allowed by the SNMP community named in the message.

ASN.1 or BER errors in the process of decoding

The total number of ASN.1 or BER errors encountered by the SNMP protocol entity when decoding received SNMP messages.

Messages passed from the SNMP entity

The total number of SNMP messages which were passed from the SNMP protocol entity to the transport service.

SNMP PDUs which had badValue error-status

The total number of SNMP PDUs which were delivered to the SNMP protocol entity and for which the value of the error-status field is `badValue'.

SNMP PDUs which had genErr error-status

The total number of SNMP PDUs which were delivered to the SNMP protocol entity and for which the value of the error-status field is `genErr'.

SNMP PDUs which had noSuchName error-status

The total number of SNMP PDUs which were delivered to the SNMP protocol entity and for which the value of the error-status field is `noSuchName'.

SNMP PDUs which had tooBig error-status (Maximum packet size 1500)

The total number of SNMP PDUs which were delivered to the SNMP protocol entity and for which the value of the error-status field is `tooBig'.

MIB objects retrieved successfully

The total number of MIB objects which have been retrieved successfully by the SNMP protocol entity as the result of receiving valid SNMP Get-Request and Get-Next PDUs.

MIB objects altered successfully

The total number of MIB objects which have been altered successfully by the SNMP protocol entity as the result of receiving valid SNMP Set-Request PDUs.

GetRequest-PDU accepted and processed

The total number of SNMP Get-Request PDUs which have been accepted and processed by the SNMP protocol entity.

GetNextRequest-PDU accepted and processed

The total number of SNMP Get-Next PDUs which have been accepted and processed by the SNMP protocol entity.

GetBulkRequest-PDU accepted and processed

The total number of SNMP Get-Bulk PDUs which have been accepted and processed by the SNMP protocol entity.

GetResponse-PDU accepted and processed

The total number of SNMP Get-Response PDUs which have been accepted and processed by the SNMP protocol entity.

SetRequest-PDU accepted and processed

The total number of SNMP Set-Request PDUs which have been accepted and processed by the SNMP protocol entity.

Trap PDUs accepted and processed

The total number of SNMP Trap PDUs which have been accepted and processed by the SNMP protocol entity.

Alternate Response Class PDUs dropped silently

The total number of GetRequest-PDUs, GetNextRequest-PDUs, GetBulkRequest-PDUs, SetRequest-PDUs, and InformRequest-PDUs delivered to the SNMP entity which were silently dropped because the size of a reply containing an alternate Response-PDU with an empty variable-bindings field was greater than either a local constraint or the maximum message size associated with the originator of the request.

Forwarded Confirmed Class PDUs dropped silently

The total number of Confirmed Class PDUs (such as GetRequest-PDUs, GetNextRequest-PDUs, GetBulkRequest-PDUs, SetRequest-PDUs, and          InformRequest-PDUs) delivered to the SNMP entity which  were silently dropped because the transmission of  the (possibly translated) message to a proxy target failed in a manner (other than a time-out) such that no Response Class PDU (such as a Response-PDU) could be returned.

 

1.1.6  display snmp-agent sys-info

Syntax

display snmp-agent sys-info [ contact | location | version ]*

View

Any view

Parameters

contact: Displays the contact information of the current device.

location: Displays the physical location of the current device.

version: Displays the version information about the SNMP running in the system.

Description

Use the display snmp-agent sys-info command to display the system SNMP information about the current device, including contact information, geographical location of the device, and the employed SNMP version.

This command displays all the system SNMP information if you execute it with no keyword specified.

The display snmp-agent sys-info command displays the related information configured using the snmp-agent sys-info command. For the detailed configuration, refer to the snmp-agent sys-info command.

By default, the contact information of an S3100 Ethernet switch is "Hangzhou H3C Technologies Co., Ltd.", the geographical location is "Hangzhou China", and the SNMP version employed is SNMPv3.

Examples

# Display the system SNMP information about the device.

<Sysname> display snmp-agent sys-info

   The contact person for this managed node:

           Hangzhou H3C Technologies Co., Ltd.

 

   The physical location of this node:

           Hangzhou China

 

   SNMP version running in the system:

           SNMPv3

1.1.7  display snmp-agent trap-list

Syntax

display snmp-agent trap-list

View

Any view

Parameters

None

Description

Use the display snmp-agent trap-list command to display the modules that can generate traps and whether the sending of traps is enabled on the modules.

If a module contains multiple submodules, the trap function of the entire module is displayed as enabled as long as the trap function of any of the submodules is enabled.

Related commands: snmp-agent trap enable.

Examples

# Display the modules that can generate traps and whether the trap function is enabled on the modules.

<Sysname> display snmp-agent trap-list

   configuration trap enable

   flash trap enable

   standard trap disable

   system trap enable

   oadp trap disable

   Enable traps :4; Disable traps 1

In the above output information, enable indicates that traps are allowed to be generated on the module, and disable indicates that traps are not allowed to be generated on the module.

By default, the modules that can generate traps are allowed to generate traps. If you do not need traps of some modules, you can use the undo snmp-agent trap enable command to disable the trap function of the specific modules.

1.1.8  display snmp-agent usm-user

Syntax

display snmp-agent usm-user [ engineid engineid | username user-name | group group-name ]*

View

Any view

Parameters

engineid: Engine ID, a string of 10 to 64 hexadecimal digits.

user-name: SNMPv3 username, a string of 1 to 32 characters.

group-name: Name of an SNMP group, a string of 1 to 32 characters.

Description

Use the display snmp-agent usm-user command to display the information about a specific type of SNMPv3 users.

If you execute this command with no keyword specified, the information about all the SNMPv3 users is displayed, including username, group name, engine ID, storage type and user status.

SNMPv3 introduced the concepts of username and group. You can set the authentication and privacy functions. The former is used to authenticate the validity of the sending end of the packets, preventing access of illegal users; the latter is used to encrypt packets between the NMS and agent, preventing the packets from being intercepted. A more secure communication between SNMP NMS and SNMP agent can be ensured by configuring whether to perform authentication and privacy or not.

You can configure whether to perform authentication and privacy when you create an SNMPv3 group, and configure the specific algorithms and passwords for authentication and privacy when you create a user.

Examples

# Display the information about all the SNMP users.

<Sysname> display snmp-agent usm-user

   User name: usm-user

   Group name: usm-group9-0

       Engine ID: 800007DB000FE20F12346877

       Storage-type: nonVolatile

       UserStatus: active

Table 1-4 display snmp-agent usm-user command output description

Field

Description

User name

SNMP username

Group name

The name of the SNMP group which the SNMP user belongs to

Engine ID

SNMP engine ID of the device

Storage-type

Storage type, which can be:

l      volatile: Information will be lost if the system is rebooted

l      nonVolatile: Information will not be lost if the system is rebooted

l      permanent: Modification is permitted, but deletion is forbidden

l      readOnly: Read only, that is, no modification, no deletion

l      other: Other storage types

UserStatus

SNMP user status

 

1.1.9  enable snmp trap updown

Syntax

enable snmp trap updown

undo enable snmp trap updown

View

Ethernet port view, interface view

Parameters

None

Description

Use the enable snmp trap updown command to enable the sending of port/interface linkUp/linkDown traps.

Use the undo enable snmp trap updown command to disable the sending of linkUp/linkDown traps.

By default, the sending of port/interface linkUp/linkDown traps is enabled.

Note that you need to enable the generation of port/interface linkUp/linkDown traps both on the port/interface and globally if you want a port/interface to generate port/interface linkUp/linkDown traps when the state of the port/interface changes.

To enable this function on a port/interface, use the enable snmp trap updown command; to enable this function globally, use the snmp-agent trap enable [ standard [ linkdown | linkup ] * ] command. By default, both are enabled.

Examples

# Enable the port Ethernet 1/0/1 to send linkUp/linkDown SNMP traps to the NMS whose IP address is 10.1.1.1 using the community name public.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] snmp-agent trap enable

[Sysname] snmp-agent target-host trap address udp-domain 10.1.1.1 params securityname public

[Sysname] interface Ethernet1/0/1

[Sysname-Ethernet1/0/1] enable snmp trap updown

1.1.10  snmp-agent

Syntax

snmp-agent

undo snmp-agent

View

System view

Parameters

None

Description

Use the snmp-agent command to enable the SNMP agent.

Use the undo snmp-agent command to disable the SNMP agent.

Execution of the snmp-agent command or any of the commands used to configure the SNMP agent, you can start the SNMP agent.

By default, the SNMP agent is disabled.

Examples

# Start the SNMP agent.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] snmp-agent

 

&  Note:

An S3100 Ethernet switch provides the following functions to prevent attacks through unused UDP ports.

l      Starting the SNMP agent opens UDP port used by SNMP agents and the UDP port used by SNMP trap respectively.

l      Shutting down the SNMP agent closes UDP ports used by SNMP agents and SNMP trap as well.

 

1.1.11  snmp-agent calculate-password

Syntax

snmp-agent calculate-password plain-password mode { md5 | sha } { local-engineid | specified-engineid engineid }

View

System view

Parameters

plain-password: The plain-text password to be encrypted, in the range 1 to 64 characters.

mode: Specifies the authentication algorithm used to encrypt a plain text password.

md5: Uses HMAC MD5 algorithm.

sha: Uses HMAC SHA algorithm, which is securer than MD5 algorithm.

local-engineid: Uses the local engine ID to calculate the key.

specified-engineid: Uses the specified engine ID to calculate the key.

engineid: A case-insensitive hexadecimal string used for key calculation. The system capitalizes the string. The length of the string must be an even number and in the range 10 to 64 characters.

Description

Use the snmp-agent calculate-password command to encrypt a plain-text password to generate a cipher-text one by using the specified encryption algorithm.

When creating an SNMPv3 user, if you specify an authentication or privacy password as in cipher text, you need to use this command to generate a cipher text password by using the specified algorithm, and copy the generated cipher text password to use.

The generated password is related to engine ID: password generated under an engine ID can only take effect on this engine ID.

Related commands: snmp-agent usm-user v3.

 

&  Note:

SNMP agent must be enabled for you to encrypt a plain-text password.

 

Examples

# Use the local engine ID and the md5 algorithm to encrypt plain-text password aaaa.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] snmp-agent calculate-password aaaa mode md5 local-engineid

The result of the password is: B02A2E48346E2CBFFCE809C99CF1F6C

1.1.12  snmp-agent community

Syntax

snmp-agent community { read | write } community-name [ [ acl acl-number ] [ mib-view view-name ] ]*

undo snmp-agent community community-name

View

System view

Parameters

read: Specifies that the community to be created has read-only permission to MIB objects. Communities of this type can only query MIBs for device information.

write: Specifies that the community to be created has read-write permission to MIB objects. Communities of this type are capable of configuring devices.

community-name: Name of the community to be created, a string of 1 to 32 characters.

acl-number: ID of the ACL to be applied to the community, in the range 2000 to 2999. Using basic ACL can restrict the source addresses of SNMP messages, namely, permitting or refusing the SNMP messages with specific source addresses, thus restricting access between the NMS and the agent.

view-name: MIB view name, a string of 1 to 32 characters.

Description

Use the snmp-agent community command to create an SNMP community. SNMPv1 and SNMPv2c use community name to restrict access rights. You can use this command to configure a community name and configure read or write access right and ACL.

Use the undo snmp-agent community command to remove an SNMP community.

Typically, “public” is used as a read community name, and “private” is used as a write community name. For the security purposes, you are recommended to configure another community name except these two.

Examples

# Create an SNMP community named comaccess, which has read-only permission to MIB objects.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] snmp-agent community read comaccess

# Create an SNMP community named mgr, which has read-write permission to MIB objects

[Sysname] snmp-agent community write mgr

# Remove the community named comaccess.

[Sysname] undo snmp-agent community comaccess

1.1.13  snmp-agent group

Syntax

1)         Version 1 and version 2c

snmp-agent group { v1 | v2c } group-name [ read-view read-view ] [ write-view write-view ] [ notify-view notify-view ] [ acl acl-number ]

undo snmp-agent group { v1 | v2c } group-name

2)         Version 3

snmp-agent group v3 group-name [ authentication | privacy ] [ read-view read-view ] [ write-view write-view ] [ notify-view notify-view ] [ acl acl-number ]

undo snmp-agent group v3 group-name [ authentication | privacy ]

View

System view

Parameters

v1: Specifies SNMPv1.

v2c: Specifies SNMPv2c.

v3: Specifies SNMPv3.

group-name: Name of the SNMP group to be created, a string of 1 to 32 characters.

authentication: Configures to authenticate but do not encrypt the packets.

privacy: Configures to authenticate and encrypt the packets.

read-view: Read-only view name, a string of 1 to 32 characters. The default value is ViewDefault.

write-view: Read-write view name, a string of 1 to 32 characters. By default, no write view is configured, namely, the NMS cannot perform the write operation on the MIB objects of the device.

notify-view: Notification view name in which traps can be sent, a string of 1 to 32 characters. By default, no notify view is configured, namely, the agent will not send traps to the NMS.

acl-number: ID of a basic ACL, in the range 2000 to 2999. Using basic ACL can restrict the source addresses of SNMP messages, namely, permitting or refusing the SNMP messages with specific source addresses, thus restricting access between the NMS and the agent.

Description

Use the snmp-agent group command to create an SNMP group, and set the security mode and corresponding SNMP view of the group.

Use the undo snmp-agent group command to remove an SNMP group.

For SNMPv3, group name and security mode (whether authentication and privacy are performed) can jointly define a group. Groups with the same group name but different security mode are different groups. For the details, see the following examples.

By default, the SNMP groups created using the snmp-agent group v3 command do not authenticate or encrypt packets.

Related commands: snmp-agent mib-view, snmp-agent usm-user.

Examples

# Create an SNMPv1 group named v1group.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] snmp-agent group v1 v1group

# Create an SNMPv3 group v3group, set the security mode to no authentication no privacy, and set the read view, write view and view in which traps can be sent to OSPF view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] snmp-agent group v3 v3group read-view ospf write-view ospf notify-view ospf

# Create an SNMPv3 group v3group, set the security mode to authentication and privacy, and permit only access from the NMS whose IP address is 192.168.0.108 to the agent using ACL.

[Sysname] acl number 2001

[Sysname] rule 0 permit source 192.168.0.108 0

[Sysname] snmp-agent group v3 v3group privacy acl 2001

In this case, when you use the display snmp-agent group command to display group information, you can see that two groups with the name v3group are created, but their security modes are noAuthnoPriv and AuthPriv respectively.

<Sysname> display snmp-agent group

   Group name: v3group

       Security model: v3 noAuthnoPriv

       Readview: ViewDefault

       Writeview: ospf

       Notifyview : ospf

       Storage-type: ospf

   Group name: v3group

       Security model: v3 AuthPriv

       Readview: ViewDefault

       Writeview: <no specified>

       Notifyview :<no specified>

       Storage-type: nonVolatile

       Acl:2001                 

1.1.14  snmp-agent local-engineid

Syntax

snmp-agent local-engineid engineid

undo snmp-agent local-engineid

View

System view

Parameters

engineid: Engine ID, an even number of hexadecimal characters, in the range 10 to 64.

Description

Use the snmp-agent local-engineid command to set an engine ID for the local SNMP entity.

Use the undo snmp-agent local-engineid command to restore the default engine ID.

By default, the engine ID of an SNMP entity is formed by appending the device information to the enterprise number. The device information can be determined according to the device, which can be an IP address, a MAC address, or a user-defined string comprising of hexadecimal digits.

The configurations with the snmp-agent usm-user v3 and snmp-agent calculate-password commands are related to engine ID. If you modify the engine ID, the corresponding configurations are invalid for the new engine ID.

Examples

# Set the local SNMP entity engine ID to 123456789A.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] snmp-agent local-engineid 123456789A

1.1.15  snmp-agent log

Syntax

snmp-agent log { set-operation | get-operation | all }

undo snmp-agent log { set-operation | get-operation | all }

View

System view

Parameters

set-operation: Logs the set operations.

get-operation: Logs the get operations.

all: Logs both the set operations and get operations.

Description

Use the snmp-agent log command to enable network management operation logging.

Use the undo snmp-agent log command to disable network management operation logging.

By default, network management operation logging is disabled.

After SNMP logging is enabled, when NMS performs specified operations on the SNMP agent, the SNMP agent records and then saves the information related to the operations into the information center of the device.

 

&  Note:

l      When SNMP logging is enabled on a device, SNMP logs are output to the information center of the device. With the output destinations of the information center set, the output destinations of SNMP logs will be decided.

l      The severity level of SNMP logs is informational, that is, the logs are taken as general prompt information of the device. To view SNMP logs, you need to enable the information center to output system information with informational level.

l      For detailed description on system information and information center, refer to the Information Center Configuration part in this manual.

 

Examples

# Enable logging for both the get and the set operations performed on the NMS.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] snmp-agent log all

1.1.16  snmp-agent mib-view

Syntax

snmp-agent mib-view { included | excluded } view-name oid-tree [ mask mask-value ]

undo snmp-agent mib-view view-name

View

System view

Parameters

included: Specifies that the MIB view includes this MIB subtree.