11             Protocol Data Units (PDUs)

MIB Explorer provides means to easily compose SNMP PDUs with the PDUs tab from the info panel. A variable binding can be appended to a PDU by simply dragging the corresponding MIB tree node into the PDU editor table. PDUs created with the PDUs tab can be used for the following purposes:

To Create a New PDU:

1.   Select the PDUs tab from the main window's tools panel.

2.   Press the New button to create a new PDU. If you want to create a trap, notification or INFORM PDU, then press the New Trap button instead. A new PDU will be created and displayed on the right hand side.

3.   Edit the PDU.

To Open a PDU:

1.   Select the PDUs tab from the main window's tools panel.

2.   Press the Open button to open a previously saved PDU from disk. If the extension of the file is xml then it has to follow the XML schema MIBExplorerPDU.xsd. Otherwise, the file will be opened with MIB Explorer's internal PDU file format.

3.   Select the PDU file in the file open dialog and press Open. The corre­sponding PDU will be displayed on the right hand side.

To Save a PDU:

1.   Select the PDU to save in the PDUs tab.

2.   Press the Save As button. A file selection dialog will be displayed. Select a file or enter a new filename to save the PDU to. To save the PDU as a XML file following the XML schema MIBEx­plorerPDU.xsd, use a file name with the extension xml (case insen­sitive). The MIBExplorerPDU.xsd located in the xsd directory of the MIB Explorer installation. For all other extensions, MIB Explorer's internal PDU file format is used.

3.   Press OK. When the PDU is saved successfully, the change list will be cleared.

To Close a PDU:

1.   Select the PDU to save in the PDUs tab.

2.   Press Close. If there are any unsaved changes, you will be prompted for saving them.

11.1            Editing PDUs

The PDU editor can be used to create a SNMP PDU by specifying the variable bindings contained in the PDU. Each row in the editor represents a variable binding. The row positions correspond to the variable binding positions of the edited PDU. A variable binding is specified by supplying values for the following columns

1.   Object ID

Specifies the object identifier of the variable binding. This value must be given for each row.  

2.   Syntax

Specifies the SMI syntax of the value supplied in the third column. If syntax Null is chosen, a value must not be specified.

3.   Value

The actual value of the variable binding. The format of the value depends on the chosen syntax in the second colum. The formats are the same as for the Set Dialog.  

To create correct trap and inform PDUs the first variable binding has to be a sysUpTime.0 instance with a TimeTicks syntax and the second binding has to be a snmpTrapOID.0 instance with an OID syntax. For SNMPv1, the required enterprise, genericID, and specificID fields are automatically determined from these two variable bindings if the target uses SNMPv1 and the PDU type is TRAP. If you want to specify the agentIpAddress field of the SNMPv1 trap, then include a snmpTrapAddress.0 (1.3.6.1.6.3.18.1.3.0) variable binding with syntax IpAddress as third variable binding in the trap PDU.

11.2            Context Menu

With the Unlock option of the PDU table's context menu, you can unlock the Object ID and Syntax columns of variable bindings that have been dropped from the MIB tree into the PDU. Unless such a variable binding has not been unlocked, you cannot edit its object ID and syntax.

In addition, the display and input format for variable bindings with OCTET STRING syntax can be chosen. The available formats are listed in the table below.

Table 6: Column syntax formats of the PDU editor.

Format

Description

Sample Value Display of „aBc“

ASCII

Plain text formatting.

aBc

Decimal

Formats each byte as a decimal value with a dot (".") as separator.

97.66.99

Hexadecimal

Formats each byte as a hexadecimal value with a colon (":") as separator.

61:42:63

Octal

Formats each byte as a octal value with a colon (":") as separator.

141:102:143

Binary

Formats each byte as a binary value with a colon (":") as separator.

1100001:1000010:1100011

MIB

Uses the format defined by the DISPLAY-HINT clause of the corresponding OBJECT-TYPE definition (if available) otherwise the Hexadecimal format will be used if non-printable characters occur.

Depends on the MIB format!

11.3            Toolbars

11.3.1         Main Toolbar

Figure 6:                                 PDU Editor‘s main toolbar.
PDU-Main-ToolBar.gif

 

Adds a new row representing a variable binding before the selected row. If no row is selected, the row will be added at the end of the PDU.

Duplicate the selected row (variable binding).

Remove the selected rows (variable bindings) from the PDU.

Move the selected variable binding(s) one position to the beginning of the PDU.

Move the selected variable binding(s) one position to the end of the PDU.

Sends the PDU's variable bindings as a single SET request PDU to the current target agent. If the target agent returns an error, then the corresponding error message and error index will be displayed in the status bar.

