monitor and manage information on a network entity
snmptest [-d] [-p port] [-r retry] [-t timeout] -v 1 host community snmptest [-d] [-p port] [-r retry] [-t timeout] [-v 2] host noAuth snmptest [-d] [-p port] [-r retry] [-t timeout] [-v 2] host srcparty dstparty context
The snmptest utility monitors and manages information on a network entity.
After you invoke snmptest, you can enter commands at a line interpreter's prompt:
Please enter the variable name:
At this point, you can enter one or more variable names, one per line. If you enter a blank line, snmptest sends a request for each of the variables (in a single packet) to the network entity. See the file mib.txt for the format specification of variable names.
For example (for SNMPv1), if you enter:
snmptest -v 1 netdev-kbox.cc.cmu.edu public
(or for SNMPv2)
snmptest netdev-kbox.cc.cmu.edu manager_party agent_party agent_context Please enter the variable name: system.sysdescr.0 Please enter the variable name:
then snmptest returns information about the request and reply packets, as well as:
Name: system.sysDescr.0 OCTET STRING- (ascii): Kinetics FastPath2
By default, snmptest sends a GET request packet but you can change this as follows:
In order to: | Enter this command: |
---|---|
Quit the utility. | $Q |
Send BULK TRANSFER request. | $B |
Send GET NEXT request. | $N |
Send GET request. | $G |
Send INFORM request. | $I |
Send SET request. | $S |
Send SNMP2 TRAP. | $T |
Toggle the dumping of each sent and received packet. | $D |
If you enter $I, $S, or $T, then snmptest requests information about each variable. First it prompts you for the variable type:
Please enter variable type [a|d|i|n|o|s|t|x]:
If the variable is: | Enter: |
---|---|
ip address | a |
string | d |
integer | i |
null | n |
object id | o |
string | s |
timeticks | t |
string | x |
After you enter a character, snmptest prompts you for a value:
Please enter new value:
For this variable type: | Enter: |
---|---|
integer | Integer in decimal. |
ipaddress | IP address in the standard internet dot notation. |
object id | Object ID in dotted numeric notation. |
string | Whitespace-delimited decimal numbers, one per byte of the string. |
timeticks | Integer in decimal. |
If you're using SNMP version 2, the following files must be configured:
For a description on how to configure the files please see the ``Administrative model'' section in the SNMPv2 chapter, and the file page for each of the configuration files listed above. If you wish to change the location of your configuration files, you must include a snmpd.conf file.
This ID:
system.syscontact.0
will be printed as:
syscontact.0
This ID:
udp.udpTable.udpEntry.udpLocalAddress.0.0.0.161
will be printed as:
udpLocalAddress.0.0.0.161
snmpd,
snmpget,
snmpgetnext,
snmpnetstat,
snmpstatus,
snmptrap,
snmptrapd,
snmpwalk
/etc/acl.conf file,
/etc/context.conf file,
/etc/mib.txt file,
/etc/party.conf file,
/etc/snmpd.conf file,
/etc/view.conf file
RFC 1065, RFC 1066, RFC 1067
RFC 1441, RFC 1445, RFC 1446
RFC 1448, RFC 1449
Marshall T. Rose, The Simple Book: An Introduction to
Internet Management, Revised 2nd ed. (Prentice-Hall,
1996, ISBN 0-13-451659-1)