Procedure
Step 1
Run:
system-view
The system view is displayed.
Step 2
Run:
snmp-agent trap enable
Alarm sending is enabled.
Step 3
Run:
snmp-agent trap source
interface-type
interface-number
The source interface for trap messages is specified.
After the source interface is specified, its IP address becomes the source IP address of trap
messages. Configuring the IP address of the local loopback interface as the source interface is
recommended, which can ensure device security.
The source interface specified on the router for trap messages must be consistent with that
specified on the NM station; otherwise, the NM station will not accept the trap messages sent
from the router.
Step 4
Run:
snmp-agent trap queue-size
size
The length of the queue storing trap messages to be sent to the destination host is set.
The queue length depends on the number of generated trap messages. If the router frequently
generates trap messages, a longer queue length can be set to prevent trap messages from being
lost.
Step 5
Run:
snmp-agent trap life
seconds
The lifetime of every trap message is set.
The lifetime of every trap message depends on the number of generated trap messages. If the
router frequently generates trap messages, a longer lifetime can be set for every trap message to
prevent trap messages from being lost.
----End
1.2.6 Checking the Configuration
After SNMPv1 functions are configured, you can view the SNMPv1 configurations.
Prerequisites
The configurations of basic SNMPv1 functions are complete.
Procedure
l
Run the
display snmp-agent community
{
read
|
write
} command to check the
configured community name.
Huawei AR150&200 Series Enterprise Routers
Configuration Guide - Network Management
1 SNMP Configuration
Issue 02 (2012-03-30)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
12