snmptrap

send an SNMP TRAP message to a host

Syntax:

snmptrap [-d] host community trap_type specific_type
         device_description [-a agent_addr]

Options:

-d
Dump the output packet.
host
An Internet address specified in dot notation or a host name.
community
The community name for the transaction with the remote system.
trap_type
An integer that specifies the type of trap message being sent. Trap types are defined in the table below.
specific_type
An integer that specifies user-defined additional information about trap_type.
device_description
A textual description of the device sending this trap. The description is used as the value of a system.sysDescr.0 variable.
-a agent_addr
Change the address that the trap reports it's being sent from. By default, snmptrap uses the sending host's address.

Examples:

Send a cold start trap to the specified host:

snmptrap nic.andrew.cmu.edu public 0 0 'SUN 3/60: SUNOS4.0'

Description:

The snmptrap utility forms and sends an SNMP TRAP message to a host.

This trap type:Signifies that the sending protocol entity:
0
coldStart
is reinitializing itself — the agent's configuration or the protocol entity implementation may be altered
1
warmStart
is reinitializing itself — neither the agent's configuration nor the protocol entity implementation is altered
2
linkDown
recognizes a failure in one of the communication links represented in the agent's configuration
3
linkUp
recognizes that one of the communication links represented in the agent's configuration has come up
4
authenticationFailure
is the addressee of a protocol message that isn't properly authenticated
5
egpNeighborLoss
had an EGP neighbor as an EGP peer, and the neighbor has been marked down so that the peer relationship no longer exists
6
enterpriseSpecific
recognizes that some enterprise-specific event has occurred. The specific trap field identifies the particular trap that occurred.

See also:

snmpd, snmpget, snmpgetnext, snmpnetstat, snmpstatus, snmptest, snmptrapd, snmpwalk, mib.txt file

RFC 1065, RFC 1066, RFC 1067

Marshall T. Rose, The Simple Book: An Introduction to Internet Management, 2nd ed. (Prentice-Hall, 1994, ISBN 0-13-177254-6)