Use it when the monitoring system does not receive events from a device.
Trap
An SNMP trap is an unsolicited message from agent to manager on UDP 162 when an event occurs, such as a link going down; traps are not acknowledged, informs are.
1. Traps are unsolicited notifications from agent to manager (UDP 162).
2. Informs are acknowledged.
3. Enable only needed traps.
4. Check source interface.
5. Test with a link flap.
event → trap → manager → alert
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification and what it shows Verify boundary
Generate or safely simulate a known notification, record agent timestamp/source and confirm the manager receives and parses the matching enterprise/OID payload. A received trap shows one notification traversed the path, but it does not show all events are delivered, that polling agrees, or that the underlying condition is still active.
Step 2 Verification & troubleshooting Narrow the fault
1. Verify manager-to-agent routing and UDP 161.
2. Verify version, credentials/user, view and ACL.
3. Poll one known OID.
4. Verify notification destination and UDP 162.
5. Correlate device and manager logs.
Step 3 Observation → implication → next check Narrow the fault
Observation → implication → next check: expected event with no agent notification starts at local event/notification configuration. Agent send counter/log without manager receipt moves to routing/ACL/UDP and receiver binding. Manager receipt without alert moves to parser/rule/suppression. Duplicate storms move to event dampening or unstable underlying state.
Step 4 Common mistakes Narrow the fault
- Traps sent to an old receiver IP.
- Enabling every trap type and drowning in noise.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Polling and traps/informs are independent paths
- An OID identifies an object; the MIB describes structure and semantics
- SNMPv2c community strings are not equivalent to SNMPv3 authentication/privacy
- Restrict management sources and grant the minimum required view/access.
show snmp host— trap receiversshow snmp— traps sent- Receiver log shows trap — arrival
ReferenceWhy it matters1 section · depth on demand
How it works in operation
An SNMP trap/inform is an asynchronous notification emitted by an agent toward a configured receiver. Event generation, notification policy, source/VRF/routing, transport delivery and manager ingestion are separate things to check. Traps are not a continuous health channel and their absence does not show that the triggering condition never occurred.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Traps are unacknowledged notifications; informs are acknowledged and retried
The Catalyst 9300 SNMP guide distinguishes the two notification types. Traps are sent once and are not acknowledged. Informs are acknowledged and retried, so they are more reliable but use more memory and bandwidth. SNMPv1 does not support informs. snmp-server enable traps selects which notification types are sent, and snmp-server host sets the recipient and SNMP version. If no version is given, SNMPv1 is the default.
C9300(config)# snmp-server enable traps snmp linkdown linkup coldstart
C9300(config)# snmp-server enable traps envmon
C9300(config)# snmp-server enable traps config
C9300(config)# snmp-server enable traps port-security
C9300(config)# snmp-server trap-source Loopback0
C9300(config)# snmp-server host 10.10.50.20 informs version 3 priv nms01
C9300(config)# snmp-server host 10.10.50.21 traps version 3 priv nms01
C9300# show snmp host
C9300# show snmp pending
show snmp pending lists informs waiting for an acknowledgement.
Which notifications are worth enabling
| Trap type | Why |
|---|---|
linkdown / linkup | Interface failures (limit to uplinks if access ports flap often) |
envmon | Fans, temperature, power supplies |
config | Configuration changes |
entity | Module or transceiver insertion and removal |
| Routing protocol traps (OSPF, BGP) | Adjacency loss |
port-security, errdisable | Security and err-disabled ports |
Traps versus informs
| Trap | Inform | |
|---|---|---|
| Delivery | Fire and forget over UDP | Acknowledged; retried until acknowledged or timed out |
| Load | Minimal | Device keeps state per pending inform |
| Use | Many devices, a high-volume collector | Critical events to an NMS that must not miss them |
Don't rely on notifications alone
UDP notifications can be lost during exactly the outage they report. Combine them with polling (interface status, sysUpTime) and with syslog, so a missing trap does not mean a missed incident.
Documented example, not captured output.
Quick reference
Traps are messages a device sends on its own when something happens, such as an interface going down or a power supply failing. They give faster notice than polling, but because they travel over UDP they can be lost; informs add acknowledgement and retransmission. Good monitoring combines traps for speed with polling for a reliable view of state.
Traps are unsolicited notifications from agent to manager (UDP 162), e.g. link down/up, cold start, config change, environmental alarms. Informs are acknowledged traps (retransmitted until confirmed).
snmp-server enable traps snmp linkdown linkup coldstart
snmp-server enable traps config
snmp-server enable traps envmon
snmp-server host 10.0.0.70 informs version 3 priv nms
snmptrapd -f -Lo # test receiver
Traps can be lost (UDP); combine with polling for state and syslog for detail.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in IP Services → SNMP → Trap. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc3411.html · confidence 94%