- Table of Contents
-
- H3C WX6103 Access Controller Switch Interface Board Command Reference-6W102
- 00-Preface
- 01-Login Commands
- 02-VLAN Commands
- 03-IP Addressing and IP Performance Commands
- 04-QinQ-BPDU Tunneling Commands
- 05-Port Correlation Commands
- 06-Link Aggregation Commands
- 07-MAC Address Table Management Commands
- 08-Port Security Commands
- 09-MSTP Commands
- 10-IP Routing-GR Overview Commands
- 11-IPv4 Routing Commands
- 12-IP Source Guard Commands
- 13-DLDP Commands
- 14-Multicast Commands
- 15-LLDP Commands
- 16-sFlow Commands
- 17-ARP Commands
- 18-DHCP Commands
- 19-ACL Commands
- 20-QoS Commands
- 21-Port Mirroring Commands
- 22-UDP Helper Commands
- 23-SNMP-RMON Commands
- 24-NTP Commands
- 25-DNS Commands
- 26-File System Management Commands
- 27-Information Center Commands
- 28-System Maintaining and Debugging Commands
- 29-NQA Commands
- 30-SSH Commands
- 31-SSL-HTTPS Commands
- 32-PKI Commands
- 33-Track Commands
- 34-Index
- Related Documents
-
Title | Size | Download |
---|---|---|
23-SNMP-RMON Commands | 176.29 KB |
display snmp-agent local-engineid
snmp-agent trap if-mib link extended·
snmp-agent usm-user { v1 | v2c }
The term switch in this document refers to a switch in a generic sense or an access controller configured with the switching function unless otherwise specified.
SNMP Configuration Commands
display snmp-agent local-engineid
Syntax
display snmp-agent local-engineid
View
Any view
Parameters
None
Description
Use the display snmp-agent local-engineid command to display the local SNMP agent engine ID.
SNMP engine ID identifies an SNMP entity uniquely within an SNMP domain. SNMP engine is an indispensable part of an SNMP entity. It provides the SNMP message allocation, message handling, authentication, and access control.
Examples
# Display the local SNMP agent engine ID.
<Sysname> display snmp-agent local-engineid
SNMP local EngineID: 000063A27F000001000071DA
display snmp-agent community
Syntax
display snmp-agent community [ read | write ]
View
Any view
Parameters
read: Displays the information of communities with read-only access right.
write: Displays the information of communities with read and write access right.
Description
Use the display snmp-agent community command to display community information for SNMPv1 or SNMPv2c.
Examples
# Display the information for all the current communities.
<Sysname> display snmp-agent community
Community name: aa
Group name: aa
Acl:2001
Storage-type: nonVolatile
Community name: bb
Group name: bb
Storage-type: nonVolatile
Table 1-1 display snmp-agent community command output description
Field |
Description |
Community name |
Community name |
Group name |
SNMP group name |
Acl |
The number of the ACL in use |
Storage-type |
Storage type, which could 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 permitted, but deletion forbidden l readOnly: Read only, that is, no modification, no deletion l other: Other storage types |
display snmp-agent group
Syntax
display snmp-agent group [ group-name ]
View
Any view
Parameters
group-name: Specifies the SNMP group name, a string of 1 to 32 characters, case sensitive.
Description
Use the display snmp-agent group command to display information for the SNMP agent group, including group name, security model, MIB view, storage type, and so on. Absence of the group-name parameter indicates that information for all groups will be displayed.
Examples
# Display the information of all SNMP agent groups.
<Sysname> display snmp-agent group
Group name: aa
Security model: v3 noAuthnoPriv
Readview: ViewDefault
Writeview: <no specified>
Notifyview: <no specified>
Storage-type: nonVolatile
Table 1-2 display snmp-agent group command output description
Field |
Description |
Group name |
SNMP group name |
Security model |
Security model of the SNMP group, which can be: authPriv (authentication with privacy), authNoPriv (authentication without privacy), or noAuthNoPriv (no authentication no privacy). |
Readview |
The read only MIB view associated with the SNMP group |
Writeview |
The writable MIB view associated with the SNMP group |
Notifyview |
The notify MIB view associated with the SNMP group, the view with entries that can generate Trap messages |
Storage-type |
Storage type, which includes: volatile, nonVolatile, permanent, readOnly, and other. For detailed information, refer to Table 1-1. |
display snmp-agent mib-view
Syntax
display snmp-agent mib-view [ exclude | include | viewname view-name ]
View
Any view
Parameters
exclude: Specifies to display SNMP MIB views of the excluded type.
include: Specifies to display SNMP MIB views of the included type.
viewname view-name: Displays view with a specified name, where view-name is the name of the specified MIB view.
Description
Use the display snmp-agent mib-view command to display SNMP MIB view information. Absence of the view-name parameter indicates that information for all MIB views will be displayed.
Examples
# Display the current SNMP MIB views.
<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
Table 1-3 display snmp-agent mib-view command output description
Field |
Description |
View name |
MIB view name |
MIB Subtree |
MIB subtree corresponding to the MIB view |
Subtree mask |
MIB subtree mask |
Storage-type |
Storage type |
View Type |
View type, which can be included or excluded Included indicates that all nodes of the MIB tree are included in current view. Excluded indicates that not all nodes of the MIB tree are included in current view. |
View status |
The status of MIB view |
display snmp-agent statistics
Syntax
display snmp-agent statistics
View
Any view
Parameters
None
Description
Use the display snmp-agent statistics command to display SNMP statistics.
Examples
# Display the statistics on the current SNMP.
<Sysname> display snmp-agent statistics
0 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
0 Messages passed from the SNMP entity
0 SNMP PDUs which had badValue error-status
0 SNMP PDUs which had genErr error-status
0 SNMP PDUs which had noSuchName error-status
0 SNMP PDUs which had tooBig error-status (Maximum packet size 1500)
0 MIB objects retrieved successfully
0 MIB objects altered successfully
0 GetRequest-PDU accepted and processed
0 GetNextRequest-PDU accepted and processed
0 GetBulkRequest-PDU accepted and processed
0 GetResponse-PDU accepted and processed
0 SetRequest-PDU accepted and processed
0 Trap PDUs accepted and processed
0 Alternate Response Class PDUs dropped silently
0 Forwarded Confirmed Class PDUs dropped silently
Table 1-4 display snmp-agent statistics command output description
Field |
Description |
Messages delivered to the SNMP entity |
Number of packets delivered to the SNMP agent |
Messages which were for an unsupported version |
Number of packets from a device with an SNMP version that is not supported by the current SNMP agent |
Messages which used a SNMP community name not known |
Number of packets that use an unknown community name |
Messages which represented an illegal operation for the community supplied |
Number of packets with operations that breach the access right of a community |
ASN.1 or BER errors in the process of decoding |
Number of packets with ASN.1 or BER errors in the process of decoding |
Messages passed from the SNMP entity |
Number of packets sent by an SNMP Agent |
SNMP PDUs which had badValue error-status |
Number of SNMP PDUs with a badValue error |
SNMP PDUs which had genErr error-status |
Number of SNMP PDUs with a genErr error |
SNMP PDUs which had noSuchName error-status |
Number of PDUs with a noSuchName error |
SNMP PDUs which had tooBig error-status (Maximum packet size 1500) |
Number of PDUs with a tooBig error (the maximum packet size is 1,500 bytes) |
MIB objects retrieved successfully |
Number of MIB objects that have been successfully retrieved |
MIB objects altered successfully |
Number of MIB objects that have been successfully modified |
GetRequest-PDU accepted and processed |
Number of get requests that have been received and processed |
GetNextRequest-PDU accepted and processed |
Number of getNext requests that have been received and processed |
GetBulkRequest-PDU accepted and processed |
Number of getBulk requests that have been received and processed |
GetResponse-PDU accepted and processed |
Number of get responses that have been received and processed |
SetRequest-PDU accepted and processed |
Number of set requests that have been received and processed |
Trap PDUs accepted and processed |
Number of Trap messages that have been received and processed |
Alternate Response Class PDUs dropped silently |
Number of dropped response packets |
Forwarded Confirmed Class PDUs dropped silently |
Number of forwarded packets that have been dropped |
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 network administrator.
location: Displays the location information of the current device.
version: Displays the version of the current SNMP agent.
Description
Use the display snmp-agent sys-info command to display the current SNMP system information.
If no keyword is specified, all SNMP agent system information will be displayed.
Examples
# Display the current SNMP agent system information.
<Sysname> display snmp-agent sys-info
The contact person for this managed node:
Hangzhou H3C Tech. Co., Ltd.
The physical location of this node:
Hangzhou, China
SNMP version running in the system:
SNMPv3
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 send the Trap messages and whether their Trap sending is enabled or not. If a module comprises of multiple sub-modules, then as long as one sub-module has the sending of Trap messages enabled, the whole module will be displayed as being enabled with the Trap sending.
Related commands: snmp-agent trap enable.
Examples
# Display the modules that can send the Trap messages and whether their Trap sending is enabled or not.
<Sysname> display snmp-agent trap-list
bgp trap enable
configuration trap enable
flash trap enable
ospf trap enable
standard trap enable
system trap enable
vrrp trap enable
Enable traps: 7; Disable traps: 0
In the above output, enable indicates that the module is enabled with the Trap sending whereas disable indicates the Trap sending is disabled. By default, Trap sending is enabled on all modules that can send Trap messages. Use the snmp-agent trap enable command to manually configure whether the Trap sending is enabled or not.
display snmp-agent usm-user
Syntax
display snmp-agent usm-user [ engineid engineid | username user-name | group group-name ] *
View
Any view
Parameters
engineid engineid: Displays SNMPv3 user information for a specified engine ID, where engineid indicates the SNMP engine ID.
username user-name: Displays SNMPv3 user information for a specified user name. It is case sensitive.
group group-name: Displays SNMPv3 user information for a specified SNMP group name. It is case sensitive.
Description
Use the display snmp-agent usm-user command to display SNMPv3 user information.
Examples
# Display SNMPv3 information for the user aa.
<Sysname> display snmp-agent usm-user username aa
User name: aa
Group name: mygroupv3
Engine ID: 000063A27F000001000071DA
Storage-type: nonVolatile
UserStatus: active
Table 1-5 display snmp-agent usm-user command output description
Field |
Description |
User name |
SNMP user name |
Group name |
SNMP group name |
Engine ID |
Engine ID for an SNMP entity |
Storage-type |
Storage type |
UserStatus |
SNMP user status |
enable snmp trap updown
Syntax
enable snmp trap updown
undo enable snmp trap updown
View
Interface view
Parameters
None
Description
Use the enable snmp trap updown command to enable the sending of Trap messages for interface state change (linkup/linkdown Trap messages).
Use the undo enable snmp trap updown command to disable the sending of linkup/linkdown SNMP Trap messages on an interface.
By default, the sending of linkup/linkdown SNMP Trap messages is enabled.
Note that:
To enable an interface to send SNMP Traps when its state changes, you need to enable the Link up/down Trap packet transmission function on an interface and globally. Use the enable snmp trap updown command to enable this function on an interface, and use the snmp-agent trap enable [ standard [ linkdown | linkup ] * ] command to enable this function globally.
Related commands: snmp-agent target-host, snmp-agent trap enable.
Examples
# Enable the sending of linkup/linkdown SNMP Trap messages on the port GigabitEthernet 0/0/1 and use the community name public.
<Sysname> system-view
[Sysname] snmp-agent trap enable
[Sysname] snmp-agent target-host trap address udp-domain 10.1.1.1 params securityname public
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] enable snmp trap updown
snmp-agent
Syntax
snmp-agent
undo snmp-agent
View
System view
Parameters
None
Description
Use the snmp-agent command to enable SNMP agent.
Use the undo snmp-agent command to disable SNMP agent.
By default, SNMP agent is disabled.
Examples
# Disable the current SNMP agent.
<Sysname> system-view
[Sysname] undo snmp-agent
snmp-agent calculate-password
Syntax
snmp-agent calculate-password plain-password mode { md5 | sha } { local-engineid | specified-engineid string }
View
System view
Default Level
3: Manage level
Parameters
plain-password: Plain text password to be encrypted.
mode: Specifies to encrypt a plain text password by authentication.
l md5: Specifies the authentication protocol to be HMAC-MD5-96.
l sha: Specifies the authentication protocol to be HMAC-SHA-96.
local: Represents a local SNMP entity user.
local-engineid: Specifies to use local engine ID to calculate cipher text password.
specified-engineid: Specifies to use user-defined engine ID to calculate cipher text password.
string: The engine ID string, an even number of hexadecimal characters, in the range 10 to 64. Its length must not be an odd number, and the all-zero and all-F strings are invalid.
Description
Use the snmp-agent calculate-password command to convert the user-defined plain text password to a cipher text password using the specified authentication mode.
Note that the cipher text password converted with the sha keyword specified in this command is a string of 40 hexadecimal characters. For an authentication password, all of the 40 hexadecimal characters are valid; while for a privacy password, only the first 32 hexadecimal characters are valid.
Related commands: snmp-agent usm-user v3.
Examples
# Use local engine ID and MD5 authentication protocol to convert the plain text password authkey.
<Sysname> system-view
[Sysname] snmp-agent calculate-password authkey mode md5 local-engineid
The secret key is: 09659EC5A9AE91BA189E5845E1DDE0CC
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 the community has read only access right to the MIB objects, that is, the community can only inquire MIB information.
write: Indicates that the community has read and write access right to the MIB objects, that is, the community can configure MIB information.
community-name: Community name, a string of 1 to 32 characters.
acl acl-number: ACL for the community name, with acl-number indicating the ACL number, in the range 2,000 to 2,999.
mib-view view-name: Specifies the MIB view name associated with community-name, where view-name represents the MIB view name, a string of 1 to 32 characters. If no keyword is specified, the default view is ViewDefault (The view created by the system after SNMP agent is enabled).
Description
Use the snmp-agent community command to configure a new SNMP community. Parameters to be configured include access right, community name, ACL, and accessible MIB views.
Use the undo snmp-agent community command to delete a specified community.
The community name configured with this command is only valid for the SNMP v1 and v2c agent.
Examples
# Configure a community with the name of comaccess that has read-only access right.
<Sysname> system-view
[Sysname] snmp-agent community read comaccess
# Delete the community comaccess.
<Sysname> system-view
[Sysname] undo snmp-agent community comaccess
snmp-agent group
Syntax
The following syntax applies to SNMPv1 and SNMP v2c:
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
The following syntax applies to 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: SNMPv1.
v2c: SNMPv2c.
v3: SNMPv3.
group-name: Group name, a string of 1 to 32 characters.
authentication: Specifies the security model of the SNMP group to be authentication only (without privacy).
privacy: Specifies the security model of the SNMP group to be authentication and privacy.
read-view read-view: Read view, a string of 1 to 32 characters.
write-view write-view: Write view, a string of 1 to 32 characters.
notify-view notify-view: Notify view, for sending Trap messages, a string of 1 to 32 characters.
acl acl-number: Specifies an ACL by its number, in the range 2000 to 2999.
Description
Use the snmp-agent group command to configure a new SNMP group and specify its access right.
Use the undo snmp-agent group command to delete a specified SNMP group.
By default, SNMP groups configured by the snmp-agent group v3 command use a no-authentication-no-privacy security model.
Related commands: snmp-agent mib-view, snmp-agent usm-user.
Examples
# Create an SNMP group group1 on an SNMPv3 enabled device, no authentication, no privacy.
<Sysname> system-view
[Sysname] snmp-agent group v3 group1
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. Its length must not be an odd number, and the all-zero and all-F strings are invalid.
Description
Use the snmp-agent local-engineid command to configure a local engine ID for an SNMP entity.
Use the undo snmp-agent local-engineid command to restore the default.
By default, the engine ID of a device is the combination of company ID and device ID. Device ID varies by product; it could be an IP address, a MAC address, or a self-defined string of hexadecimal numbers.
Notice that if the newly configured engine ID is not the same as the one used for creating the USM user, the user is invalid.
Related commands: snmp-agent usm-user.
Examples
# Configure the local engine ID as 123456789A.
<Sysname> system-view
[Sysname] snmp-agent local-engineid 123456789A
snmp-agent log
Syntax
snmp-agent log { all | get-operation | set-operation }
undo snmp-agent log { all | get-operation | set-operation }
View
System view
Parameters
all: Enables logging of SNMP GET and SET operations.
get-operation: Enables logging of SNMP GET operation.
set-operation: Enables logging of SNMP SET operation.
Description
Use the snmp-agent log command to enable SNMP logging.
Use the undo snmp-agent log command to restore the default.
By default, SNMP logging is disabled.
If a specified SNMP logging is enabled, when NMS performs a specified operation to SNMP Agent, the latter records the operation-related information and saves it to the information center.
Examples
# Enable logging of SNMP GET operation.
<Sysname> system-view
[Sysname] snmp-agent log get-operation
# Enable logging of SNMP SET operation.
<Sysname> system-view
[Sysname] snmp-agent log set-operation
snmp-agent mib-view
Syntax
snmp-agent mib-view { excluded | included } view-name oid-tree [ mask mask-value ]
undo snmp-agent mib-view view-name
View
System view
Parameters
excluded: Indicates that not all nodes of the MIB tree are included in current view.
included: Indicates that all nodes of the MIB tree are included in current view.
view-name: View name, a string of 1 to 32 characters.
oid-tree: MIB subtree. It can only be an OID string, such as 1.4.5.3.1, or an object name string, such as “system”. OID is made up of a series of integers, which marks the position of the node in the MIB tree and uniquely identifies a MIB object.
mask mask-value: Mask for an object tree, in the range 1 to 32 hexadecimal digits. It must be an even digit.
Description
Use the snmp-agent mib-view command to create or update MIB view information so that MIB objects can be specified.
Use the undo snmp-agent mib-view command to delete the current configuration.
By default, MIB view name is ViewDefault.
You can use the display snmp-agent mib-view command to view the access right of the default view. Also, you can use the undo snmp-agent mib-view command to remove the default view, after that, however, you cannot read or write all MIB nodes on Agent.
Related commands: snmp-agent group.
Examples
# Create a MIB view mibtest, which includes all objects of the subtree mib-2.
<Sysname> system-view
[Sysname] snmp-agent mib-view included mibtest 1.3.6.1
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 number of bytes of an SNMP packet that can be received or sent by an agent, in the range 484 to 17,940. The default value is 1,500 bytes.
Description
Use the snmp-agent packet max-size command to configure the maximum number of bytes in an SNMP packet that can be received or sent by an agent.
Use the undo snmp-agent packet max-size command to restore the default packet size.
Examples
# Configure the maximum number of bytes that can be received or sent by an SNMP agent as 1,042 bytes.
<Sysname> system-view
[Sysname] snmp-agent packet max-size 1042
snmp-agent sys-info
Syntax
snmp-agent sys-info { contact sys-contact | location sys-location | version { all | { v1 | v2c | v3 }* } }
undo snmp-agent sys-info { contact | location | version { all | { v1 | v2c | v3 }* } }
View
System view
Parameters
contact sys-contact: A string of 1 to 200 characters that describes the contact information for system maintenance.
location sys-location: A string of 1 to 200 characters that describes the location of the device.
version: The SNMP version in use.
l all: Specifies SNMPv1, SNMPv2c, and SNMPv3.
l v1: SNMPv1.
l v2c: SNMPv2c.
l v3: SNMPv3.
Description
Use the snmp-agent sys-info command to configure system information, including the contact information, and the location, and enable the specified SNMP version.
Use the undo snmp-agent sys-info command to restore the default system information and disable the specified SNMP version.
By default, the location information is Hangzhou, China, version is SNMPv3, and the contact is Hangzhou H3C Tech. Co., Ltd.
Related commands: display snmp-agent sys-info.
Network maintenance engineers can use the system contact information to get in touch with the manufacturer in case of network failures. The system location information is a management variable under the system branch as defined in RFC1213-MIB, it identifies the location of the managed object.
Examples
# Configure the contact information as “Dial System Operator at beeper # 27345”.
<Sysname> system-view
[Sysname] snmp-agent sys-info contact Dial System Operator at beeper # 27345
snmp-agent target-host
Syntax
snmp-agent target-host trap address udp-domain { ip-address | ipv6 ipv6-address } [ udp-port port-number ] [ vpn-instance vpn-instance-name ] params securityname security-string [ v1 | v2c | v3 [ authentication | privacy ] ]
undo snmp-agent target-host { ip-address | ipv6 ipv6-address } securityname security-string [ vpn-instance vpn-instance-name ]
View
System view
Parameters
trap: Specifies the host to be the Trap host.
address: Specifies the IP address of the target host for the SNMP messages.
udp-domain: Indicates that the Trap message is transmitted using UDP.
ip-address: The IPv4 address of the Trap host.
ipv6 ipv6-address: Specifies that the target host that receives Trap messages uses the IPv6 address.
vpn-instance vpn-instance-name: Specifies the VPN where the host receiving Traps reside, where vpn-instance-name indicates the VPN instance name and is a string of 1 to 31 characters. It is case sensitive and is applicable only in a network supporting IPv4.
udp-port port-number: Specifies the number of the port that receives Trap messages.
params securityname security-string: Specifies authentication related parameters, which is SNMPv1 or SNMPv2c community name or an SNMPv3 user name, a string of 1 to 32 characters.
v1: SNMPv1.
v2c: SNMPv2c.
v3: SNMPv3.
authentication: Specifies the security model to be authentication without privacy.
privacy: Specifies the security model to be authentication with privacy.
Description
Use the snmp-agent target-host command to configure the related settings for a Trap target host.
Use the undo snmp-agent target-host command to remove the current settings.
To enable the device to send Traps, you need to use the snmp-agent target-host command in combination with the snmp-agent trap enable and the enable snmp trap updown commands.
Related commands: enable snmp trap updown, snmp-agent trap enable, snmp-agent trap source, snmp-agent trap life.
Examples
# Enable the device to send SNMP Traps to 10.1.1.1, using the community name of public.
<Sysname> system-view
[Sysname] snmp-agent trap enable standard
[Sysname] snmp-agent target-host trap address udp-domain 10.1.1.1 params securityname public
# Enable the device to send SNMP Traps to the device which is in VPN 1 and has an IP address of 10.1.1.1, using the community name of public.
<Sysname> system-view
[Sysname] snmp-agent trap enable standard
[Sysname] snmp-agent target-host trap address udp-domain 10.1.1.1 vpn-instance vpn1 params securityname public
snmp-agent trap enable
Syntax
snmp-agent trap enable [ bgp | configuration | flash | ospf [ process-id ] [ ospf-trap-list ] | standard [ authentication | coldstart | linkdown | linkup | warmstart ]* | system | vrrp [ authfailure | newmaster ] ]
undo snmp-agent trap enable [ bgp | configuration | flash | ospf [ process-id ] [ ospf-trap-list ] | standard [ authentication | coldstart | linkdown | linkup | warmstart ]* | system | vrrp [ authfailure | newmaster ] ]
View
System view
Parameters
bgp: Enables the sending of BGP Trap messages.
configuration: Enables the sending of configuration Trap messages.
flash: Enables the sending of FLASH Trap messages.
ospf [ process-id ] [ ospf-trap-list ]: Enables the sending of OSPF Trap messages. The parameter process-id is the process ID and spf-trap-list is the Trap packet list.
standard: Enables the sending of standard Trap messages.
l authentication: Enables the sending of authentication failure Trap messages in the event of authentication failure.
l coldstart: Sends coldstart Trap messages when the device restarts.
l linkdown: Sends linkdown Trap messages when the port is in a linkdown status. It should be configured globally.
l linkup: Sends linkup Trap messages when the port is in a linkup status. It should be configured globally.
l warmstart: Sends warmstart Trap messages when the SNMP restarts.
l system: Sends H3C-SYS-MAN-MIB (a private MIB) Trap messages.
l vrrp [ authfailure | newmaster ]: Sends VRRP Trap messages.
l authfailure: Sends authentication failure VRRP Trap messages.
l newmaster: Enables the sending of VRRP newmaster Trap messages when the device becomes the Master.
Description
Use the snmp-agent trap enable command to enable the device to send Trap messages globally.
Use the undo snmp-agent trap enable command to disable the device from sending Trap messages.
By default, the device is enabled to send all types of Trap messages.
Note that:
To enable an interface to send SNMP Traps when its state changes, you need to enable the Link up/down Trap packet transmission function on an interface and globally. Use the enable snmp trap updown command to enable this function on an interface, and use the snmp-agent trap enable [ standard [ linkdown | linkup ] * ] command to enable this function globally.
Related commands: snmp-agent target-host, enable snmp trap updown.
Examples
# Enable the device to send SNMP authentication failure packets to 10.1.1.1, using the community name of public.
<Sysname> system-view
[Sysname] snmp-agent target-host trap address udp-domain 10.1.1.1 params securityname public
[Sysname] snmp-agent trap enable standard authentication
snmp-agent trap if-mib link extended
Syntax
snmp-agent trap if-mib link extended
undo snmp-agent trap if-mib link extended
View
System view
Parameters
None
Description
Use the snmp-agent trap if-mib link extended command to extend the standard linkUp/linkDown Trap messages defined in RFC. The extended linkUp/linkDown Trap messages comprise the standard linkUp/linkDown Trap messages defined in RFC plus interface description and interface type.
Use the undo snmp-agent trap if-mib link extended command to restore the default.
By default, standard linkUp/linkDown Trap messages defined in RFC are used.
Note that after this command is configured, the device sends extended linkUp/linkDown Trap messages. If the extended messages are not supported on NMS, the device may not be able to resolute the messages.
Examples
# Extend standard linkUp/linkDown Trap messages defined in RFC.
[Sysname] snmp-agent trap if-mib link extended
snmp-agent trap life
Syntax
snmp-agent trap life seconds
undo snmp-agent trap life
View
System view
Parameters
seconds: Time-out time, in the range 1 to 2,592,000 seconds.
Description
Use the snmp-agent trap life command to configure the life time for Traps, which will be discarded when their life time expires.
Use the undo snmp-agent trap life command to restore the default life time for Trap messages.
By default, the life time for SNMP Traps is 120 seconds.
Related commands: snmp-agent trap enable, snmp-agent target-host.
Examples
# Configure the life time for Trap messages as 60 seconds.
<Sysname> system-view
[Sysname] snmp-agent trap life 60
snmp-agent trap queue-size
Syntax
snmp-agent trap queue-size size
undo snmp-agent trap queue-size
View
System view
Parameters
size: The queue size for the Trap messages, in the range 1 to 1,000.
Description
Use the snmp-agent trap queue-size command to configure the size of the Trap queue.
Use the undo snmp-agent trap queue-size command to restore the default queue size.
By default, up to 100 Trap messages can be stored in the Trap queue.
Related commands: snmp-agent trap enable, snmp-agent target-host, snmp-agent trap life.
Examples
# Configure the size of the Trap queue as 200.
<Sysname> system-view
[Sysname] snmp-agent trap queue-size 200
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-number : Specifies the interface type and interface number. The parameter interface-number represents the main interface number. The parameter subnumber represents the subinterface number and ranges from 1 to 4,094.
Description
Use the snmp-agent trap source command to specify the source IP address contained in the Trap message.
Use the undo snmp-agent trap source command to restore the default.
By default, SNMP chooses the IP address of an interface to be the source IP address of the Trap message.
Use this command to trace a specific event by the source IP address of a Trap message.
Note: Before you can configure the IP address of a particular interface as the source IP address of the Trap message, ensure that the interface already exists and that it has a legal IP address. Otherwise, it is likely that the configurations will either fail or be invalid.
Related commands: snmp-agent trap enable, snmp-agent target-host.
Examples
# Configure the IP address for the port VLAN-interface 1 as the source address for Trap messages.
<Sysname> system-view
[Sysname] snmp-agent trap source Vlan-interface 1
snmp-agent usm-user { v1 | v2c }
Syntax
snmp-agent usm-user { v1 | v2c } user-name group-name [ acl acl-number ]
undo snmp-agent usm-user { v1 | v2c } user-name group-name
View
System view
Default Level
3: Manage level
Parameters
v1: SNMPv1.
v2c: SNMPv2c.
user-name: User name, a string of 1 to 32 characters. It is case sensitive.
group-name: Group name, a string of 1 to 32 characters. It is case sensitive.
acl acl-number: Basic ACL, in the range 2,000 to 2,999.
Use the snmp-agent usm-user { v1 | v2c } command to add a user to an SNMP group.
Use the undo snmp-agent usm-user { v1 | v2c } command to delete a user from an SNMP group.
Execution of this command means adding of a new SNMP group.
Related commands: snmp-agent group, snmp-agent community, snmp-agent usm-user v3.
Examples
# Create a read community readCom.
<Sysname> system-view
[Sysname] snmp-agent community read readCom
# Create a v2c usm user userV2c based on the created readCom.
[Sysname] snmp-agent usm-user v2c userV2c readCom
snmp-agent usm-user v3
Syntax
snmp-agent usm-user v3 user-name group-name [ [ cipher ] authentication-mode { md5 | sha } auth-password [ privacy-mode { des56 | aes128 } priv-password ] ] [ acl acl-number ]
undo snmp-agent usm-user v3 user-name group-name { local | engineid engineid-string }
View
System view
Default Level
3: Manage level
Parameters
user-name: User name, a string of 1 to 32 characters. It is case sensitive.
group-name: Group name, a string of 1 to 32 characters. It is case sensitive.
cipher: Specifies that auth-password and priv-password are cipher text passwords.
authentication-mode: Specifies the security model to be authentication.
l md5: Specifies the authentication protocol to be HMAC-MD5-96.
l sha: Specifies the authentication protocol to be HMAC-SHA-96.
auth-password: Authentication password. If the cipher keyword is not specified, auth-password indicates a plain text password, which is a string of 1 to 64 visible characters. If the cipher keyword is specified, auth-password indicates a cipher text password. If the md5 keyword is specified, auth-password is a string of 32 hexadecimal characters. If the sha keyword is specified, auth-password is a string of 40 hexadecimal characters.
privacy-mode: Specifies the security model to be privacy.
l des56: Specifies the privacy protocol to be data encryption standard (DES).
l aes128: Specifies the privacy protocol to be advanced encryption standard (AES).
priv-password: The privacy password. If the cipher keyword is not specified, priv-password indicates a plain text password, which is a string of 1 to 64 characters. If the cipher keyword is specified, priv-password indicates a cipher text password. If the md5 keyword is specified, priv-password is a string of 32 hexadecimal characters. If the sha keyword is specified, priv-password is a string of 40 hexadecimal characters.
acl acl-number: Basic ACL, in the range 2,000 to 2,999.
local: Represents a local SNMP entity user.
engineid engineid-string: The engine ID string, an even number of hexadecimal characters, in the range 10 to 64. Its length must not be an odd number, and the all-zero and all-F strings are invalid.
Description
Use the snmp-agent usm-user v3 command to add a user to an SNMP group.
Use the undo snmp-agent usm-user v3 command to delete a user from an SNMP group.
l If you specify the cipher keyword, the system considers the arguments auth-password and priv-password as cipher text passwords. In this case, the command supports copy and paste, meaning if the engine IDs of the two devices are the same, you can copy and paste the SNMPv3 configuration commands in the configuration file on device A to device B and execute the commands on device B. The cipher text password and plain text password on the two devices are the same.
l If you do not specify the cipher keyword, the system considers the arguments auth-password and priv-password as plain text passwords. In this case, if you perform the copy and paste operation, the system will encrypt these two passwords, resulting in inconsistency of the cipher text and plain text passwords of the two devices.
Note that:
l If you use the snmp-agent usm-user v3 cipher command, the pri-password argument in this command can be obtained by the snmp-agent calculate-password command. To make the calculated cipher text password applicable to the snmp-agent usm-user v3 cipher command and have the same effect as that in the snmp-agent usm-user v3 cipher command, ensure that the same privacy protocol is specified for the two commands and the local engine ID specified in the snmp-agent usm-user v3 cipher command is consistent with the SNMP entity engine ID specified in the snmp-agent calculate-password command.
l If you execute the command without specifying the cipher keyword, the display current-configuration | include snmp command displays garbled characters of the cipher text password; if you execute the command with the cipher keyword specified, the display current-configuration | include snmp command displays the cipher text password.
l If you execute this command repeatedly to configure the same user, the last configuration takes effect.
Related commands: snmp-agent calculate-password, snmp-agent group, snmp-agent usm-user { v1 | v2c }.
Examples
# Add a user testUser to the SNMPv3 group testGroup. Configure the security model as authentication, the authentication protocol as MD5, the privacy protocol as DES56, the authentication plain text password as authkey, and the authentication cipher text password as prikey.
<Sysname> system-view
[Sysname] snmp-agent usm-user v3 testUser
testGroup authentication-mode md5
authkey privacy-mode des56 prikey
# Add a user testUser to the SNMPv3 group testGroup with the cipher keyword specified. Configure the security model as authentication and privacy, the authentication protocol as MD5, the privacy protocol as DES56, the authentication plain text password as authkey, and the authentication cipher text password as prikey
<Sysname> system-view
[Sysname] snmp-agent calculate-password authkey mode md5 local-engineid
The secret key is: 09659EC5A9AE91BA189E5845E1DDE0CC
[Sysname] snmp-agent calculate-password prikey mode md5 local-engineid
The secret key is: 800D7F26E786C4BECE61BF01E0A22705
[Sysname]
snmp-agent usm-user v3 testUser testGroup cipher
authentication-mode md5 09659EC5A9AE91BA189E5845E1DDE0CC privacy-mode des56
800D7F26E786C4BECE61BF01E0A22705
RMON Configuration Commands
display rmon alarm
Syntax
display rmon alarm [ entry-number ]
View
Any view
Parameters
entry-number: Index of an RMON alarm entry, in the range 1 to 65535. If no entry is specified, the configuration of all alarm entries is displayed.
Description
Use the display rmon alarm command to display the configuration of the specified or all RMON alarm entries.
Related commands: rmon alarm.
Examples
# Display the configuration of all RMON alarm table entries.
Alarm table 1 owned by user1 is VALID.
Samples type : absolute
Variable formula : 1.3.6.1.2.1.16.1.1.1.4.1<etherStatsOctets.1>
Sampling interval : 10(sec)
Rising threshold : 50(linked with event 1)
Falling threshold : 5(linked with event 2)
When startup enables : risingOrFallingAlarm
Latest value : 0
Table 2-1 display rmon alarm command output description
Field |
Description |
Alarm table |
Alarm entry index, 1 in this example |
owned by |
Owner of the entry, user1 in this example |
VALID |
Status of the entry identified by the index (VALID means the entry is valid, and UNDERCREATION means invalid. You can use the display rmon command to view the invalid entry and with the display current-configuration and display this commands you cannot view the corresponding rmon commands.) |
Samples type |
The sampling type (absolute in this example) |
Variable formula |
Formula for the sampling value |
Sampling interval |
Sampling interval |
Rising threshold |
Alarm rising threshold (When the sampling value is bigger than or equal to this threshold, a rising alarm is triggered.) |
Falling threshold |
Alarm falling threshold (When the sampling value is smaller than or equal to this threshold, a falling alarm is triggered.) |
When startup enables |
How an alarm can be triggered |
Latest value |
The last sampled value |
display rmon event
Syntax
display rmon event [ entry-number ]
View
Any view
Parameters
entry-number: Index of an RMON event entry, in the range 1 to 65535. If no entry is specified, the configuration of all event entries is displayed.
Description
Use the display rmon event command to display the configuration of the specified or all RMON event entries.
Displayed information includes event index, event owner, event description, action triggered by the event (such as sending log or trap messages), and last time the event occurred (the elapsed time since system initialization/startup) in seconds.
Related commands: rmon event.
Examples
# Display the configuration of RMON event table.
<Sysname> display rmon event
Event table 1 owned by user1 is VALID.
Description: null.
Will cause log-trap when triggered, last triggered at 0days 00h:02m:27s.
Table 2-2 display rmon event command output description
Field |
Description |
Event table |
Event entry number |
owned by |
Owner of the entry |
VALID |
Status of the entry identified by the index (VALID means the entry is valid, and UNDERCREATION means invalid. You can use the display rmon command to view the invalid entry and with the display current-configuration and display this commands you cannot view the corresponding rmon commands.) |
Description |
Description for the event |
cause log-trap when triggered |
The event will trigger logging and trapping. |
Last triggered at |
Last time the event was triggered |
display rmon eventlog
Syntax
display rmon eventlog [ entry-number ]
View
Any view
Parameters
entry-number: Index of an event entry, in the range 1 to 65535. If no entry number is specified, the log information for all event entries is displayed.
Description
Use the display rmon eventlog command to display log information for the specified or all event entries.
If you use the rmon event command to specify that the action of an entry includes logging, then when this event is triggered, the event log is retained in the RMON log list. You can use the display rmon eventlog command to display detailed log information including event index, current event state, time the event was logged (the elapsed time in seconds since system initialization/startup), and event description.
Examples
# Display the RMON log information for event entry 1.
<Sysname> display rmon eventlog 1
Event table 1 owned by user1 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 display rmon eventlog command output description
Field |
Description |
Event table |
Event index |
owned by |
Owner of the entry |
VALID |
Status of the entry identified by the index (VALID means the entry is valid, and UNDERCREATION means invalid. You can use the display rmon command to view the invalid entry and with the display current-configuration and display this commands you cannot view the corresponding rmon commands.) |
Generates eventLog at |
Time the log was created |
Description |
Log description |
display rmon history
Syntax
display rmon history [ interface-type interface-number ]
View
Any view
Parameters
interface-type interface-number: Specifies a port by its type and number.
Description
Use the display rmon history command to display RMON history control entry and last history sampling information, including bandwidth utilization, number of bad packets, and total packet number.
Related commands: rmon history.
Examples
# Display RMON history entry information for interface GigabitEthernet 0/0/1.
<Sysname> display rmon history GigabitEthernet 0/0/1
History control entry 1 owned by user1 is VALID
Samples interface : GigabitEthernet 0/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 display rmon history command output description
Field |
Description |
History control entry |
Index of the history control entry for the interface, 1 in this example |
owned by |
Owner of the entry |
VALID |
Status of the entry identified by the index (VALID means the entry is valid, and UNDERCREATION means invalid. You can use the display rmon command to view the invalid entry and with the display current-configuration and display this commands you cannot view the corresponding rmon commands.) |
Samples Interface |
The sampled interface |
Sampling interval |
Sampling interval |
buckets max |
History table size for the entry, if the specified value of the buckets argument exceeds the history table size supported by the device the latter is displayed. |
Latest sampled values |
The latest sampled values |
Dropevents |
Dropped packets during the sampling period |
octets |
Number of octets received during the sampling period |
packets |
Number of packets received during the sampling period |
broadcastpackets |
Number of broadcasts received during the sampling period |
multicastpackets |
Number of multicasts received during the sampling period |
CRC alignment errors |
Number of packets received with CRC alignment errors during the sampling period |
undersize packets |
Number of undersize packets received during the sampling period |
oversize packets |
Number of oversize packets received during the sampling period |
fragments |
Number of fragments received during the sampling period |
jabbers |
Number of jabbers received during the sampling period |
collisions |
Number of colliding packets received during the sampling period |
utilization |
Bandwidth utilization during the sampling period |
display rmon prialarm
Syntax
display rmon prialarm [ entry-number ]
View
Any view
Parameters
entry-number: Private alarm entry index, in the range 1 to 65535. If no entry is specified, the configuration of all private alarm entries is displayed.
Description
Use the display rmon prialarm command to display the configuration of the specified or all private alarm entries.
Related commands: rmon prialarm.
Examples
# Display the configuration of all private alarm entries.
<Sysname> display rmon prialarm
Prialarm table 5 owned by user1 is UNDERCREATION.
Samples type : changeratio
Variable formula :
((.1.3.6.1.2.1.16.1.1.1.5.1-.1.3.6.1.2.1.16.1.1.1.6.1)*100/.1.3.6.1.2.1.16
.1.1.1.5.1)
Description : ifUtilization. GigabitEthernet 0/0/1
Sampling interval : 10(sec)
Rising threshold : 892340484(linked with event 1)
Falling threshold : 889783312(linked with event 2)
When startup enables : risingOrFallingAlarm
This entry will exist : forever
Latest value : 0
Table 2-5 display rmon prialarm command output description
Field |
Description |
Prialarm table |
Index of the prialarm table |
owned by |
Owner of the entry, user1 in this example |
VALID |
Status of the entry identified by the index (VALID means the entry is valid, and UNDERCREATION means invalid. You can use the display rmon command to view the invalid entry and with the display current-configuration and display this commands you cannot view the corresponding rmon commands.) |
Samples type |
Samples type |
Variable formula |
Variable formula |
Sampling interval |
Sampling interval |
Rising threshold |
Alarm rising threshold. An alarm event is triggered when the sampled value is greater than or equal to this threshold. |
Falling threshold |
Alarm falling threshold. An alarm event is triggered when the sampled value is less than or equal to this threshold. |
linked with event |
Event index associated with the prialarm |
When startup enables |
How can an alarm be triggered |
This entry will exist |
The lifetime of the entry, which can be forever or span the specified period |
Latest value |
The last sampled value |
display rmon statistics
Syntax
display rmon statistics [ interface-type interface-number ]
View
Any view
Parameters
interface-type interface-number: Specifies a port by its type and number.
Description
Use the display rmon statistics command to display RMON statistics.
Related commands: rmon statistics.
Examples
# Display RMON statistics for interface GigabitEthernet 0/0/3.
<Sysname> display rmon statistics GigabitEthernet 0/0/3
Statistics entry 6 owned by aa is VALID.
Interface : GigabitEthernet0/0/3<ifIndex.5>
etherStatsOctets : 0 , etherStatsPkts : 0
etherStatsBroadcastPkts : 0 , etherStatsMulticastPkts : 0
etherStatsUndersizePkts : 0 , etherStatsOversizePkts : 0
etherStatsFragments : 0 , etherStatsJabbers : 0
etherStatsCRCAlignErrors : 0 , etherStatsCollisions : 0
etherStatsDropEvents (insufficient resources): 0
Packets received according to length:
64 : 0 , 65-127 : 0 , 128-255 : 0
256-511: 0 , 512-1023: 0 , 1024-1518: 0
Table 2-6 display rmon statistics command output description
Field |
Description |
Statistics entry |
Statistics table entry index |
VALID |
Status of the entry identified by the index (VALID means the entry is valid, and UNDERCREATION means invalid. You can use the display rmon command to view the invalid entry and with the display current-configuration and display this commands you cannot view the corresponding rmon commands.) |
Interface |
Interface on which statistics are gathered |
etherStatsOctets |
Number of octets received by the interface during the statistical period |
etherStatsPkts |
Number of packets received by the interface during the statistical period |
etherStatsBroadcastPkts |
Number of broadcast packets received by the interface during the statistical period |
etherStatsMulticastPkts |
Number of multicast packets received by the interface during the statistical period |
etherStatsUndersizePkts |
Number of undersize packets received by the interface during the statistical period |
etherStatsOversizePkts |
Number of oversize packets received by the interface during the statistical period |
etherStatsFragments |
Number of undersize packets with CRC errors received by the interface during the statistical period |
etherStatsJabbers |
Number of oversize packets with CRC errors received by the interface during the statistical period |
etherStatsCRCAlignErrors |
Number of packets with CRC errors received on the interface during the statistical period |
etherStatsCollisions |
Number of collisions received on the interface during the statistical period |
etherStatsDropEvents |
Total number of drop events received on the interface during the statistical period |
Packets received according to length: |
Statistics of packets received according to length during the statistical period |
rmon alarm
Syntax
rmon alarm entry-number alarm-variable sampling-interval { absolute | delta } 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 index, in the range 1 to 65535.
alarm-variable: Alarm variable, a string of 1 to 256 characters. It can be in dotted object identifier (OID) format, such as 1.3.6.1.2.1.2.1.10.1 or a node name (such as ifInOctets.1). Only variables that can be parsed into INTEGER (INTEGER, Counter, Gauge, or Time Ticks) in the ASN.1 can be used for the alarm-variable argument.
sampling-interval: Sampling interval, in the range 5 to 65,535 seconds.
absolute: Sets the sampling type to absolute.
delta: Sets the sampling type to delta.
rising-threshold threshold-value1 event-entry1: Sets the rising threshold, where threshold-value1 represents the rising threshold, in the range –2,147,483,648 to +2,147,483,647, and event-entry 1 represents the index of the event triggered when the rising threshold is reached. It ranges from 0 to 65,535, with 0 meaning no corresponding event is triggered and no event action is taken when an alarm is triggered.
falling-threshold threshold-value2 event-entry2: Sets the falling threshold, where threshold-value2 represents the falling threshold, in the range –2,147,483,648 to +2,147,483,647 and event-entry2 represents the index of the event triggered when the falling threshold is reached. It ranges from 1 to 65,535.
owner text: Owner of the entry, a string of 1 to 127 characters. It is case sensitive and space is supported.
Description
Use the rmon alarm command to create an entry in the RMON alarm table.
Use the undo rmon alarm command to remove a specified entry from the RMON alarm table.
This command defines alarms. The generation and notification of an alarm however, is controlled by the event entry associated with it.
The following is how the system handles alarm entries:
1) Samples the alarm variables at the specified interval.
2) Compares the sampled values with the predefined threshold and does the following:
l If the rising threshold is reached, triggers the event specified by the event-entry1 argument.
l If the falling threshold is reached, triggers the event specified by the event-entry2 argument.
l Before creating an alarm entry, define the events to be referenced in the event table with the rmon event command.
l When you create an entry, if the values of the specified alarm variable (alarm-variable), sampling interval (sampling-interval), sampling type (absolute or delta), rising threshold (threshold-value1) and falling threshold (threshold-value2) are identical to those of the existing alarm entry, the system considers their configurations the same and the creation fails.
l You can create up to 60 alarm entries.
l The rising alarm and falling alarm are alternate.
Examples
# Add entry 1 in the alarm table and sample the node 1.3.6.1.2.1.16.1.1.1.4.1 at a sampling interval of 10 seconds in absolute sampling type. Generate event 1 when the sampled value is greater than or equal to the rising threshold of 50, and event 2 when the sampled value is lower than or equal to the falling threshold of 5. Set the owner of the entry to be user1.
<Sysname> system-view
[Sysname] rmon event 1 log
[Sysname] rmon event 2 none
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] rmon statistics 1
[Sysname-GigabitEthernet0/0/1] quit
[Sysname] 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 table entry with the index of 15.
<Sysname> system-view
[Sysname] undo rmon alarm 15
rmon event
Syntax
rmon event entry-number [ description string ] { log | log-trap log-trapcommunity | none | trap trap-community } [ owner text ]
undo rmon event entry-number
View
System view
Parameters
entry-number: Event entry index, in the range 1 to 65,535.
description string: Event description, a string of 1 to 127 characters.
log: Logs the event when it occurs.
log-trap log-trapcommunity: Log and trap events. The system performs both logging and trap sending when the event occurs. log-trapcommunity indicates the community name of the network management station that receives trap messages, a string of 1 to 127 characters.
none: Performs no action when the event occurs.
trap trap-community: Trap event. The system sends a trap with the community name being trap-community when the event occurs. trap-community represents network management station community to which traps are sent, a string of 1 to 127 characters.
owner text: Owner of the entry, a string of 1 to 127 characters. It is case sensitive and space is supported.
Description
Use the rmon event command to create an entry in the RMON event table.
Use the undo rmon event command to remove a specified entry from the RMON event table.
When an event is triggered by its associated alarm in the alarm table, the event group allows you to log it, send a trap, do both, or do neither at all. This helps control the generation and notification of events.
l When you create an entry, if the values of the specified event description (description string), event type (log, trap, logtrap or none), and community name (trap-community or log-trapcommunity) are identical to those of the existing event entry, the system considers their configurations the same and the creation fails.
l You can create up to 60 alarm entries.
Examples
# Create event 10 in the RMON event table.
<Sysname> system-view
[Sysname] rmon event 10 log owner user1
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 control entry index, in the range 1 to 65535.
buckets number: History table size for the entry, in the range 1 to 65,535. The number varies by device.
interval sampling-interval: Sampling interval, in the range 5 to 3600 seconds.
owner text-string: Owner of the entry, a string of 1 to 127 characters. It is case sensitive and space is supported.
Description
Use the rmon history command to create an entry in the RMON history control table.
Use the undo rmon history command to remove a specified entry from the RMON history control table.
This command enables RMON to periodically sample and save for an interface data such as bandwidth utilization, errors, total number of packets for later retrieval.
When you create an entry in the history table, if the specified history table size exceeds that supported by the device, the entry will be created. However, the validated value of the history table size corresponding with the entry is that supported by the device.
l When you create an entry, if the value of the specified sampling interval (interval sampling-interval) is identical to that of the existing history entry, the system considers their configurations the same and the creation fails.
l You can create up to 100 alarm entries.
Related commands: display rmon history.
Examples
# Create RMON history control entry 1 for interface GigabitEthernet 0/0/1.
<Sysname> system-view
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] rmon history 1 buckets 10 interval 5 owner user1
# Remove history control entry 15.
<Sysname> system-view
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] undo rmon history 15
rmon prialarm
Syntax
rmon prialarm entry-number prialarm-formula prialarm-des sampling-interval { absolute | changeratio | delta } 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: Index of a private alarm entry, in the range 1 to 65535.
prialarm-formula: Private alarm variable formula, a string of 1 to 256 characters. The variables in the formula must be represented in OID format that starts with a point “.”, the formula (.1.3.6.1.2.1.2.1.10.1)*8 for example. You may perform the basic operations of addition, subtraction, multiplication, and division on these variables. The operations should yield a long integer. To prevent errors, make sure that the result of each calculating step falls into the value range for long integers.
prialarm-des: Private alarm entry description, a string of 1 to 127 characters.
sampling-interval: Sampling interval, in the range 10 to 65,535 seconds.
absolute | changeratio | delta : Sets the sampling type to absolute, delta, or change ratio.
rising-threshold threshold-value1 event-entry1: Sets the rising threshold, where threshold-value1 represents the rising threshold, in the range –2,147,483,648 to +2,147,483,647, and event-entry 1 represents the index of the event triggered when the rising threshold is reached. It ranges from 0 to 65,535, with 0 meaning no corresponding event is triggered and no event action is taken when an alarm is triggered.
falling-threshold threshold-value2 event-entry2: Sets the falling threshold, where threshold-value2 represents the falling threshold, in the range –2,147,483,648 to +2,147,483,647 and event-entry2 represents the index of the event triggered when the falling threshold is reached. It ranges from 1 to 65,535.
forever: Indicates that the lifetime of the private alarm entry is infinite.
cycle cycle-period: Sets the lifetime period of the private alarm entry, in the range 0 to 2,147,483,647 seconds.
owner text: Owner of the entry, a string of 1 to 127 characters. It is case sensitive and space is supported.
Description
Use the rmon prialarm command to create an entry in the private alarm table of RMON.
Use the undo rmon prialarm command to remove a private alarm entry from the private alarm table of RMON.
The following is how the system handles private alarm entries:
1) Samples the private alarm variables in the private alarm formula at the specified sampling interval.
2) Performs calculation on the sampled values with the formula.
3) Compares the calculation result with the predefined thresholds and does the following:
l If the rising threshold is reached, triggers the event specified by the event-entry1 argument.
l If the falling threshold is reached, triggers the event specified by the event-entry2 argument.
l Before creating an alarm entry, define the events to be referenced in the event table with the rmon event command.
l When you create an entry, if the values of the specified alarm variable formula (prialarm-formula), sampling type (absolute changeratio or delta), rising threshold (threshold-value1) and falling threshold (threshold-value2) are identical to those of the existing alarm entry, the system considers their configurations the same and the creation fails.
l You can create up to 50 pri-alarm entries.
l The rising alarm and falling alarm are alternate.
Examples
# Create entry 5 in the private alarm table. Calculate the private alarm variables with the (1.3.6.1.2.1.16.1.1.1.4.1*100) formula and sample the corresponding variables at intervals of 10 seconds to get the percentage of broadcasts received on Ethernet 1/0 in the total packets. When this ratio reaches or is bigger than the rising threshold of 50, trigger event 1; when this ratio reaches or drops under the falling threshold, trigger event 2. Set the lifetime of the entry to forever and owner to user 1.
<Sysname> system-view
[Sysname] rmon event 1 log
[Sysname] rmon event 2 none
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] rmon statistics 1
[Sysname-GigabitEthernet0/0/1] quit
[Sysname] rmon prialarm 5 ((.1.3.6.1.2.1.16.1.1.1.4.1)*100) Test 10 absolute rising-threshold 50 1 falling-threshold 5 2 entrytype forever owner user1
# Remove private alarm entry 10.
<Sysname> system-view
[Sysname] undo rmon prialarm 10
rmon statistics
Syntax
rmon statistics entry-number [ owner text ]
undo rmon statistics entry-number
View
Ethernet port view
Parameters
entry-number: Index of statistics entry, in the range 1 to 65535.
owner text: Owner of the entry, a string of 1 to 127 characters. It is case sensitive and space is supported.
Description
Use the rmon statistics command to create an entry in the RMON statistics table.
Use the undo rmon statistics command to remove a specified entry from the RMON statistics table.
The RMON statistics group collects information on how a monitored port is being used and records errors. Statistics include number of collisions, CRC alignment errors, number of undersize or oversize packets, number of broadcasts, number of multicasts, number of bytes received, number of packets received.
To display information for the RMON statistics table, use the display rmon statistics command.
l Only one statistics entry can be created on one interface.
l You can create up to 100 statistics entries.
Examples
# Create an entry in the RMON statistics table for interface GigabitEthernet 0/0/1. The index of the entry is 20.
<Sysname> system-view
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] rmon statistics 20 owner user1
# Remove the entry in the RMON statistics table for interface GigabitEthernet 0/0/1. The index of the entry is 20.
<Sysname> system-view
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] undo rmon statistics 20