Davicom Cortex SNMP SET (Write) example on an IP-enabled Power Distribution Unit (PDU) (CyberPower)

This paper will guide you through the basics of setting up a Cortex unit to perform SNMP SET commands on an SNMP-enabled device. For this example, we are using a TCP/IP-enabled PDU from CyberPower to control one of its eight AC outlets. This setup could be used to power cycle (reboot) a router or other network equipment that has stopped responding to Ping requests for example.

The steps given here demonstrate a basic procedure that can be replicated with a variety of SNMP-enabled devices, with only minor changes.

To be able to configure and use a Cortex to control an SNMP-enabled device, six basic parameters are required, which are:

  1. IP address of the SNMP-enabled device
  2. Read & Write Community names of the SNMP-enabled device
  3. OID of the I/O’s to control
  4. I/O’s control values
  5. Value type of the control values
  6. SNMP Version

The next pages give explanations on how to obtain these parameters, and how to set them up in a Cortex.

The test setup requires the following:

  • A Davicom Cortex unit (can be provided later)
  • An SNMP-enabled device (CyberPower model PDU41001  in this example)
  • The MIB file of the SNMP-enabled device (available from the manufacturer, and sometimes downloadable from within the equipment itself)
  • A computer running a MIB browser (free version of iReasoning in this example)

Connect the Cortex, the PDU (or other SNMP-enabled device), and the computer to a local network, and set their IP parameters so that they can all communicate with each other.

Using the computer’s web browser, connect to the PDU and look at its SNMP settings. An example is given below.

Under the SNMP settings, enable the SNMP, set the Read Only Community name to public, and set the Read/Write Community name to private. These same two community names are often the ones used by default in SNMP equipment, but other ones might be used. Always check to make sure what they are. This device is now ready.

Typical SNMP configuration menu of an SNMP-enabled device.

Before performing SNMP commands on a piece of equipment, several things are required and must be known, like the OID number of the I/O’s to be controlled, and the different values needed to control these I/O’s. This information can be found in the MIB file.

For ease of understanding, we are using a live setup in this text, but it is possible to navigate through a MIB file without being connected to the SNMP-enabled device itself.

Launch iReasoning, go to its menu, click on the Advanced button, and fill-in the properties as shown in the image below (use the IP address of your SNMP-enabled device, not the address shown in the image).

Advanced properties menu of iReasoning.

Still in iReasoning, at the top, in the Address box, enter the IP address of your SNM-enabled device.

IP address of the SNMP-enabled device to be controlled from iReasoning.

Click on File, then Open MIBs, and browse to the location of the device MIB file. Once loaded, it will look like this.

A MIB file loaded into a MIB browser.

Browsing a MIB file allows you to see which I/O’s from the equipment are available for control. The MIB may also include information about other products or models, so it may be necessary to look for the desired device in the list. For example, the MIB listing shown below includes several products, like a UPS, a switch, a PDU, and a sensor. Always make sure to use the most recent MIB file that matches your device’s model or type.

We are interested in the PDU, which shows up in the list as ePDU.

Finding the proper SNMP device model in a MIB file list.

Expand the device’s tree and all the available I/O categories will become visible.

An expanded MIB file view showing all I/O categories available for control and monitoring.

Since we want to control an outlet, we look for just such a group name in the tree. The group highlighted in the screenshot below is the one that we are looking for.

Finding the right I/O control group in a MIB file.

Double-click on ePDUOutletControlOutletCommand and a list like the one below will show-up. The list shows all 8 outlets that are available for control. Click on the first line, which corresponds to Outlet #1.

Listing of the 8 PDU outlets in iReasoning.

Look at the top of iReasoning in the OID box: the numerical sequence that shows up is the actual OID of the Outlet #1 Control of the PDU, under which the outlet can be turned on or off by sending proper values. Take note of this exact numerical sequence as it will later be needed.

Exact and unique OID of the outlet #1 of the PDU.

Now that we have the OID of the outlet, let’s find the values needed to turn it on and off.

In iReasoning, with the ePDUOutletControlOutletCommand still selected, look at the lower left corner of the window, as seen in the screenshot below.

The Syntax box provides information about the type of values to use, which in this case is INTEGER, and also provides information about the different values to use in regards to the desired action to be made (On, Off, Reboot, etc.)

The Indexes box provides more information on the SNMP actions and the values to use. We see that:

  • To turn the outlet off, use the value given under immediateOff, which is 2.
  • To turn the outlet on, use the value given under immediateOn, which is 1.

These two values are the ones to use to turn the outlet on and off.

Looking at the details of an I/O in iReasoning.

At this point, to control the PDU, we have all of the required six basic parameters that are given at the beginning of this document:

  1. IP address of the SNMP-enabled device: (use yours, not this one)
  2. Read & Write Community names of the SNMP-enabled device: public and private
  3. OID of the I/O to control: .
  4. I/O`s control values: 1 (on) and 2 (off)
  5. Value type of the control values: Integer
  6. SNMP Version: V1

Factory defaults of the Cortex360 allow it to do SNMP commands, so no special options other than what is presented here are required. Note that the Cortex320 requires an option to be able to perform SNMP Manager commands.

Connect to the Cortex, and go to Outputs > SNMP SETs.

Click on the (Add)button.

Adding an SNMP SET Output in a Davicom Cortex unit.

Select a free SNMP SET Output from the ID list (basic units have 128 SET commands available).

Selecting a free SNMP SET Output from a Cortex.

Enter a description for the Active state and the Normal state.

Setting an SNMP SET Output with Normal and Active description.

Click on the Action tab.

As seen in the screenshot below, populate the highlighted areas with the information shown, but use the IP address of your SNMP-enabled device, not the one listed here. When done, save.

These settings are all the 6 basic ones that have been described earlier.

Configuration menu of a Cortex SNMP SET Output.

Click on either Test Normal or Test Active to send a SET command to control PDU outlet #1. It will turn it on or off depending on its current state.

Following the SNMP SET test, a validation message will appear to tell about the success of the command.

A validation message confirming the success of an SNMP SET command.

Congratulations! You have configured your first SNMP SET command in your Davicom Cortex unit.

Was this article helpful?
Dislike 0
Views: 642

Leave a Reply