Open a dialog for choosing one or more targets to send the variable bindings of the current PDU to.

Defines the PDU type to be used by any Refresh operation (man­ual or periodic) and defines the pre-selected PDU type for “Send PDU to Targets”.

Sends the current PDU as a PDU of the selected type (see “PDU Type Selection”) request to the current agent. The values of the variable bindings in the sent request are set to the SNMP Null syntax for GET, GETNEXT and GETBULK PDU types. The values of each variable binding will be replaced with the value returned by the agent. If the agent returns an exception value (SNMPv2c or SNMPv3 targets only) that corresponding value will be displayed with orange back­ground. If the agent returns an error, the corresponding message and error index will be displayed in the status bar and no value will be changed.

Redo the last change made to the PDU (if there is any in the redo stack).

Undo the last change made. The undo stack is reset when the PDU is saved.

Detach the PDU from the main window and show it in its own win­dow.

Attach a previously detached window to the main window again.

11.3.2         Periodic Refresh Toolbar

Figure 7:                                 PDU editor‘s periodic refresh toolbar.
PDU-Editor-Refresh-ToolBar.gif

 

Specifies the refresh interval in seconds. You can either use the pre­defined values or enter your own value. By pressing <Enter>, period­ically refresh starts with the given refresh interval. 0 deactivates periodical refresh.

Starts periodically refresh, if the refresh interval value is not zero (or "disabled").

Stops the periodical refresh.

Shows the percentage of the refresh period left until next refresh.

By pressing the toggle button, you can specify a comma separated value (CSV) text file to save the PDU data to whenever it is refreshed. The CSV file can be later opened by a spreadsheet application. As long as the toggle button is pressed, refreshed table data will be written or appended to the file. If the file already exists you can choose whether new data should replace existing data in the file or if the new data should be appended. If a file does not exist, then the new data will be appended. This is also the case, if the periodic refresh is enabled.

11.4            Sending a PDU

MIB Explorer is able to send any type of SNMP PDU to one or more targets at once. Because trap (SNMPv1 only), notification, and INFORM PDUs have a slightly different format than other SNMP PDUs, they always require two variable bindings which are as follows:

1.   The first variable binding in a trap, notification or INFORM PDU has to be a sysUpTime.0 instance (1.3.6.1.2.1.1.3.0) with syntax TimeTicks.

2.   The second variable binding in a trap, notification or INFORM PDU has to be a

3.   snmpTrapOID.0 instance (1.3.6.1.6.3.1.1.4.1.0) with syn­tax OBJECT-IDENTIFIER.

To specify the agent IP address of a SNMPv1 trap PDU, you may add a snmpTrapAddress.0 instance (1.3.6.1.6.3.18.1.3.0) as the third variable binding. If the third variable binding is not snmpTrapAddress.0, then the agent address will be set to "0.0.0.0".

To send a PDU

1.   Create or open a PDU. If you want to send a trap, notification, or INFORM PDU, then create a new PDU using the New Trap button in the PDUs tab.

2.   Add all variable bindings you want in the PDU to the variable bind­ings table. See “Editing PDUs” on page 74. 

3.   Press the Send PDU (MIB_Explorer_Manual00115.gif) button in the PDUs toolbar. A dialog win­dow will be shown, where you can specify the targets to send the PDU to.

4.   Add those targets to the Selected Targets panel on the right side. The current target will be added to the selected targets by default.

5.   Select the PDU Type. If the PDU does not contain the two required variable bindings for TRAP and INFORM PDUs listed above, then the GET, SET, GETNEXT, and GETBULK PDU types will be avail­able only.

6.   If you have chosen GETBULK as PDU type, specify the number of non-repeaters in the PDU and the maximum repetitions for the repeatedly requested variable bindings.

Note: If you select GETBULK for a SNMPv1 target, then MIB Explorer will send a GETNEXT request instead.

7.   Press OK to send the PDU to the selected targets.

After pressing OK, MIB Explorer will display a Result Window. It contains a table, which displays for each target the status of the respective SNMP request. If a request is successfully finished, the status column will be "Success". Since a TRAP request is not responded, its status will be "Success" when it has been sent successfully. This does not imply that the target has received it! For all other PDU types where the request has not timed out, you can click on the row in the status table to show the response PDU of the respective target.

The Response PDU table displays the variable bindings of the selected target's response (if any response is available) in the same manner as described for the Browse Tab.

If a target responded with an error, the error status will be displayed in the Status column. Is the error index greater than zero, then the corresponding variable binding will be displayed with a red background.

Variable bindings with OIDs that are not known (cannot be resolved with the currently loaded MIB modules) are displayed with orange background.