H3C S7500 Series Command Manual(Release 3100 Series)-(V1.04)

HomeSupportSwitchesH3C S7500 Switch SeriesReference GuidesCommand ReferencesH3C S7500 Series Command Manual(Release 3100 Series)-(V1.04)
30-SNMP-RMON Commands
Title Size Download
30-SNMP-RMON Commands 213 KB

Chapter 1  SNMP Configuration Commands

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 a local engine ID.

remote-engineid: Displays a remote engine ID.

Description

Use the display snmp-agent command to view the engine ID of the current device.

An SNMP engine ID identifies an SNMP entity uniquely within an SNMP domain. As an indispensable part of an SNMP entity, an SNMP engine ID performs the function of sending, receiving and authenticating SNMP messages, extracting PDUs, packet encapsulation and the communication with SNMP applications.

Examples

# Display the local engine ID of the current device.

<H3C> display snmp-agent local-engineid

SNMP local EngineID: 00000009020000000C025808

The SNMP local EngineID field in the above information represents the ID of the local SNMP engine.

1.1.2  display snmp-agent community

Syntax

display snmp-agent community [ read | write ]

View

Any view

Parameters

read: Displays the information about community names with read-only access right.

write: Displays the information about community names with write access right.

Description

Use the display snmp-agent community command to view the information about the currently configured community names for SNMPv1 or SNMPv2c.

Examples

# Display the currently configured community names.

<H3C> 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 Description on the fields of the display snmp-agent community command

Field

Description

Community name

Community name

Group name

Group name

Storage-type

Storage type, including volatile, nonVolatile, permanent, readOnly, and other.

 

1.1.3  display snmp-agent group

Syntax

display snmp-agent group [ group-name ]

View

Any view

Parameters

groupname: Name of the group whose SNMP information is to be displayed, ranging from 1 to 32 bytes.

Description

Use the display snmp-agent group command to view the group information on the current switch, including group name, security model, state of various views and storage models.

Examples

# Display the information about the SNMP group named “hello”.

<H3C> display snmp-agent group

   Group name: hello

       Security model: v2c noAuthnoPriv

       Readview: ViewDefault

       Writeview: <no specified>

       Notifyview :<no specified>

       Storage-type: nonvolatile

The following table describes the output fields.

Table 1-2 Description on the fields of the display snmp-agent group command

Field

Description

Group name

SNMP group name

Security model

Security model of that group, including authorization and encryption (AuthPriv), authorization with no encryption (AuthnoPriv), no authorization and no encryption (noAuthnoPriv).

Readview

Read-only MIB view name corresponding to that group

Writeview

Write MIB view corresponding to that group

Notifyview

Notify MIB view corresponding to that group

Storage-type

Storage type, including volatile, nonVolatile, permanent, readOnly and other.

 

1.1.4  display snmp-agent mib-view

Syntax

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

View

Any view

Parameters

exclude: Displays the SNMP MIB views of the excluded attribute.

include: Displays the SNMP MIB views pf the included attribute.

viewname: Displays the SNMP MIBs according to the view name.

view-name: Name of the SNMP MIB view to be displayed. It is a character string, ranging from 1 to 32 characters.

Description

Use the display snmp-agent mib-view command to view the MIB view configuration information of the current Ethernet switch.

Examples

# Display the information about the currently configured MIB views.

<H3C> display snmp-agent mib-view

   View name: system

       MIB Subtree:system

       Subtree mask:

       Storage-type: nonVolatile

       View Type:included

       View status:active

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

Table 1-3 Description on the fields of the display snmp-agent mib-view command

Field

Description

View name

View name

MIB Subtree

MIB subtree

Subtree mask

Subtree mask

Storage-type

Storage type

View Type

Includes or excludes access to an MIB object

View status: active/inactive

Indicates the MIB view status: active or inactive

 

  Caution:

For the above commands, when an SNMP agent is disabled, the system gives the prompt “SNMP agent disabled”.

 

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 view the statistics on SNMP packets.

This command provides statistics for SNMP operations.

Examples

# Display the statistics on SNMP packets.

<H3C> display snmp-agent statistics

  9232 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

  9266 Messages passed from the SNMP entity

  0 SNMP PDUs which had badValue error-status

  0 SNMP PDUs which had genErr error-status

  11 SNMP PDUs which had noSuchName error-status

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

  33029 MIB objects retrieved successfully

  26 MIB objects altered successfully

  714 GetRequest-PDU accepted and processed

  8514 GetNextRequest-PDU accepted and processed

  10 GetBulkRequest-PDU accepted and processed

  9230 GetResponse-PDU accepted and processed

  1 SetRequest-PDU accepted and processed

  34 Trap PDUs accepted and processed

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 of the SNMP running in the system.

Description

Use the display snmp-agent sys-info command to view the system contact (sysContact) string, physical location string, and the current SNMP version.

This command displays all information if you choose no parameter.

Examples

# Display the sysContact string.

<H3C> display snmp-agent sys-info contact

   The contact person for this managed node:

           Hangzhou H3C Technologies Co., Ltd.

The above information indicates that the contact of this device is Hangzhou H3C Technologies Co., Ltd.

# Display the physical location string.

<H3C> display snmp-agent sys-info location

   The physical location of this node:

           Hangzhou China

The above information indicates that the device location is Hangzhou China.

# Display the current SNMP version.

<H3C> display snmp-agent sys-info version

   SNMP version running in the system:

           SNMPv3

