91
Configuring the SNMP agent to send notifications to a host
You can configure the SNMP agent to send notifications as traps or informs to a host, typically an
NMS, for analysis and management. Traps are less reliable and use fewer resources than informs,
because an NMS does not send an acknowledgment when it receives a trap.
Configuration guidelines
When network congestion occurs or the destination is not reachable, the SNMP agent buffers
notifications in a queue. You can configure the queue size and the notification lifetime (the maximum
time that a notification can stay in the queue). A notification is deleted when its lifetime expires. When
the notification queue is full, the oldest notifications are automatically deleted.
You can extend standard linkUp/linkDown notifications to include interface description and interface
type, but must make sure that the NMS supports the extended SNMP messages.
To send informs, make sure:
• The SNMP agent and the NMS use SNMPv2c or SNMPv3.
• If SNMPv3 is used, you must configure the SNMP engine ID of the NMS when you configure
SNMPv3 basic settings. Also, specify the IP address of the SNMP engine when you create the
SNMPv3 user.
Configuration prerequisites
• Configure the SNMP agent with the same basic SNMP settings as the NMS. If SNMPv1 or
SNMPv2c is used, you must configure a community name. If SNMPv3 is used, you must
configure an SNMPv3 user, a MIB view, and a remote SNMP engine ID associated with the
SNMPv3 user for notifications.
• The SNMP agent and the NMS can reach each other.
Configuration procedure
To configure the SNMP agent to send notifications to a host:
Step Command Remarks
1. Enter system view.
system-view
N/A
2. Configure a target
host.
• Send traps to the target host:
In non-FIPS mode:
snmp-agent target-host trap
address udp-domain { target-host |
ipv6 target-host } [ udp-port
port-number ] [ vpn-instance
vpn-instance-name ] params
securityname security-string [ v1 |
v2c | v3 [ authentication |
privacy ] ]
In FIPS mode:
snmp-agent target-host trap
address udp-domain { target-host |
ipv6 target-host } [ udp-port
port-number ] [ vpn-instance
vpn-instance-name ] params
securityname security-string v3
{ authentication | privacy }
• Send informs to the target host:
In non-FIPS mode:
snmp-agent target-host inform
address udp-domain { target-host |
ipv6 target-host } [ ud
p-port
port-number ] [ vpn-instance
vpn-instance-name ] params
By default, no target host is
configured.