snmp-server enable traps
Enables SNMP trap notifications on the device, allowing it to send alerts to an SNMP manager for specified events.
snmp-server enable trapsWhen to Use This Command
- Enable traps to monitor interface up/down events for network troubleshooting.
- Configure traps for authentication failures to detect unauthorized access attempts.
- Enable cold start traps to notify the NMS after a device reboot.
- Enable link status traps to track changes in network connectivity.
Command Examples
Enable all SNMP traps
snmp-server enable trapsThis command enables all available SNMP traps on the device. No output is generated; use 'show snmp' to verify.
Enable specific traps
snmp-server enable traps snmp authentication linkdown linkupEnables only authentication failure, link down, and link up traps. No output; verify with 'show snmp'.
Understanding the Output
The command does not produce output. To verify trap configuration, use 'show snmp' and look for 'Traps enabled' line. For example: 'Traps enabled: snmp authentication linkdown linkup coldstart warmstart'. Each listed trap indicates it is active. Missing traps mean they are not enabled. Ensure the NMS IP is configured with 'snmp-server host' to receive traps.
CCNA Exam Tips
CCNA exam may ask which command enables traps for authentication failures: 'snmp-server enable traps snmp authentication'.
Remember that 'snmp-server enable traps' without keywords enables all traps, but you must also configure 'snmp-server host' to send them.
The exam might test that traps are sent via UDP port 162 by default.
Know that enabling traps does not require a reload; it takes effect immediately.
Common Mistakes
Forgetting to configure 'snmp-server host' after enabling traps, so traps are enabled but never sent.
Enabling all traps when only specific ones are needed, causing unnecessary NMS processing.
Typing 'snmp-server enable trap' (singular) instead of 'traps' (plural), which is incorrect.
Related Commands
snmp-server community [string] [ro|rw]
Configures an SNMP community string on a Cisco IOS device to allow SNMP access with read-only or read-write privileges for network monitoring and management.
snmp-server host [ip] [string]
Configures the SNMP server to send SNMP notifications (traps or informs) to a specified host, using a community string for authentication.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions