blob: 23916c9eed537ce83e554cd70dfb5cd4b5fbbf7e [file] [log] [blame]
.\* /***********************************************************
.\" Copyright 1988, 1989 by Carnegie Mellon University
.\"
.\" All Rights Reserved
.\"
.\" Permission to use, copy, modify, and distribute this software and its
.\" documentation for any purpose and without fee is hereby granted,
.\" provided that the above copyright notice appear in all copies and that
.\" both that copyright notice and this permission notice appear in
.\" supporting documentation, and that the name of CMU not be
.\" used in advertising or publicity pertaining to distribution of the
.\" software without specific, written prior permission.
.\"
.\" CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
.\" ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
.\" CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
.\" ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
.\" WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
.\" ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
.\" SOFTWARE.
.\" ******************************************************************/
.TH SNMPCMD 1 "04 December 1998"
.UC 4
.SH NAME
snmpcmd - commmands to communicate with a network entity using SNMP Requests.
.SH SYNOPSIS
snmpcmd
[-h|-V]
[-R]
[-f|-s|-S] [-q]
[-v (1 | 2c | 3) ]
[-d] [-D[TOKEN,TOKEN,...]]
[-R] [-f|-s|-S] [-q]
[-m mibs] [-M mibdirs]
[-r retries] [-t timeout] [-p port]
[-e engineid] [-T boots time] [-n contextname]
[-l seclevel] [-u secname]
[-a authproto] [-A authpasswd] [-x privproto] [-X privpasswd]
agent [community | srcparty dstparty context | noauth]
commandparams
.SH DESCRIPTION
This manual page describes the common part of the parameters for
the SNMP commands:
.IR snmpget ,
.IR snmpgetnext ,
.IR snmpset ,
.IR snmpbulkwalk ,
.IR snmpwalk ,
.IR snmpdelta ,
.IR snmptable ,
.IR snmptrap .
The command line applications uses the SNMP protocol to communicate
with an SNMP capable network entity, an agent.
The applications all have some specific options and arguments that
are specified after the common part specified here.
.IP "-h"
prints the applications help message
.IP "-V"
prints the applications version string
.IP "-d"
request the application to dump all SNMP packets send and received
.IP "-D"
request debugging output
.IP "-v 1 | 2c | 3"
specifies the protocol version to use: 1 (RFC 1155-1157), 2c (RFC 1901-1908),
or 3 (RFC 2571-2574)
The default is -v 1
.IP "-R"
requests random access to the MIB symbol table. See RANDOM ACCESS MIB below.
.IP "-f"
requests full object identifiers on output.
.I system.sysDescr.0
will be printed as
.I .iso.org.dod.internet.mgmt.mib-2.system.sysDescr.0
.IP "-s"
request that object identifiers on output uses "suffix only", that is,
only the last symbolic part is printed. For example,
.I interfaces.iftable.ifentry.ifindex.1
will just show up as
.I ifindex.1
.IP "-S"
request object identifiers with suffix and MIB name.
.I interfaces.iftable.ifentry.ifindex.1
will show up as
.I IF-MIB:ifindex.1
.IP "-q"
request a "quick print" output format, that also is easier to
parse for programs
.IP "-m mibs"
specifies a colon separated list of MIB modules to load for this application.
The special name ALL is used to specify all modules in all directories.
This overrides the environment variable MIBS.
.IP "-M mibdirs"
specifies a colon separated list of directories to search for MIBs.
This overrides the environment variable MIBDIRS.
.IP "-d"
request the application to dump all SNMP packets send and received
.IP "-D[TOKEN,TOKEN,...]"
request debugging output. The optional comma separated TOKENs list
specifies what type of debugging information you which to view. Only
debugging information about those TOKEN types will be shown to you.
Only the beginning of the token needs to match. In other words,
specifying
.B -DmibII
will print debugging output for debugging symbols
.I mibII
as well as
.I mibII/system.
.IP
The special keyword "all" will display all debugging
output. Specifying no TOKENs is the same as specifying "all".
.IP
The special keyword "trace" will display source code tracing output.
.IP "-r retries"
specifies the number of retries to be used in the requests. The default
is 5
.IP "-t timeout"
specifies the timeout between retries. The default is 1
.IP "-p port"
specifies the port to communicate with at the agent. The default is 161,
except for snmptrap, which defaults to 162.
.IP "-e engineid"
sets the authoritative(security) engineID used for SNMP v3 Request messages.
This is the engineID of the agent or proxy (e.g., 800000020109840301). (will
be discovered if not supplied)
.IP "-E engineid"
sets the context engineID used for SNMP v3 Request messages scopedPdu.
This is the engineID of the agent (e.g., 800000020109840301). (will be
authoritative engineID if not specified)
.IP "-T boots time"
sets the engineBoots and engineTime used for authenticated SNMP v3 messages.
This will initialize the local notion of the agents boots/time with an
authenticated value stored in the LCD. (will be discovered if not supplied)
.IP "-n contextname"
sets the destination contextName used for SNMP v3 messages. Default
contextName is and empty string ""
.IP "-l seclevel"
sets the securityLevel used for SNMP v3 messages
(noAuthNoPriv|authNoPriv|authPriv). Appropriate pass phrase(s) must provided
when using any level higher than noAuthNoPriv.
.IP "-u secname"
sets the securityName used for authenticated SNMP v3 messages
.IP "-a authproto"
sets the authentication protocol used for authenticated SNMP v3 messages.
(MD5|SHA)
.IP "-A authpasswd"
sets the authentication pass phrase used for authenticated SNMP v3 messages
.IP "-x privproto"
sets the privacy protocol used for encrypted SNMP v3 messages.
(DES)
.IP "-X privpasswd"
sets the privacy pass phrase used for encrypted SNMP v3 messages
.PP
The
.I hostname
specification may be either a host name or an internet address
specified in "dot notation".
.PP
The version 1, or version 2c,
.I community
specifies the community name for the transaction with the remote system.
.PP
.SH "RANDOM ACCESS MIBS"
Normally, an object identifier such as system.sysDescr.0 will be lookup
in a single "wellknown" place, built into the SNMP library (or specified
by the PREFIX environment variable).
The standard place is: .iso.org.dod.internet.mgmt.mib-2.
The identifier may alternatively be a complete object identifier,
this is designated by a leading "dot".
To simplify the specification of object identifiers the library supports
random access to the identifiers in the MIBs. This is requested by the
-R option to the SNMP applications.
Using this, system.sysDescr.0 may also be entered as sysDescr.0.
To search only a single MIB for the identifier (if it appears in more
than one), specify it as SNMPv2-MIB:sysDescr.0. This notation will
also make sure that the specified MIB is loaded, i.e. it need not
be mentioned in the -m option (or MIBS environment variable).
.PP
.SH "ENVIRONMENT VARIABLES"
.IP PREFIX
The standard prefix for object identifiers. Defaults to .iso.org.dod.internet.mgmt.mib-2
.IP MIBS
The list of MIBs to load. Defaults to
SNMPv2-TC:SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB:SNMP-VACM-MIB.
Overridden by the -m option
.IP MIBDIRS
The list of directories to search for MIBs. Defaults to PREFIX/share/snmp/mibs.
Overridden by the -M option
.IP SUFFIX
If this variable is set, the applications acts as if the -s option is specified.
.SH FILES
.IP PREFIX/share/snmp/snmpd.conf
Agent configuration file. See snmpd.conf(5)
.IP PREFIX/share/snmp/snmp.conf
.IP ~/.snmp/snmp.conf
Application configuration files. See snmp.conf(5)
.SH "SEE ALSO"
snmpget(1), snmpgetnext(1), snmpset(1), snmpbulkwalk(1), snmpwalk(1),
snmptable(1), snmpdelta(1), snmptrap(1), snmp.conf(5).