Administrator HandbookTOC

Advanced snmp query and snmp protocol analyzer tool

Introduction to snmp query and snmp protocol analyzer
Loading the advanced snmp analyzer and query tool
Using the advanced snmp analyzer and query tool
Performing a snmp walk with the snmp get next command
Performing a snmp get bulk command in snmp v2c
Performing a snmp set command
Snmp protocol analyzer

Introduction to snmp query and snmp protocol analyzer

The Advanced snmp query Tool is used to create any SNMP request and to analyze snmp packet. The snmp analyzer can be used to debug the behavior of the protocol between a snmp manager and a snmp agent. It is very efficient and pratical to send snmp request and decode snmp packets in few clicks.

Snmp queries that you can perform are snmp get, snmp get next, snmp set, snmp get table, snmp get bulk. You can modify the snmp community, the snmp version and the snmp port. By default the snmp v1 is used but you can change it to snmp v2c to perform snmp bulk request for example.

The mandatory snmp object can be queried directly for a simple click. You can do a snmp get on the mib2 system object the mib2 interface objects, the mib2 ip objects, the mib2 icmp objects, the mib2 udp and tcp objects.

It is very useful for developers in any snmp test phases when developping snmp agent for exemple. It could help anyone to understand how the SNMP protocol works and could be used to check that an agent is well responding to specific SNMP requests. In production phase, it is easier to use other tools and plugin directly available from the MIB tree.

The Advanced Query tool is one of the first created tool within LoriotPro that uses the DSNMP class that is the kernel of Loriotpro.

snmp ananyzer and snmp query tool
Avanced Query tool

Loading the advanced snmp analyzer and query tool

To access the advanced snmp analyzer and query tool locate the icon:

To open the advanced snmp analyzer and query tool you have the choice between using menu and toolbar.

You can first select a host in the directory. All the subsequent snmp queries will be made on this host.

From the amin tool bar, open the host tool bar and click on the common snmp query option.

The advanced snmp analyzer and query tool can also be called from the contextual menu of any directory object.

Select the object in the tree and click the right mouse button. In the menu select tools and advanced query.

Using the advanced snmp analyzer and query tool

The principle of this tool is based on a graphical SNMP object Tree. From the tree you could click on a SNMP object and an immediate SNMP GET will be sent to the selected host specified in the ‘SNMP agent IP address’ field and the ‘SNMP Port’ field.

mib tree
Advanced Query, result of a double click on the SNMP tree object “syscontact

A doublke click on the snmp object in the tree copy the snmp object or all the snmp objects if it is a snmp table object in the Start Object area. Start snmp object area is use to make snmp query or the start a snmp walk with a snmp get next.

snmp object
The snmp object broswe window

A single click on the Info button perfom an extract of the object description of the mib file

snmp object description

Object Name short name of the mib object
Children of Object the name of its father node in the mib tree
From MIB Description The description keyword of the MIB file where this object is defined
Registered in File The name of the MIB file where this object is defined
SYNTAX The type of snmp object
ACCESS The level of access (read write, read only ...)
STATUS The status of the object, current, mandatory ...
OID LEN The lenght of the mib object
oid the full object identifier in dotted format with object name
LoriotPro extension proprietary extension issued from the LoriotPro compiler
Dup name found Duplicate name has been found in the tree with the same name ( 0 = none)
OID Marked Deleted OID will be deleted for the the next reboot

Performing a snmp walk with the snmp get next command

To perform a walk on a snmp table, select the table object in the tree

select snmp table
Selection of a snmp table object

Click the Get Next button

snmp get next request
A snmp get next request

The first object in the table having the first index is displayed.

The following get next request will provide the table contain in the following order:

First object, first index
First object, second index
First object, n index
Second object, first index
Second object, second index
Second object, n index
n object, first index
n object, second index
n object, n index

Performing a Snmp get bulk command in snmp v2c

The snmp get bulk operation is used by the snmp manager to efficiently retrieve large blocks of data, such as multiple rows in a table. Snmp get bulk fills a response message with as much of the requested data as will fit.

To perform a get bulk command the snmp agent of the host or network device should support snmp v2c.

You also need to check the snmp v2c checkbox before using this option else you get the popup box

snmp v2c not selected

You can select by a double click on a table entry a set of objects and perform the snmp get nul command by clciking on the get bulk button.

snmp getbulk

After the snmp get bulk the index are changes to the next available index in the table. We started with index 1 in our example and drop to index 65540.

Performing a Snmp set command

The Advanced snmp query Tool allow you to perform snmp set command on any snmp writable object.

To change the current value of a snmp settable object,

  1. double click on the object, a snmp query on the object is performed and you get its current value.
  2. look at the snmp object value type in the decode, in our example Octet_String.
  3. then click on the Object button of the snmp set area
  4. Select the snmp object type in the combo box
  5. Enter the new snmp object value to apply
  6. click on the snmp set button


If the snmp set succeeds you should see the new snmp object value applied

snmp set result

Snmp protocol analyzer

This process integrates a SMNP protocol analyzer that is very useful to debug any communication between the LoriotPro snmp manager and any snmp agent.

You can display the decode of the snmp packet sent and the snmp packet received. You acn also display the raw hex value in dump mode.

The decode is composed of lines:

Total message len The lenght of the snmp
SNMP version The version of snmp used, either snmp v1, snmp v2c, or snmp v3
Community name The community of the snmp packet
Type of PDU The five snmp PDU (protocol data unit) types of the protocol, Get Request PDU, Get Next Request PDU, Get Response PDU,Set Request PDU, and Trap PDU.
PDU message len The lenght of the snmp PDU
Resquest ID number RequestIDs are used to distinguish among outstanding requests. By use of the RequestID, an SNMP application entity can correlate incoming responses with outstanding requests.
Error status

List of snmp error status

noError The returned snmp packet is correct
tooBig the size of the snmp response PDU generated would exceed a local limitation
noSuchName the snmp object's name does not exactly match the name of some
object available
badValue You try to assigne a value not supported by this snmp object
readOnly You try to do a snmp set on a snmp object in read only mode
genErr the value of the object cannot be retrieved for reasons
not covered by the protocol
Erro Index ErrorIndex may provide additional information by indicating which variable in a list caused the exception.
Variable Binding len The lenght of the variable binding, or VarBind. variable binding refers to the pairing of the name of a variable to the variable's value.
Var Len Lenght of the Object ID

A unique name called its "variable name." In general, the name of an SNMP variable is an OBJECT IDENTIFIER (ObjID) of the form x.y, For example, suppose one wanted to identify an instance of the variable sysDescr The object class for sysDescr is:

iso org dod internet mgmt mib system sysDescr
1 3 6 1 2 1 1 1

Type The type of the value types are :