DGS-6604
m
snmp-server enable traps snmp
CLI Reference Guide
847
command and the
snmp-server host
command for that host must be set to
enabled.
The
snmp-server enable traps snmp [linkup] [linkdown
] form of this
command globally enables SNMP linkUp and linkDown traps. After enabling
either of these traps globally, disable these traps on specific interfaces using the
no snmp trap link-status
command in interface configuration mode. Note that in
the interface level,
linkUp
and
linkDown
traps are enabled by default. This
indicated that it is not necessary to enable these notifications on a per-interface
basis.
Examples
The following example shows how to enable the router to send all traps to the
host 10.9.18.100
The following example shows how to enable the switch to send all trap
notifications to the host 10.9.18.100 using the community string defined as
public
:
The following example shows the enabling all SNMP trap types, then the
disabling of only the
linkUp
and
linkDown
trap:
This example shows how to enable the SNMP authentication traps.
Verify the settings by entering the
show snmp-server traps
command.
Switch(config)# snmp-server enable traps snmp
Switch(config)# snmp-server host 10.9.18.100
Switch(config)# snmp-server enable traps snmp
Switch(config)# snmp-server host 10.9.18.100 version 2c public
Switch> enable
Switch# configure terminal
Switch(config)# snmp-server enable traps snmp
Swtich(config)# end
Switch# show running-config | include traps snmpsnmp-server enable traps
snmp authentication linkup linkdown coldstart warmstart
Switch# configure terminal
Switch(config)# no snmp-server enable traps snmp linkup linkdown
Swtich(config)# end
Switch# show running-config | include traps snmpsnmp-server enable traps
snmp authentication coldstart warmstart
Switch(config)# snmp-server enable traps snmp authentication