SNMP Enterprise-specific Traps

How do I send an enterprise-specific trap?

Date Entered: 9/1/2004    Last Updated: 03/31/2017

To send an enterprise specific trap using SNMPAgent/SNMPTCPAgent, you must first set the TrapEnterprise configuration setting. By default, it has a value of 1.3.6.1.6.3.1.1.5 (i.e., SNMPv2-MIB::snmpTraps). After you set the TrapEnterprise setting, you set the trapOID parameter of the SendTrap method based on the kind of trap you want to send.

Sending a Generic SNMP Trap

If you simply want to send one of the generic SNMP traps, you can set trapOID to one of the trap name strings or full trap OIDs from the table below. For example:

C# agent.Config("TrapEnterprise=1.3.6.1.4.1.42"); agent.SendTrap("RemoteHost", "coldStart");

Trap NameFull Trap OID
coldStart1.3.6.1.6.3.1.1.5.1
warmStart1.3.6.1.6.3.1.1.5.2
linkDown1.3.6.1.6.3.1.1.5.3
linkUp1.3.6.1.6.3.1.1.5.4
authenticationFailure1.3.6.1.6.3.1.1.5.5
egpNeighborLoss1.3.6.1.6.3.1.1.5.6
enterpriseSpecific1.3.6.1.6.3.1.1.5.7

Sending an Enterprise-specific Trap

If you want to send an enterprise-specific trap, you can set trapOID to a string that follows the format "6.x", where x is the enterprise-specific trap type (6 is the generic type that indicates an enterprise-specific trap). For example, if you wanted to send an enterprise-specific trap of type 5000:

C# agent.Config("TrapEnterprise=1.3.6.1.4.1.42"); agent.SendTrap("RemoteHost", "6.5000");


We appreciate your feedback.  If you have any questions, comments, or suggestions about this entry please contact our support team at kb@nsoftware.com.