Concepts / Monitoring

Monitoring

SNMP trap

Also called trap, inform, linkDown, snmptrapd, UDP 162

A message an agent sends on its own, to UDP port 162, when something changes, such as a link going down.

The agent speaks first, once
The agent speaks first, once

A poll sees a change only when the station next asks. A trap is sent the moment it happens, but nothing acknowledges it, so a lost trap is gone and polling stays as the safety net.

An SNMP trap is a message an agent sends on its own, to UDP port 162, when something changes, such as a link going down (linkDown, naming the interface by its ifIndex). Polling finds a problem at the next poll; a trap reports it within seconds. A trap is not acknowledged, so a lost one is gone; an inform is the acknowledged kind. Stations keep polling as the safety net.

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab