- TODO updated
[public/netxms.git] / doc / snmp.txt
1 Processing an outgoing SNMPv2 TRAP
2
3 If SNMPv2 compliant instrumentation presents an SNMPv2 trap to the
4 SNMP engine and such a trap passes all regular checking and then is
5 to be sent to an SNMPv1 destination, then the following steps must be
6 followed to convert such a trap to an SNMPv1 trap. This is basically
7 the reverse of the SNMPv1 to SNMPv2 mapping as described in RFC1908
8 [3].
9
10 1. If any of the varBinds in the varBindList has an SNMPv2 syntax
11 of Counter64, then such varBinds are implicitly considered to
12 be not in view, and so they are removed from the varBindList to
13 be sent with the SNMPv1 trap.
14
15 2. The 3 special varBinds in the varBindList of an SNMPv2 trap
16 (sysUpTime.0 (TimeTicks), snmpTrapOID.0 (OBJECT IDENTIFIER) and
17 optionally snmpTrapEnterprise.0 (OBJECT IDENTIFIER)) are
18 removed from the varBindList to be sent with the SNMPv1 trap.
19 These 2 (or 3) varBinds are used to decide how to set other
20 fields in the SNMPv1 trap PDU as follows:
21
22 a. The value of sysUpTime.0 is copied into the timestamp field
23 of the SNMPv1 trap.
24
25 b. If the snmpTrapOID.0 value is one of the standard traps the
26 specific-trap field is set to zero and the generic trap
27 field is set according to this mapping:
28
29 value of snmpTrapOID.0 generic-trap
30 =============================== ============
31 1.3.6.1.6.3.1.1.5.1 (coldStart) 0
32 1.3.6.1.6.3.1.1.5.2 (warmStart) 1
33 1.3.6.1.6.3.1.1.5.3 (linkDown) 2
34 1.3.6.1.6.3.1.1.5.4 (linkUp) 3
35 1.3.6.1.6.3.1.1.5.5 (authenticationFailure) 4
36 1.3.6.1.6.3.1.1.5.6 (egpNeighborLoss) 5
37
38 The enterprise field is set to the value of
39 snmpTrapEnterprise.0 if this varBind is present, otherwise
40 it is set to the value snmpTraps as defined in RFC1907 [4].
41
42 c. If the snmpTrapOID.0 value is not one of the standard
43 traps, then the generic-trap field is set to 6 and the
44 specific-trap field is set to the last subid of the
45 snmpTrapOID.0 value.
46
47 o If the next to last subid of snmpTrapOID.0 is zero,
48 then the enterprise field is set to snmpTrapOID.0 value
49 and the last 2 subids are truncated from that value.
50 o If the next to last subid of snmpTrapOID.0 is not zero,
51 then the enterprise field is set to snmpTrapOID.0 value
52 and the last 1 subid is truncated from that value.
53
54 In any event, the snmpTrapEnterprise.0 varBind (if present)
55 is ignored in this case.
56
57 3. The agent-addr field is set with the appropriate address of the
58 the sending SNMP entity, which is the IP address of the sending
59 entity of the trap goes out over UDP; otherwise the agent-addr
60 field is set to address 0.0.0.0.
61