The above information indicates that the current SNMP version is SNMPv3.

1.1.7  display snmp-agent usm-user

Syntax

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

View

Any view

Parameters

engineid: SNMPv3 user information of the specified engine ID, which is of 10 to 64 hexadecimal numerals.

username: Information about the specified SNMPv3 user, which is of 1 to 32 characters.

groupname: Information about users in the specified group, whose name is of 1 to 32 characters.

Description

Use the display snmp-agent usm-user command to view SNMP user information.

If you do not specify any parameter, all the information will be displayed.

Examples

# Display all user information.

<H3C> display snmp-agent usm-user engineid 1234567890

User name: userv3aaaa

Group name: managev3group

Engine ID: 1234567890

Storage-type: nonVolatile

UserStatus: active

Table 1-4 describes the output fields.

Table 1-4 Description on the fields of the display snmp-agent usm-user command

Field

Description

User name

SNMP user name

Group name

Name of the group the SNMP user belongs to

Engine ID

Character string identifying the SNMP device

Storage-type

Storage type of SNMP information, including volatile, nonVolatile, permanent, readOnly and other.

UserStatus

SNMP user status

 

1.1.8  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 and linkDown trap messages.

Use the undo enable snmp trap updown command to disable the sending of linkUp and linkDown trap messages.

By default, the sending of port/interface linkUp and linkDown trap messages is enabled.

The enable snmp trap updown command must be used in conjunction with the snmp-agent trap enable, snmp-agent target-host commands. You can use the snmp-agent target-host command to specify the hosts that can receive trap packets. To send trap packets, you must configure at least one snmp-agent target-host command.

Examples

# Enable Ethernet 6/0/1 to send linkUp and linkDown SNMP trap messages to community name “public” on the NMS whose IP address is 10.1.1.1.

<H3C>system-view

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

[H3C] snmp-agent trap enable

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

[H3C] interface ethernet6/0/1

[H3C-Ethernet6/0/1] enable snmp trap updown

1.1.9  snmp-agent

Syntax

snmp-agent

undo snmp-agent

View

System view

Parameters

None

Description

Use the snmp-agent command to enable SNMP agents.

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

By default, SNMP agents are disabled.

 

&  Note:

You can enable the SNMP agent function by executing this command or any configuration command of snmp-agent.

 

Examples

# Disable running SNMP agents.

<H3C> system-view

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

[H3C] undo snmp-agent

1.1.10  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: Indicates that MIB objects can only be read. Read-only communities can only query device information.

write: Indicates that MIB objects can be read and written. Read-write communities can configure the device.

community-name: Community name, a character string of 1 to 32 characters.

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

acl-number: Basic Access Control List (ACL) number specified by a community name, ranging from 2000 to 2999.

Description

Use the snmp-agent community command to configure community name and enable the access to SNMP.

Use the undo snmp-agent community command to cancel the community name settings.

Examples

# Configure the community name as comaccess and permit read-only access by this community name.

<H3C>system-view

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

[H3C] snmp-agent community read comaccess

# Configure community name as mgr and permit read-write access.

[H3C] snmp-agent community write mgr

# Remove the community name comaccess.

[H3C] undo snmp-agent community comaccess

1.1.11  snmp-agent group

Syntax

1)         For SNMPv1 and SNMPv2c

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)         For SNMPv3

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.

groupname: Group name, ranging from 1 to 32 bytes.

authentication: Configures to authenticate packets without encrypting them.

privacy: Configures to authenticate and encrypt packets.

read-view: Sets read-only view.

read-view: Read-only view name, ranging from 1 to 32 bytes.

write-view: Sets read-write view.

write-view: Read-write view name, ranging from 1 to 32 bytes.

notify-view: Sets notify view.

notify-view: Notification view name, ranging from 1 to 32 bytes.

acl: Sets an ACL.

acl-number: ACL number, ranging from 2000 to 2099.

Description

Use the snmp-agent group command to configure a new SNMP group, that is, to map SNMP users to an SNMP view.

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

By default, an SNMP group configured using the snmp-agent group v3 command does not authenticate or encrypt packets.

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

Examples

# Create SNMPv3 group named hello.

<H3C>system-view

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

[H3C] snmp-agent group v3 hello

1.1.12  snmp-agent local-engineid

Syntax

snmp-agent local-engineid engineid

undo snmp-agent local-engineid

View

System view

Parameters

engineid: Engine ID, a character string of 10 to 64 hexadecimal numbers. Two hexadecimal characters form an octet.

Description

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

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

By default, the engine ID is "Enterprise number + device information". Device information is determined by products. It can be an IP address, MAC address or user-defined string in hexadecimal format.

Related commands: snmp-agent usm-user.

Examples

# Configure the local device name as 1234512345.

<H3C>system-view

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

[H3C] snmp-agent local-engineid 1234512345

1.1.13  snmp-agent mib-view

Syntax

snmp-agent mib-view { included | excluded } view-name oid-tree

undo snmp-agent mib-view view-name

View

System view

Parameters

included: Includes the MIB subtree.

excluded: Excludes the MIB subtree.

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

oid-tree: OID MIB subtree of the MIB object subtree. It is a character string of 1 to 255 characters. It can be a character string of the variable OID (such as 1.4.5.3.1), or a variable name (such as system). The character string can include wildcards (such as 1.4.5.*.*.1).

Description

Use snmp-agent mib-view command to create or update MIB view information, in order to limit the MIB objects to be accessed by the NMS.

