126
Usage guidelines
For an interface to generate linkUp/linkDown notifications when its state changes, you must also
enable the linkUp/linkDown notification function globally by using the
snmp-agent trap enable
standard
[
linkdown | linkup
] *
command.
Examples
# Enable port FortyGigE 1/0/1 to send linkUp/linkDown SNMP traps to 10.1.1.1 in the community
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 fortygige 1/0/1
[Sysname-FortyGigE1/0/1] enable snmp trap updown
Related commands
•
snmp-agent
target-host
•
snmp-agent
trap
enable
snmp-agent
Use
snmp-agent
to enable the SNMP agent.
Use
undo
snmp-agent
to disable the SNMP agent.
Syntax
snmp-agent
undo
snmp-agent
Default
The SNMP agent is disabled.
Views
System view
Predefined user roles
network-admin
Usage guidelines
The
snmp-agent
command is optional for an SNMP configuration task. The SNMP agent is
automatically enabled when you execute any command that begins with
snmp-agent
except for the
snmp-agent calculate-password
command.
Examples
# Enable the SNMP agent.
<Sysname> system-view
[Sysname] snmp-agent
snmp-agent { inform | trap } source
Use
snmp-agent
{
inform
|
trap
}
source
to specify a source IP address for the informs or traps sent
by the SNMP agent.
Use
undo snmp-agent
{
inform
|
trap
}
source
to restore the default.