Indusol#PROmesh P10+_Part03_Let’s Access the SNMP Server!

This is the third episode of Indusol’s networking equipment article, where we will expand on the SNMP Server in the PROmesh P10+, this time using SeeedStudio’s recomputer1025 and Node-Red, and the SNMP Server in the PROmesh P10+. We will show you how to access the SNMP Server of PROmesh P10+.

Come on, let’s enjoy FA.

Reference Link

http://soup01.com/en/category/indusol_en/

http://soup01.com/en/category/seeedstudio_en/

SNMP?

SNMP (Simple Network Management Protocol) is a widely used protocol for managing and monitoring network devices and applications on IP networks. It is part of the Internet Protocol Suite and facilitates the exchange of management information between network devices, enabling administrators to manage network performance, find and solve network problems, and plan network growth.

Main Characteristics

Client-Server Model

SNMP can operate in a client-server architecture.

  • The client is usually a management station.
  • Servers are network devices (also called managed devices) such as routers, switches, servers, and printers.

Agents and Managers

  • Agents are software components that run on managed devices and are responsible for collecting and storing management data and responding to requests from management applications.
  • Manager is a software application that communicates with agents to collect data, send commands, and receive notifications (traps) about network conditions.

Management Information Base (MIB)

The MIB is a hierarchical database that defines the properties of managed devices and consists of a data model that describes the data points of the device. Each variable that can be monitored or controlled is defined in the MIB.

Polling and Traps

SNMP operates in two main modes.

  • Polling: Manager periodically queries agents for information.
  • Traps: Agents send unsolicited notifications to the Manager when certain events occur.

Versions

There are several versions of SNMP, the most common being SNMPv1, SNMPv2c, and SNMPv3.

  • SNMPv1: The original SNMP version, providing basic functionality without security.
  • SNMPv2c: Improved error handling and bulk data retrieval, but lacks strong security.
  • SNMPv3: Adds security features such as encryption and authentication to address vulnerabilities in previous versions.

Applications of SNMP

SNMP can be used in a variety of situations, and its ease of use, versatility, and ability to work with a multitude of devices make SNMP an indispensable tool for network administrators. 

Network Monitoring 

Used to track network performance, availability, and detect faults.

Configuration Management

Enables remote configuration of devices, allowing administrators to change settings and parameters as needed.

Fault Detection

Automatically alerts administrators of device failures and network traffic anomalies.

Reporting and Analysis

Analyze network trends and gather performance metrics that can be used to assist in network planning.

Advantage?

By utilizing SNMP, organizations can effectively maintain and optimize their network infrastructure.

Simplicity

SNMP is easy to implement and use and is suitable for a wide variety of devices and applications.

Interoperability

SNMP supports a variety of devices from different manufacturers and can be easily integrated into diverse environments.

Standardized

Because it is part of the Internet Engineering Task Force (IETF) standards, it has been widely adopted by the industry.

Implementation

InduSol side

First we will use some free tools to access the SNMP Server in Indusol’s PROmesh P10+.

Download oid mib tools

Here is the free SNMP Browing tool we will be using. Download the tool from the link below and install it on your PC.

https://www.ireasoning.com/downloadmibbrowserfree.php

Browse oid object

Start the MIB Browser tool you have just installed.

Next, put the IP address of the PROmesh P10+ in the Address field.

Select Get Next from the Drop-List in Opertaion.

Done!!I was able to get the current value of sys.Descr.0 (1.3.6.1.2.1.1.10) for PROmesh P10+.

Since it is tedious to take them one at a time, issue a Walk command from Operation.

Done!I got all the OIDs and their current values with the SNMP Server of PROmesh P10+.

For example, if you want to know the OID of sysDescr.0, select the sysDescr.0 column and the OID value of the corresponding item will be displayed in the OID column.

Add User

Now add User to PROmesh P10+ to use SNMP V3.

This is the SNMP Community String and User configuration screen.

Let’s add a new User in the SNMP v3 section.

Node-red side

Now that we have confirmed the SNMP Server connection from the engineering tool, the next step is to access the PROmesh P10+ from Node-Red.