Use the undo snmp-agent mib-view command to cancel the current setting.

By default, the view name is ViewDefault and OID is 1.

Related commands: snmp-agent group.

Examples

# Create an SNMP MIB view containing all the objects of MIB-II.

<H3C>system-view

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

[H3C] snmp-agent mib-view included mib2 1.3.6.1.2.1

1.1.14  snmp-agent packet max-size

Syntax

snmp-agent packet max-size byte-count

undo snmp-agent packet max-size

View

System view

Parameters

byte-count: Maximum size of the SNMP packet (in bytes) that the agent can send/receive, ranging from 484 to 17,940.

Description

Use the snmp-agent packet max-size command to set the maximum size of the SNMP packet that the agent can send/receive.

Use undo snmp-agent packet max-size command to restore the default size of SNMP packets.

The maximum size of the SNMP packet that the agent can send/receive vary with networking conditions.

Examples

# Set the maximum size of the SNMP packet that the agent can send/receive to 1,042 bytes.

<H3C>system-view

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

[H3C] snmp-agent packet max-size 1042

1.1.15  snmp-agent sys-info

Syntax

snmp-agent sys-info { contact sys-contact | location sys-location | version { { v1 | v2c | v3 }* | all } }

undo snmp-agent sys-info { { contact | location }* | version { { v1 | v2c | v3 }* | all } }

View

System view

Parameters

contact: Sets the contact for system maintenance.

sysContact: Character string describing contact information for system maintenance.

location: Sets the geographical location of the device.

sys-location: Geographical location of the device.

version: Specifies version of the running SNMP.

v1: Specifies SNMPv1.

v2c: Specifies SNMPv2c.

v3: Specifies SNMPv3.

all: Specifies all SNMP versions, including SNMPv1, SNMPv2c, SNMPv3.

Description

Use the snmp-agent sys-info command to set system information, including geographical location of the device, contact information for system maintenance and version information of running SNMP.

Use the undo snmp-agent sys-info location command to remove the current configuration.

If the device fails, the device maintainer can use contact information to contact the manufacturer.

By default, the contact information is "Hangzhou H3C Technologies Co., Ltd.", the physical location is "Hangzhou China", the SNMP version is SNMPv3.

Related commands: display snmp-agent sys-info.

Examples

# Set contact information for system maintenance as Dial System Operator # 1234.

<H3C> system-view

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

[H3C] snmp-agent sys-info contact Dial System Operator # 1234

1.1.16  snmp-agent target-host

Syntax

snmp-agent target-host trap address udp-domain { ip-address } [ udp-port port-number ] params securityname security-string [ v1 | v2c | v3 [authentication | privacy ] ]

undo snmp-agent target-host ip-address securityname security-string

View

System view

Parameters

trap: Specifies the host to be a Trap host.

address: Specifies the address of the destination host for transmitting SNMP messages.

udp-domain: Specifies to transmit trap messages to the target host through UDP.

ip-address: IPv4 address of the host receiving trap messages.

port-number: Number of the port receiving trap messages, ranging from 0 to 65,535 characters.

params: Specifies SNMP target host information , which is to be used in SNMP message generation.

security-string: Community name for SNMPv1 and SNMPv2c, or SNMPv3 user name, ranging from 1 to 32 characters.

v1: Specifies SNMPv1.

v2c: Specifies SNMPv2c.

v3: Specifies SNMPv3.

authentication: Configures to authenticate the packets.

privacy: Configures to authenticate and encrypt the packets.

Description

Use snmp-agent target-host command to configure the destination of SNMP trap messages.

Use undo snmp-agent target-host command to cancel the current setting.

The snmp-agent target-host command must be in conjunction with the snmp-agent trap enable command or the enable snmp trap updown command on the device to enable the device to send trap messages.

1)         Use the snmp-agent trap enable command or the enable snmp trap updown command to define trap messages allowed to be sent (all trap messages can be sent by default).

2)         Use the snmp-agent target-host command to set the address of the destination host receiving SNMP trap messages.

Related commands: snmp-agent trap enable, snmp-agent trap source, snmp-agent trap life.

Examples

# Enable sending SNMP trap messages to the community name public on 10.1.1.1.

<H3C> system-view

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

[H3C] snmp-agent trap enable standard

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

1.1.17  snmp-agent trap enable

Syntax

snmp-agent trap enable [ bgp [ backwardtransition | established ]* | configuration | flash | ospf [ process-id ] [ ospf-trap-list ] | standard [ authentication | coldstart | linkdown | linkup | warmstart ]* | system | vrrp [ authfailure | newmaster ] ]

undo snmp-agent trap enable [ bgp [ backwardtransition | established ]* | configuration | flash | ospf [ process-id ] [ ospf-trap-list ] | standard [ authentication | coldstart | linkdown | linkup | warmstart ]* | system | vrrp [ authfailure | newmaster ] ]

View

System view

Parameters

bgp [ backwardtransition | established ]*: Configures to send trap messages about BGP.

configuration: Configures to send trap messages about configurations.

flash: Configures to send trap messages about Flash.

ospf [ process-id ] [ ospf-trap-list ]: Configures to send trap messages about the OSPF protocol. The process-id argument represents a process ID. The ospf-trap-list argument represents a list of trap messages allowed to be sent.

standard [ authentication ] [ coldstart ] [ linkdown ] [ linkup ] [ warmstart ]: Configures to send SNMP standard notifications or trap messages.

