Appendix A. Trap Configuration Example
This appendix provides a short example of how the management target MIB and the notification MIB could be used to configure an SNMP entity to send SNMPv2 traps and/or informs to two different management stations.
In this example, the SNMP entity is configured to send traps to one management station, and informs to another. The two management stations are named "mgr1" and "mgr2". The configuration is performed using SNMP.
First, the SNMP parameters for the two management stations are configured. For "mgr1", the parameters specify that SNMPv2c messages should be used, with a securityName of "public" and a securityLevel of noAuthNoPriv. For "mgr2", the parameters specify that SNMPv3 messages should be used, with a securityName of "trapUser" and a securityLevel of authNoPriv.
The rows in the snmpTargetParamsTable are created as follows:
snmpTargetParamsName.0 = "mgr1-params"
snmpTargetParamsMPModel.0 = 1 -- SNMPv2c
snmpTargetParamsSecurityModel.0 = 2 -- SNMPv2c
snmpTargetParamsSecurityName.0 = "public"
snmpTargetParamsSecurityLevel.0 = noAuthNoPriv(1)
snmpTargetParamsRowStatus.0 = createAndGo(4)
snmpTargetParamsName.0 = "mgr2-params"
snmpTargetParamsMPModel.0 = 3 -- SNMPv3
snmpTargetParamsSecurityModel.0 = 3 -- USM
snmpTargetParamsSecurityName.0 = "trapUser"
snmpTargetParamsSecurityLevel.0 = authNoPriv(2)
snmpTargetParamsRowStatus.0 = createAndGo(4)
Next, the transport addresses for the two management stations are configured. The rows in the snmpTargetAddrTable are created as follows:
snmpTargetAddrName.0 = "mgr1-addr"
snmpTargetAddrTDomain.0 = snmpUDPDomain
snmpTargetAddrTAddress.0 = 0x8FC2A801 -- 143.194.168.1
snmpTargetAddrTagList.0 = "mgr1"
snmpTargetAddrParams.0 = "mgr1-params"
snmpTargetAddrRowStatus.0 = createAndGo(4)
snmpTargetAddrName.0 = "mgr2-addr"
snmpTargetAddrTDomain.0 = snmpUDPDomain
snmpTargetAddrTAddress.0 = 0x8FC2A802 -- 143.194.168.2
snmpTargetAddrTagList.0 = "mgr2"
snmpTargetAddrParams.0 = "mgr2-params"
snmpTargetAddrRowStatus.0 = createAndGo(4)
Finally, the entries in the snmpNotifyTable are created to specify that traps should be sent to the management target with the tag "mgr1", and informs should be sent to the management target with the tag "mgr2".
snmpNotifyName.0 = "mgr1-notify"
snmpNotifyTag.0 = "mgr1"
snmpNotifyType.0 = trap(1)
snmpNotifyRowStatus.0 = createAndGo(4)
snmpNotifyName.0 = "mgr2-notify"
snmpNotifyTag.0 = "mgr2"
snmpNotifyType.0 = inform(2)
snmpNotifyRowStatus.0 = createAndGo(4)
Note that this example omits many details, such as the configuration of the SNMPv3 USM user "trapUser", which would be necessary for the informs to work properly.