What is the difference between SNMP Trap and the SNMP agent?
Short answer
The two are the two directions of SNMP (RFC 3416). An SNMP Trap is the notification that TR7 sends to the NMS on its own, without waiting, when an event occurs: the destination address, port and version are determined in the SNMP Settings section in Notification Management, and on which event it is sent is determined with the SNMP Trap channel in the Notification Action field of the notification profile or with the SNMP options on the module notification screens. The SNMP agent, on the other hand, is the listener running on TR7: the NMS queries the device at specific intervals (polling) and reads the values; on which IP and port the agent listens (default 161), which networks can access it and which versions are enabled are defined in the SNMP section on the Management Access screen. The trap is for instant event notification, and the agent for continuous status monitoring; the two can be used together.
Where It Is Used in TR7
| Where | Field / label | What for |
|---|---|---|
| Settings → General Settings → Notification Management → SNMP settings | SNMP IP:Port, SNMP Version, SNMP Community Name, Route Table | The trap destination and the route table the trap leaves from |
| Notification Management → Notifications; module notification screens | Notification Action → SNMP Trap; SNMP Trap in the LB Notifications profile; SNMP Notification in WAF | On which events a trap is sent |
| Settings → Device Management → Management Access → Edit → SNMP | SNMP (IP, port 161), SNMP Allowed Networks, SNMPd v1 / SNMPd v2 / SNMPd v3 | Agent access for polling |
Comparison
| SNMP Trap | SNMP agent | |
|---|---|---|
| Direction | TR7 → NMS | NMS → TR7 |
| Trigger | Event (threshold exceeded, status change) | The query interval of the NMS |
| Setting in TR7 | Notification Management → SNMP settings + notification channels | Management Access → SNMP |
| Port | The trap port of the NMS (standard 162); entered in the SNMP IP:Port field | Default 161 on TR7 |
| Version | v1 and v2c | SNMPd v1, SNMPd v2, SNMPd v3 |
| Access | One-way notification | Read-only query |
- For the NMS to resolve the TR7-specific OIDs used in traps, the MIB file is downloaded from the SNMP Files row in Management Access.
- The details of the versions and the status of v3 on the trap side: What is the difference between SNMP v1, v2c and v3?
Common Misconceptions
- "If trap is on, the NMS can query the device." For queries, SNMP access is defined separately in Management Access.
- "The agent gives notice when an event occurs." The agent responds only to queries; event notification is done with trap.
- "SNMP allowed networks also restricts the trap destination." This field determines only the networks that can query the agent; the trap destination is the SNMP IP:Port in SNMP settings.
How it is done in the documentation