authentication: Configures to send trap messages about SNMP authentication when authentication fails.

coldstart: Configures to send trap messages about cold restart when the switch restarts.

linkdown: Configures to send trap messages about SNMP linkdown when a port is down.

linkup: Configures to send trap messages about SNMP linkup when a port is up.

warmstart: Configures to send trap messages about SNMP warmstart when SNMP is rebooted.

system: Configures to send trap messages about H3C-SYS-MAN-MIB (a private MIB).

vrrp [ authfailure | newmaster ]: Configures to send trap messages about VRRP.

Description

Use the snmp-agent trap enable command to enable the device to send trap messages.

Use the undo snmp-agent trap enable command to disable the device from sending trap messages.

By default, the device does not send trap messages.

The snmp-agent trap enable command must be used in conjunction with the snmp-agent target-host command. The snmp-agent target-host command specifies which hosts can receive Trap messages. However, to send trap messages, you must use the snmp-agent target-host command for once at least.

Examples

# Enable to send the trap messages about SNMP authentication failure to community name public on 10.1.1.1.

<H3C>system-view

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

[H3C] snmp-agent trap enable standard authentication

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

1.1.18  snmp-agent trap life

Syntax

snmp-agent trap life seconds

undo snmp-agent trap life

View

System view

Parameters

seconds: Aging time, in seconds, ranging from 1 to 2,592,000.

Description

Use the snmp-agent trap life command to set aging time for trap messages. The trap messages beyond the aging time are discarded.

Use the undo snmp-agent trap life command to restore the default aging time for trap messages.

By default, the aging time of SNMP trap messages is 120 seconds.

After the specified aging time has elapsed, the system drops the trap message.

Related commands: snmp-agent trap enable, snmp-agent target-host.

Examples

# Set the aging time for trap messages as 60 seconds.

<H3C>system-view

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

[H3C] snmp-agent trap life 60

1.1.19  snmp-agent trap queue-size

Syntax

snmp-agent trap queue-size size

undo snmp-agent trap queue-size

View

System view

Parameters

size: Length of the queue of trap messages, ranging from 1 to 1,000.

Description

Use the snmp-agent trap queue-size command to configure the length of the queue of Trap messages sent to the destination host.

Use the undo snmp-agent trap queue-size command to restore the default value.

By default, the queue length is 100, that is, the queue can hold up to 100 trap messages sent to the destination host.

Related commands: snmp-agent trap enable, snmp-agent target-host, snmp-agent trap life.

Examples

# Configure the queue length to 200.

<H3C>system-view

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

[H3C] snmp-agent trap queue-size 200

1.1.20  snmp-agent trap source

Syntax

snmp-agent trap source { interface-type interface-number }

undo snmp-agent trap source

View

System view

Parameters

interface-type: Interface type.

interface-number: Interface number.

Description

Use the snmp-agent trap source command to configure the source address for sending trap message.

Use the undo snmp-agent trap source command to cancel the source address for sending trap message.

The SNMP trap message sent from a server has a source IP address no matter which interface the trap message is sent from.

By default, SNMP chooses an outgoing interface.

You can configure this command to trace a specific event using the source address of a trap message.

 

&  Note:

Before setting the IP address of an interface as the source address of the sent Trap messages, you must configure an IP address for the interface.

 

Related commands: snmp-agent trap enable, snmp-agent target-host.

Examples

# Configure the IP address of VLAN interface 1 as the source address for sending trap messages.

<H3C>system-view

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

[H3C] snmp-agent trap source Vlan-interface 1

1.1.21  snmp-agent usm-user

Syntax

1)         For SNMPv1 and SNMPv2c

snmp-agent usm-user { v1 | v2c } user-name group-name [ acl acl-number ]

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

2)         For SNMPv3

snmp-agent usm-user v3 user-name group-name [ authentication-mode { md5 | sha } auth-password [ privacy-mode des56 priv-password ] ] [ acl acl-number ]

undo snmp-agent usm-user v3 user-name group-name { local | engineid engineid-string }

View

System view

Parameters

v1: Configures to use SNMPv1 security model.

v2c: Configures to use SNMPv2c security model.

v3: Configures to use SNMPv3 security model.

user-name: User name, ranging from 1 to 32 bytes.

group-name: Group name corresponding to that user, ranging from 1 to 32 characters.

authentication-mode: Specifies that authentication is required in the security level. Absence of this parameter indicates that neither authentication nor encryption is performed.

md5: Specifies the authentication protocol as HMAC MD5 algorithm.

sha: Specifies the authentication protocol as HMAC SHA algorithm.

auth-password: Authentication password, a character string of 1 to 64 characters.

privacy-mode: Specifies that encryption is required in the security level.

des56: Specifies the encryption protocol as DES.

priv-password: Encryption password, a character string of 1 to 64 characters.

acl-number: Basic ACL number, ranging from 2000 to 2999.

local: Represents a local entity user.

engineid-string: Engine ID related to the user, ranging from 10 to 64 hexadecimal numerals.

Description

Use the snmp-agent usm-user command to add a new user to an SNMP group.

Use the undo snmp-agent usm-user command to remove a user from the SNMP group.

While using SNMPv3, SNMP engineID is required for authentication when you configure a remote user for an agent. If you change engineID after configuring a user, the user corresponding to the original engineID is not effective.

For SNMPv1 and SNMPv2c, this command will add a new community name. For SNMPv3, it will add a new user to an SNMP group.

Related commands: snmp-agent group, snmp-agent community, snmp-agent local-engineid.

Examples

# Add a user named John to the SNMPv3 group Johngroup. Specify that authentication is required and configure to authenticate using HMAC-MD5 algorithm with authentication password being hello.

<H3C> system-view

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

[H3C] snmp-agent group v3 Johngroup

[H3C] snmp-agent usm-user v3 John Johngroup authentication-mode md5 hello

 


Chapter 2  RMON Configuration Commands

2.1  RMON Configuration Commands

2.1.1  display rmon alarm

Syntax

display rmon alarm [entry-number ]

View

Any view

Parameters

entry-number: Alarm entry index, ranging from 1 to 65535. If you do not specify this argument, the configuration information of all alarm entries is displayed.

Description

Use the display rmon alarm command to display the configuration information of a specified alarm entry or all the alarm entries.

Related commands: rmon alarm.

Examples

# Display the configuration information of all the alarm entries.

<H3C> display rmon alarm

Alarm table 1 owned by abc is VALID.

Samples type          : delta

Variable formula      : 1.3.6.1.2.1.2.2.1.11.67111554<ifInUcastPkts.67111554>

Sampling interval     : 10(sec)

Rising threshold      : 100(linked with event 7)

Falling threshold     : 10(linked with event 8)

  When startup enables  : risingOrFallingAlarm

  Latest value          : 0

Table 2-1 Description on the fields of the display rmon alarm command

Field

Description

Alarm table

Alarm entry

abc

Entry owner

VALID

Alarm entries corresponding to the index are valid.

Samples type

Sample type: delta value or absolute value

Variable formula

Variable formula of the sampled node

Sampling interval

Sampling interval

Rising threshold is 100

Rising threshold is 100

Falling threshold is 10

Falling threshold is 10

When startup enables

Alarm startup type:

risingOrFallingAlarm (an alarm is triggered when the rising or falling threshold is reached)

risingAlarm (an alarm is triggered when the rising threshold is reached)

FallingAlarm (an alarm is triggered when the falling threshold is reached)

Latest value

Latest sampled value

 

2.1.2  display rmon event

Syntax

display rmon event [event-entry ]

View

Any view

Parameters

event-entry: Event entry index, in the range of 1 to 65535. If you do not specify this argument, the configuration information of all the event entries is displayed.

Description

Use the display rmon event command to display the configuration information of a specified RMON event entry or all the RMON event entries.

The displayed information includes: event entry index, event entry owner, event description, the action triggered by the event (log or alarm messages), and the time (in seconds) when the latest event is triggered (in terms of the time elapsed since the system is started/initialized).

Related commands: rmon event.

Examples

# Display the configuration information of all the event entries.

<H3C> display rmon event

Event table 1 owned by abc is VALID.

  Description: null.

  Will cause log-trap when triggered, last triggered at 0days 00h:02m:27s.

Table 2-2 Description on the fields of the display rmon event command

Field

Description

Event table

Event entries

abc

Entry owner

VALID

The entry corresponding to the index is valid

Description

Event description

Will cause log-trap when triggered

The event triggers logs logging and trap alarms

last triggered at 0days 00h:02m:27s

Time the latest event is triggered

 

2.1.3  display rmon eventlog

Syntax

display rmon eventlog [event-entry ]

View

Any view

Parameters

event-entry: Event entry index, in the range of 1 to 65535. If you do not specify this argument, the log of all the event entries is displayed.

Description

Use the display rmon eventlog command to display the log of a specified event entry or all the event entries.

The displayed RMON event log information includes: the indexes and status of the event entries in the event table, the time (in seconds) when an event log is generated (in terms of the time elapsed since the system is started or initialized), and the event description.

Examples

# Display the log generated by the event entry numbered 1.

<H3C> display rmon eventlog 1

Event table 1 owned by abc is VALID.

Generates eventLog 1.1 at 0days 00h:01m:39s.

Description: The 1.3.6.1.2.1.16.1.1.1.4.1 defined in alarm table 1,

less than(or =) 100 with alarm value 0. Alarm sample type is absolute.

Generates eventLog 1.2 at 0days 00h:02m:27s.

Description: The alarm formula defined in private alarm table 1,

less than(or =) 100 with alarm value 0. Alarm sample type is absolute.

Table 2-3 Description on the fields of the display rmon eventlog command

Field

Description

Event table

Event entries

abc

Entry owner

VALID

The status of the line corresponding to the index is valid.

Generates eventLog 1.1 at 0days 00h:01m:39s

Time when the event is triggered. The event may be triggered for several times. 1.1 indicates the time when event 1 is firstly triggered.

Description

Description on an event log

 

2.1.4  display rmon history

Syntax

display rmon history [ interface-type interface-number ]

View

Any view

Parameters

interface-type: Interface type.

interface-number: Interface number.

Description

Use the display rmon history command to display the RMON history information about a specified port. The information about the latest sample, including utilization, the number of errors, the total number of packets and so on, is also displayed.

Related commands: rmon history.

Examples

# Display the RMON history information about the RMON port Ethernet 2/0/1.

<H3C> display rmon history ethernet 2/0/1

History control entry 1 owned by abc is VALID

  Samples interface     : Ethernet2/0/1<ifEntry.642>

  Sampling interval     : 10(sec) with 10 buckets max

  Latest sampled values :

  Dropevents        :0         , octets               : 0

  packets           :0         , broadcast packets    : 0

  multicast packets :0         , CRC alignment errors : 0

  undersize packets :0         , oversize packets     : 0

  fragments         :0         , jabbers              : 0

  collisions        :0         , utilization          : 0 

Table 2-4 Description on the fields of the display rmon eventlog command

Field

Description

History control entry 1

Index number in the history control table

abc

Entry owner

VALID

The entry corresponding to the index is valid

Samples interface

Sampled port

Sampling interval

Sampling interval

buckets

Number of records in the history control table

Latest sampled values

Latest sampled information

Dropevents

Events of dropping packets

octets

Number of received bytes during sampling duration

packet

Number of received or packets during sampling duration

broadcastpackets

Number of received broadcast packets

multicastpackets

Number of received multicast packets

CRC alignment errors

Number of received CRC error packets

undersize packets

Number of received undersized packets

oversize packets

Number of received oversized packets

fragments

Number of received undersized CRC error packets

jabbers

Number of received oversized CRC error packets

collisions

Number of received collision packets

utilization

Utilization ratio

 

2.1.5  display rmon prialarm

Syntax

display rmon prialarm [prialarm-entry-number ]

View

Any view

Parameters

prialarm-entry-number: Extended alarm entry Index, in the range of 1 to 65535. If you do not specify this argument, the configuration information of all the extended alarm entries is displayed.

Description

Use the display rmon prialarm command to display the configuration information of a specified RMON extended alarm entry or all the RMON extended alarm entries.

Related commands: rmon prialarm.

Examples

# Display the configuration information of all the extended RMON alarm entries.

<H3C> display rmon prialarm

Prialarm table 1 owned by abc is VALID.

  Samples type          : delta

  Variable formula      : 1.3.6.1.2.1.2.2.1.10.641

  Description           : ifInOctets.Ethernet2/0/1

  Sampling interval     : 10(sec)

  Rising threshold      : 100(linked with event 2)

  Falling threshold     : 10(linked with event 2)

  When startup enables  : risingOrFallingAlarm

  This entry will exist : forever.

  Latest value          : 0   

Table 2-5 Description on the fields of the display rmon prialarm command

Field

Description

Prialarm table 1

Index number of a line of the extended alarm table

abc

Owner of this extended alarm entry

VALID

The entry corresponding to the index is valid

Samples type

Sample type: delta value or absolute value

Variable formula

Alarm variable of the sampled node

Description

Description of the alarm variable

Sampling interval

Sampling interval

Rising threshold

Upper threshold for alarm

An alarm is triggered when the upper threshold is reached.

Falling threshold

Lower threshold

An alarm is triggered when the lower threshold is reached.

linked with event

Event index corresponding to the upper threshold or lower threshold

When startup enables

Alarm startup type:

risingOrFallingAlarm (an alarm is triggered when the upper or lower threshold is reached)

risingAlarm (an alarm is triggered when the upper threshold is reached)

FallingAlarm (an alarm is triggered when the lower threshold is reached)

This entry will exist: forever

Existing period

This entry can exist forever or exist in the specified time

Latest value

Latest sampled value

 

2.1.6  display rmon statistics

Syntax

display rmon statistics [ interface-type interface-number ]

View

Any view

Parameters

interface-type: Interface type.

interface-number: Interface number.

Description

Use the display rmon statistics command to display the RMON statistics of a specified port.

The displayed RMON statistics information include the number of the following items: collisions, CRC error packets, undersized or oversized packets, broadcast packets, multicast packets, received bytes, and received packets.

Related commands: rmon statistics.

Examples

# Display the RMON statistics information.

<H3C> display rmon statistics ethernet 3/0/1

Statistics entry 1 owned by abc is VALID.

  Interface : Ethernet3/0/1<ifIndex.201326722>

  etherStatsOctets         : 3776      , etherStatsPkts          : 30

  etherStatsBroadcastPkts  : 0         , etherStatsMulticastPkts : 30

  etherStatsUndersizePkts  : 0         , etherStatsOversizePkts  : 0

  etherStatsFragments      : 0         , etherStatsJabbers       : 0

  etherStatsCRCAlignErrors : 0         , etherStatsCollisions    : 0

  etherStatsDropEvents (insufficient resources): 0

  Packets received according to length (etherStatsPktsXXXtoYYYOctets):

  64     : 5         ,  65-127  : 10         ,  128-255  : 15

  256-511: 0         ,  512-1023: 0         ,  1024-max: 0

Table 2-6 Description on the fields of the display rmon statistics command

Field

Description

Statistics entry 3

Index number of the statistics information table

abc

Entry owner

VALID

The entry corresponding to this index is valid.

Interface

Port

etherStatsOctets

Number of received bytes

etherStatsPkts

Number of received packets

etherStatsBroadcastPkts

Number of received broadcast packets

etherStatsMulticastPkts

Number of received multicast packets

etherStatsUndersizePkts

Number of received undersized packets

etherStatsOversizePkts

Number of received oversized packets

etherStatsFragments

Number of received undersized CRC error packets

etherStatsJabbers

Number of received oversized CRC error packets

etherStatsCRCAlignErrors

Number of received CRC error packets

etherStatsCollisions

Number of received collision packets

etherStatsDropEvents

Events of dropping packets (network resources are insufficient)

Packets received according to length

Number of received packets, which are made statistics by byte length

 

2.1.7  rmon alarm

Syntax

rmon alarm entry-number alarm-variable sampling-time { delta | absolute } rising_threshold threshold-value1 event-entry1 falling_threshold threshold-value2 event-entry2 [ owner text ]

undo rmon alarm entry-number

View

System view

Parameters

entry-number: Alarm entry line number, in the range of 1 to 65535.

alarm-variable: Alarm variable, a string comprising 1 to 256 characters in dotted node OID format (such as 1.3.6.1.2.1.2.1.10.1, or ifInOctets.1). Only the variables that can be resolved to ASN.1 INTEGER data type (that is, INTEGER, Counter, Gauge, or TimeTicks) can be used as alarm variables.

sampling-time: Sampling interval (in seconds), in the range of 5 to 65,535.

delta: Specifies to sample increments (that is, the current increment with regard to the latest sample)

absolute: Specifies to sample absolute values.

rising_threshold threshold-value1: Specifies the upper threshold. The threshold-value1 argument ranges from 0 to 2,147,483,647.

event-entry1: Index of the event entry corresponding to the upper threshold, in the range of 1 to 65,535.

falling_threshold threshold-value2: Specifies the lower threshold. The threshold-value2 argument ranges from 0 to 2,147,483,647.

event-entry2: Index of the event entry corresponding to the lower threshold, in the range of 1 to 65,535.

owner text: Specifies the owner of the entry. The text argument is a string comprising 1 to 127 characters.

Description

Use the rmon alarm command to add an alarm entry to the alarm table.

Use the undo rmon alarm command to remove an alarm entry from the alarm table.

You can use the rmon alarm command to define an alarm entry so that a specific alarm event can be triggered under specific circumstances. The act (such as logging and sending trap messages to the NMS) taken after an alarm event occurs is determined by the corresponding alarm event.

With an alarm entry defined in an alarm group, a network device performs the following operations accordingly:

l           Sample the defined alarm variables (alarm-variable) once in each specified period, which is specified by the sampling-time argument.

l           Compare the sampled value with the set threshold and perform the corresponding operations, as described in Table 2-7.

Table 2-7 Sample value and the corresponding operation

Comparison

Operation

The sample value is larger than or equal to the set upper threshold (threshold-value1)

Trigger the event identified by the event-entry1 argument

The sample value is smaller than the set lower threshold (threshold-value2)

Trigger the event identified by the event-entry2 argument

 

&  Note:

l      Before adding an alarm entry, you need to use the rmon event command to define the events to be referenced by the alarm entry.

l      Make sure the node to be monitored exists before executing the rmon alarm command.

 

Examples

# Add the alarm entry numbered 1 as follows:

l           The node to be monitored: 1.3.6.1.2.1.16.1.1.1.4.1

l           Sampling interval: 10 seconds

l           Upper threshold: 50

l           The event-entry1 argument identifies event 1.

l           Lower threshold: 5

l           The event-entry2 argument identifies event 2

l           Owner: user1.

<H3C> system-view

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

[H3C] rmon event 1 log

[H3C] rmon event 2 none

[H3C]rmon alarm 1 1.3.6.1.2.1.16.1.1.1.4.1 10 absolute rising_threshold 50 1 falling_threshold 5 2 owner user1

# Remove the alarm entry numbered 15 from the alarm table.

[H3C] undo rmon alarm 15

2.1.8  rmon event

Syntax

rmon event event-entry [ description string ] { log | trap trap-community | log-trap log-trapcommunity | none } [ owner text ]

undo rmon event event-entry

View

System view

Parameters

event-entry: Event entry line number, in the range of 1 to 65535.

description string: Specifies the event description, a string comprising 1 to 127 characters.

log: Specifies log events.

trap trap-community: Defines the event as a trap event and specifies the community name of the NMS that receives the trap messages.

log-trap log-trapcommunity: Defines the event as a log and trap event and specifies the community name of the NMS that receives the trap messages.

none: Specifies that the event triggers no action.

owner text: Specifies the owner of the event entry. The text argument is a string comprising 1 to 127 characters.

Description

Use the rmon event command to add an entry to the event table.

Use the undo rmon event command to remove an entry from the event table.

When adding an event entry to an event table, you need to specify the event index. You need also to specify the corresponding actions, including logging the event, sending trap messages to the NMS, and the both, for the network device to perform corresponding operation when an alarm referencing the event is triggered.

Examples

# Add the event entry numbered 10 to the event table and configure it to be a log event.

<H3C>system-view

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

[H3C] rmon event 10 log

2.1.9  rmon history

Syntax

rmon history entry-number buckets number interval sampling-interval [ owner text ]

undo rmon history entry-number

View

Ethernet port view

Parameters

entry-number: History entry index, in the range of 1 to 65535.

buckets number: Specifies the size of the history table that corresponds to the entry, in the range of 1 to 65535. Currently the device only supports 1 to 10. If you enter an argument greater than 10, the actual table size is still 10.

interval sampling-interval: Specifies the sampling interval (in seconds). The sampling-interval argument ranges from 5 to 3,600.

owner text: Specifies the owner of the entry, a string comprising 1 to 127 characters.

Description

Use the rmon history command to add an entry to a history control table.

Use the undo rmon history command to remove an entry from a history control table.

You can use the rmon history command to sample a specific port. You can also set the sampling interval and the number of the samples that can be saved. After you execute this command, the RMON system samples the port periodically and stores the samples for future retrieval. The sampled information includes utilization, the number of errors, and total number of packets.

You can use the display rmon history command to display the statistics of the history control entry.

Examples

