Search code examples
snmp

SNMP v1,v2c and v3 trap difference


Explain the difference between v1, v2c and v3 Traps PDU/format.


Solution

  • This requires you to go through the RFC documents, which means this is not programming related, and probably belongs to ServerFault.

    Give you some hints:

    1. SNMP v1 defines a special TRAP message format, different from other messages (such as GET). https://www.rfc-editor.org/rfc/rfc1157#page-27 This message format is not used any more in SNMP v2 and v3. If an SNMP agent sends out such TRAP messages for v2 or v3, that can be a bug.
    2. Since v2, TRAP starts to use the common message format (the same as GET and so on). So it is called SNMPv2-Trap-PDU. https://www.rfc-editor.org/rfc/rfc3416#page-22
    3. SNMP v3 introduces the security model to all messages, so TRAP receives such update too. It is still based on SNMPv2-Trap-PDU.