Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Trap

Direct answer

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.

When to use this

Use it when the monitoring system does not receive events from a device.

First 30 seconds

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.

Operational verification

event → trap → manager → alert

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard · Cisco IOS / IOS XE
Scope / prerequisiteUse it when the monitoring system does not receive events from a device.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

4 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points
  • 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.
Key checks
  • show snmp host — trap receivers
  • show 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 typeWhy
linkdown / linkupInterface failures (limit to uplinks if access ports flap often)
envmonFans, temperature, power supplies
configConfiguration changes
entityModule or transceiver insertion and removal
Routing protocol traps (OSPF, BGP)Adjacency loss
port-security, errdisableSecurity and err-disabled ports

Traps versus informs

TrapInform
DeliveryFire and forget over UDPAcknowledged; retried until acknowledged or timed out
LoadMinimalDevice keeps state per pending inform
UseMany devices, a high-volume collectorCritical 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 3411

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%
Confirmation

Confirm action

Continue?