# Create the history control entry numbered 1 for Ethernet 2/0/1 port, with the table size being 10, the sampling interval being 5 seconds, and the owner being user1.

<H3C> system-view

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

[H3C]interface Ethernet 2/0/1

[H3C-Ethernet2/0/1]rmon history 1 buckets 10 interval 5 owner user1

# Remove the history control entry numbered 15.

[H3C-Ethernet2/0/1] undo rmon history 15

2.1.10  rmon prialarm

Syntax

rmon prialarm entry-number prialarm-formula prialarm-des sampling-timer { delta | absolute | changeratio } rising_threshold threshold-value1 event-entry1 falling_threshold threshold-value2 event-entry2 entrytype { forever | cycle cycle-period } [ owner text ]

undo rmon prialarm entry-number

View

System view

Parameters

entry-number: Extended alarm entry index, in the range of 1 to 65535.

prialarm-formula: Expression used to perform calculation on the alarm variables, a string comprising 1 to 256 characters. The alarm variables in the expression must be represented by OIDs, for example, (.1.3.6.1.2.1.2.1.10.1)*8. The operations available are addition, subtraction, multiplication and division operations. The operation results are rounded to values that are of long integer type. To prevent invalid operation results, make sure the operation results of each step are valid long integers.

prialarm-des: Alarm description, a string of 1 to 256 characters.

sampling-timer: Sampling interval (in seconds), in the range of 10 to 65,535.

delta | absolute | changeratio: Specifies sample type, which can be deltas, absolute values or change ratios.

threshold-value1: Upper threshold, in the range of 0 to 4,294,967,295.

event-entry1: Index of the event entry that corresponds to the upper threshold, in the range of 0 to 65535.

threshold-value2: Lower threshold, in the range of 0 to 4,294,967,295.

event-entry2: Index of the event entry that corresponds to the lower threshold, in the range of 0 to 65535.

forever: Specifies the alarm entry is valid indefinitely.

cycle: Specifies the alarm entry is valid in a defined period.

cycle-period: Period in which an entry is valid, in seconds, ranging from 0 to 4,294,967,295.

owner text: Specifies the owner of the alarm entry, a string of 1 to 127 characters.

Description

Use the rmon prialarm command to create an extended alarm entry in an extended RMON alarm table.

Use the undo rmon prialarm command to remove a specified extended alarm entry.

The maximum number of instances in a table varies with the hardware resources.

 

&  Note:

l      Before adding an extended alarm entry, you need to use the rmon event command to define the events to be referenced by the entry.

l      Make sure the node to be monitored exists before executing the rmon event command.

l      You can define up to 50 extended alarm entries.

 

With an extended alarm entry defined in an extended alarm group, the network devices perform the following operations accordingly:

l           Sampling the alarm variables referenced in the defined extended alarm expressions (prialarm-formula) once in each period specified by the sampling-timer argument.

l           Performing operations on sampled values according to the defined extended alarm expressions (prialarm-formula).

l           Comparing the operation result with the set thresholds and performing corresponding operations, as described in Table 2-8.

Table 2-8 Operation result and corresponding operation

Comparison

Operation

The operation result is larger than or equal to the set upper threshold (threshold-value1)

Triggering the event identified by the event-entry1 argument

The operation result is smaller than or equal to the set lower threshold (threshold-value2)

Triggering the event identified by the event-entry2 argument

 

Examples

# Add the extended alarm entry numbered 2 as follows:

l           Perform operations on the corresponding alarm variables using the expression ((1.3.6.1.2.1.16.1.1.1.4.1)*100).

l           Sampling interval: 10 seconds

l           Upper threshold: 50

l           Lower threshold: 5

l           Event 1 is triggered when the change ratio is larger than the upper threshold.

l           Event 2 is triggered when the change ratio is less than the lower threshold.

l           The alarm entry is valid forever.

l           Entry owner: user1

<H3C> system-view

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

[H3C]interface Ethernet 2/0/1

[H3C-Ethernet2/0/1] rmon statistics 1

[H3C-Ethernet2/0/1] quit

[H3C] rmon prialarm 2 ((.1.3.6.1.2.1.16.1.1.1.4.1)*100) test 10 changeratio rising_threshold 50 1 falling_threshold 5 2 entrytype forever owner user1

 # Remove the extended alarm entry numbered 2 from the extended alarm table.

[H3C] undo rmon prialarm 2

2.1.11  rmon statistics

Syntax

rmon statistics entry-number [ owner text ]

undo rmon statistics entry-number

View

Ethernet port view

Parameters

entry-number: Statistics entry Index, in the range of 1 to 65535.

owner text: Specifies the owner of the entry, a string pf 1 to 127 characters.

Description

Use the rmon statistics command to add an entry to the statistics table.

Use the undo rmon statistics command to remove an entry from the statistics table.

The RMON statistics management function is used to take statistics of the usage of the monitored ports and errors occurring to them. The statistics includes the number of the following items: collisions, CRC error packets, undersized (or oversized) packets, broadcast and multicast packets, received bytes and received packets.

 

&  Note:

For each port, only one statistics entry can be created, that is to say, if one statistics entry was already created for a given port, creation of another statistics entry with a different index number for the same port will not succeed.

 

You can use the display rmon statistics command to display the statistics entries.

Examples

# Add the statistics entry numbered 20 to take statistics of Ethernet 2/0/1.

<H3C>system-view

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

[H3C]interface Ethernet 2/0/1

[H3C-Ethernet2/0/1] rmon statistics 20

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网