1SNMPTRAP(1)                        Net-SNMP                        SNMPTRAP(1)
2
3
4

NAME

6       snmptrap, snmpinform - sends an SNMP notification to a manager
7

SYNOPSIS

9       snmptrap  -v 1 [COMMON OPTIONS] AGENT enterprise-oid agent generic-trap
10       specific-trap uptime [OID TYPE VALUE]...
11
12       snmptrap -v [2c|3] [COMMON OPTIONS] [-Ci] AGENT  uptime  trap-oid  [OID
13       TYPE VALUE]...
14
15       snmpinform  -v  [2c|3] [COMMON OPTIONS] AGENT uptime trap-oid [OID TYPE
16       VALUE]...
17

DESCRIPTION

19       snmptrap is an SNMP application that uses the SNMP  TRAP  operation  to
20       send  information to a network manager.  One or more object identifiers
21       (OIDs) can be given as arguments on the command line.   A  type  and  a
22       value  must  accompany  each  object identifier.  Each variable name is
23       given in the format specified in variables(5).
24
25       When invoked as snmpinform, or when -Ci is added to  the  command  line
26       flags  of  snmptrap,  it sends an INFORM-PDU, expecting a response from
27       the trap receiver, retransmitting if required.  Otherwise it  sends  an
28       TRAP-PDU or TRAP2-PDU.
29
30       If any of the required version 1 parameters, enterprise-oid, agent, and
31       uptime are specified as empty, it defaults to 1.3.6.1.4.1.3.1.1 (enter‐
32       prises.cmu.1.1), hostname, and host-uptime respectively.
33
34       The TYPE is a single character, one of:
35              i  INTEGER
36              u  UNSIGNED
37              c  COUNTER32
38              s  STRING
39              x  HEX STRING
40              d  DECIMAL STRING
41              n  NULLOBJ
42              o  OBJID
43              t  TIMETICKS
44              a  IPADDRESS
45              b  BITS
46       which are handled in the same way as the snmpset command.
47
48       The  AGENT  argument is only embedded in SNMP TRAP PDUs but not in SNMP
49       INFORM PDUs. If AGENT is not an empty string, it must be  an  IPv4  ad‐
50       dress.  This limitation comes from RFC 1157, in which the agent address
51       field is defined as follows:
52
53              agent-addr NetworkAddress, -- address of object generating trap
54
55       From RFC 1155:
56
57              NetworkAddress ::=
58                  CHOICE {
59                      internet IpAddress
60                  }
61              [ ... ]
62              IpAddress ::=
63                  [APPLICATION 0]          -- in network-byte order
64                      IMPLICIT OCTET STRING (SIZE (4))
65
66       An example of how to use snmptrap:
67
68       snmptrap -v 1 -c public manager enterprises.spider test-hub 3 0 ''  in‐
69       terfaces.iftable.ifentry.ifindex.1 i 1
70
71       will send a generic linkUp trap to manager, for interface 1.
72

OPTIONS

74       snmptrap  takes  the  common options described in the snmpcmd(1) manual
75       page in addition to the -Ci option described above.  Note that snmptrap
76       REQUIRES  an argument specifying the agent to query as described there.
77

SEE ALSO

79       snmpcmd(1), snmpset(1), variables(5).
80
81
82
83V5.9.4.pre2                       19 Jun 2003                      SNMPTRAP(1)
Impressum