
90
•
Authentication failures from the NMS to the agent
—The agent logs the IP address of the
NMS.
To configure SNMP logging:
Step Command
Remarks
1.
Enter system view.
system-view
N/A
2.
(Optional.) Enable SNMP
logging.
snmp-agent log
{
all
|
authfail
|
get-operation
|
set-operation
}
By default, SNMP logging is
disabled.
3.
(Optional.) Enable SNMP
notification logging.
snmp-agent
trap log
By default, SNMP notification
logging is disabled.
Configuring SNMP notifications
The SNMP Agent sends notifications (traps and informs) to inform the NMS of significant events,
such as link state changes and user logins or logouts. Unless otherwise stated, the
trap
keyword in
the command line includes both traps and informs.
Enabling SNMP notifications
Enable an SNMP notification only if necessary. SNMP notifications are memory-intensive and might
affect device performance.
To generate linkUp or linkDown notifications when the link state of an interface changes, you must
perform the following tasks:
•
Enable linkUp or linkDown notification globally by using the
snmp-agent trap enable standard
[
linkdown
|
linkup
] * command.
•
Enable linkUp or linkDown notification on the interface by using the
enable snmp trap updown
command.
After you enable notifications for a module, whether the module generates notifications also depends
on the configuration of the module. For more information, see the configuration guide for each
module.
To enable SNMP notifications:
Step
Command
Remarks
1.
Enter system view.
system-view
N/A
2.
Enable notifications
globally.
snmp-agent
trap
enable
[
configuration
|
protocol
|
standard
[
authentication
|
coldstart
|
linkdown
|
linkup
|
warmstart
] * |
system
]
By default, SNMP
configuration notifications,
standard notifications, and
system notifications are
enabled. Whether other
SNMP notifications are
enabled varies by modules.
3.
Enter interface view.
interface interface-type interface-number
N/A
4.
Enable link state
notifications.
enable snmp trap updown
By default, link state
notifications are enabled.