Install Flow

The Node used in this article will be this one.

node-red-node-snmp

https://flows.nodered.org/node/node-red-node-snmp/in/1rPldOSqKt6M

After successfully installing Node-red-node-snmp, the Node shown below will be added.

Flow1‐First Access to SNMP Server

The first Flow uses Inject Node to send the OID of the data to be acquired to the SNMP node and receive the results from the PROmesh P10+.

Add msg.oid and String Format parameters from Properties in the inject node. Also, set the value of msg.oid to the value obtained from the engineering tool.

The next step is to add the SNMP Node to Flow.

Configure the SNMP Node

Let’s configure SNMP Nodeno settings.

Host

Host is the IP address of the PROmesh P10+.

Version

PROmesh P10+ also supports Version V1/V2c/V3, so set it up according to your application.

Timeout

The Timeout time for a request should be set according to the network load.

Community

This time, SNMP v2c will be configured, so Community should be set according to PROmesh P10+.

OIDs

OIDs were set earlier in Inject Nodes, so leave this empty.

Inject the flow

Next, the output of Inject and the input of SNMP Node are connected.

Switch the Condition

Now add Switch Node to the SNMP node output.

Create a branch according to the SNMP Node output results.

Add Functions

Connects to different Function Nodes depending on the output from the Switch Node.

Function7

This is a function for direct string conversion from OctetString.

var data=msg.payload[0].value;

var d=Buffer.from(data).toString();
msg.payload=d;
return msg;
Function6

This function converts TimeTicks to strings.

var timeticks=msg.payload[0].value;

let totalSeconds = Math.floor(timeticks / 100);

const days = Math.floor(totalSeconds / 86400);
totalSeconds %= 86400;

const hours = Math.floor(totalSeconds / 3600);
totalSeconds %= 3600;

const minutes = Math.floor(totalSeconds / 60);
const seconds = totalSeconds % 60;

var workTime=String(days)+”d”+String(hours)+”h”+String(minutes)+”m”+String(seconds)+”s”;


msg.payload=workTime;
return msg;
Function8

This function changes an integer to a string.

var data=msg.payload.value;

msg.payload=String(data);

return msg;

Debug Output

Finally, add a Debug Node to check the output results.

Result

Done!We were able to successfully access the SNMP Server of the PROmesh P10+ and convert the data.

Flow2‐Request more oids in one inject

Flow2 shows how to access multiple OIDS Objects with a single Inject.

Add Inject

Add Inject and Function Node to the previous Flow.

Function9

Just use “,” to separate the OIDS between the OIDS whose properties you want to access.

var base =”1.3.6.1.2.1.2.2.1.8.”
var oid = base + “1,” + base + “2,” + base + “3,”+base + “4,” + base + “5,” + base + “6,”+base+”7,”+base+”8,”+base+”9,”+base+”10″;
msg.oid=oid;
return msg;

Connect with SNMP Node.

Result

Done!We were able to retrieve data for multiple OIDS.

Flow3‐Use Walker

The final step is to use the Walker Node.

Configure Walker Node

This is the setting screen for Walker Node.

Host

The Host field is the IP address of the PROmesh P10+.

Version

SNMP V3 will be used in this case.

Auth

Set the authentication method of the Walker Node to “AuthNoPriv”. This means password-only authentication.

Username

The Auth Key will be the name of the SNMP v3 User you just added with PROmesh P10+.

Auth Key

The Auth Key will be the password for the SNMP v3 User that was just added in PROmesh P10+.

Auth Port

The Auth Key is the authentication method for the SNMP v3 User that was just added in PROmesh P10+.

Result

Done!I was able to get the SNMP Node of PROmesh P10+ from Walker Node.

Footer_Basic

Please Support some devices for my blog

Amazon Gift List

Find ME

Twitter:@3threes2
Email:soup01threes*gmail.com (* to @)
YoutubeChannel:https://www.youtube.com/channel/UCQ3CHGAIXZAbeOC_9mjQiWQ

シェアする

  • このエントリーをはてなブックマークに追加

フォローする