DNP3 TCP Client Configuration example: Difference between revisions

From Teltonika Networks Wiki
(DNP3 configuration example)
m (Dziugas.Syminas moved page DNP3 TCP Master to DNP3 TCP Client Configuration example)
 
(35 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Summary
==Summary==
'''Distributed Network Protocol 3 (DNP3)''' is a set of communications protocols used between components in process automation systems. It is primarily used for communications between a “Client station” and Remote Terminal Units (RTUs) or Intelligent Electronic Devices (IEDs).


'''Distributed Network Protocol 3 (DNP3)''' is a set of communications protocols used between components in process automation systems. It is primarily used for communications between a “master station” and Remote Terminal Units (RTUs) or Intelligent Electronic Devices (IEDs).
This example provides an Step by Step instructions on how to configure DNP3 functionality in RUTX11 device. In this RUTX11 is configured as the TCP Client and DNP3 outstation to send data to a remote HTTPS server.


This example provides an Step by Step instructions on how to configuration DNP3 functionality in RUTX11 device.
==Installing DNP3 package==


'''Installing DNP3 Package'''
DNP3 can be installed using the package manager.


DNP3 can be installed using the package manager
Go to your devices '''WebUI → System → Package Manager''' and install the '''DNP3''' package.


Open the ‘Services’ tab and click the ‘Package Manager’ button. On DNP3 click the ‘+’ button to install DNP3 package.
[[File:Networking_RutOS_configuration_example_dnp3_2.png|border|class=tlt-border|alt=|1100px]]
[[File:Networking rutx11 example DNP3 installing dnp3 package v1.png|border| class=tlt-border]]


After that navigate to Services>DNP3


[[File:Networking rutx11 example DNP3 service features v1.png|border|class=tlt-border]]
==DNP3 TCP Client==


TCP Client requests specific information from DNP3 outstation through the communication channel.


DNP3 Protocol contains two features. ‘TCP MASTER’ and ‘DNP3 OUTSTATION’.
After the installation of '''DNP3''' package, navigate to '''Services → DNP3 → DNP3 TCP Client''' and click on '''Add''' button to add a new DNP3 instance.


'''TCP MASTER'''
[[File:Networking_RutOS_configuration_example_dnp3_1.png|border|class=tlt-border|alt=|1100px]]


TCP Master requests specific information from DNP3 outstation through the communication channel.
===TCP Configuration===


On this section we configure the parameters of the DNP3 Outstation that the Client will be querying with requests:


#'''Enable''' the instance;
#Choose your desired '''Name''';
#Choose the '''IP address''' - in this case we used routers LAN IP address;
#Choose the '''Port''' via which the communication will be done;
#Choose the '''Local Address''';
#Choose the '''Remote Address''';
#Choose the '''Period''';
#Choose the '''Timeout''';


[[File:Networking_RutOS_configuration_example_dnp3_3.png|border|class=tlt-border]]


To setup TCP MASTER click on the TCP Master Button and click ‘ADD’ to add a new master.
===Requests Configuration===
[[File:Networking rutx11 example DNP3 TCP master overview v1.png|border|class=tlt-border]]


To obtain data from DNP3 Outstation, we will need to configure a DNP3 instance. The DNP3 Client will send a request to the DNP3 outstation specifying the function codes to be sent. The outstation then sends the requested data back to the DNP3 Client.


'''TCP MASTER CONFIGURATION'''
Refer to [[RUTX11 DNP3#DNP3 Parameters|DNP3 Parameters]] for which parameters you want to read.


On this section we configure the parameters of the DNP3 Outstation that the Master will be querying with requests.
On the '''ADD NEW INSTANCE SECTION''' type the name of the instance. In this example, we want to read the serial number, so we will use the name '''Serial''':


[[File:Networking rutx11 example DNP3 tcp master configuration v1.png|border|class=tlt-border]]
#Specify the '''name''' of request;
#Click on '''Add''' button;
#Write the '''Start Index''' value;
#Write the '''End Index''' value;
#Choose the '''Data type''';
#'''Enable''' the request;
#Click on '''Save & Apply''' button once you are done configuring;


[[File:Networking_RutOS_configuration_example_dnp3_4.png|border|class=tlt-border|alt=|1100px]]


'''Requests Configuration'''
----


To obtain data from DNP3 Outstation configure a DNP3 instance. The DNP3 Master will send a request to DNP3 outstation specifying the function codes to be sent. The outstation then sends the requested data back to the DNP3 Master.
TCP Client should look like this:
[[File:Networking_RutOS_configuration_example_dnp3_5.png|border|class=tlt-border|1100px]]


On the ‘ADD NEW INSTANCE SECTION’ type the name of the instance. In this example we want to read the serial number, so we type ‘serial’.
==DNP3 outstation==


[[File:Networking rutx11 example DNP3 requests configuration v1.png|border|class=tlt-border]]
A DNP3 Outstation component communicates with a single Client via a communication channel.


To configure the DNP3 Outstation Go to '''Services → DNP3 → DNP3 OUTSTATION'''


Refer to [[RUTX11 DNP3#DNP3 Parameters|DNP3 Parameters]] and set the serial parameter.
===DNP3 Outstation Configuration===


The serial parameter is '5' with the group type 'octet string' and then ‘SAVE & APPLY’
#'''Enable''' the instance;
#Write the '''Local Address''';
#Write the '''Remote Address''';
#Write the '''Port''' via which the communication should be done;
#'''Enable Allow Remote Access''' if you wish to communicate externally;


TCP MASTER should look like this.
[[File:Networking_RutOS_configuration_example_dnp3_6.png|border|class=tlt-border]]




'''DNP3 OUTSTATION'''
'''NOTE:''' The Local Address and the Remote Address configuration in TCP Client and DNP3 Outstation are configured in reverse such that the Local address in TCP Client is the Remote address in the DNP3 Outstation and vice versa.


A DNP3 Outstation component communicates with a single master via a communication channel.
==Testing DNP3==


To configure the DNP3 Outstation Go to Services> DNP3> DNP3 OUTSTATION
To test DNP3 protocol, we can go to '''Services DNP3 DNP3 TCP Client''' and edit the TCP client that we had set up:


'''DNP3 OUTSTATION CONFIGURATION'''
[[File: Networking_RutOS_configuration_example_dnp3_8.png|border|class=tlt-border|alt=|1100px]]
[[File:Networking rutx11 example DNP3 dnp3 outstation configuration v1.png|border|class=tlt-border]]
----


Then scroll down to the '''Request configuration testing''' section and choose the request you want to test and click on '''Test''' button. It should show you the output of your request:


'''NOTE: Th'''e Local Address and the Remote Address configuration in TCP Master and DNP3 Outstation are configured in reverse such that the Local address in TCP Master is the Remote address in the DNP3 Outstation and vice versa.
[[File:Networking_RutOS_configuration_example_dnp3_7.png|border|class=tlt-border|alt=|1100px]]


'''TESTING DNP3'''


To test DNP3 protocol set up an account with the [https://beeceptor.com/ beeceptor] and create an endpoint.
[[Category:DNP3]]
[[File:Networking rutx11 example DNP3 endpoint creating beeceptor v1.png|border|class=tlt-border]]
 
 
Create the DNP3 Testing endpoint and copy the generated endpoint link as shown below.
[[File:Networking rutx11 example DNP3 dnp3testing endpoint v1.png|border|class=tlt-border]]
 
DATA TO SERVER
 
Navigate to Services> Data to Server and set up the server.
 
Set the JSON according to the kind of data you want to include. For this example, we will use.
 
{"Date": "%d", "Remote IP": %r, "Data": %o}
 
[[File:Networking rutx11 example DNP3 data to server configuration v1.png|border|class=tlt-border]]
 
Proceed to [https://beeceptor.com/ beeceptor] to check the results
 
[[File:Networking rutx11 example DNP3 dnp3testing beeceptor post v1.png|border|class=tlt-border]]
 
 
Click on POST to check the results. You should see results like this.
[[File:Networking rutx11 example DNP3 dnp3testing results v1.png|border|class=tlt-border]]
 
Category: [[RUTX11 Configuration Examples]]

Latest revision as of 11:45, 22 October 2024

Main Page > General Information > Configuration Examples > DNP3 > DNP3 TCP Client Configuration example

Summary

Distributed Network Protocol 3 (DNP3) is a set of communications protocols used between components in process automation systems. It is primarily used for communications between a “Client station” and Remote Terminal Units (RTUs) or Intelligent Electronic Devices (IEDs).

This example provides an Step by Step instructions on how to configure DNP3 functionality in RUTX11 device. In this RUTX11 is configured as the TCP Client and DNP3 outstation to send data to a remote HTTPS server.

Installing DNP3 package

DNP3 can be installed using the package manager.

Go to your devices WebUI → System → Package Manager and install the DNP3 package.


DNP3 TCP Client

TCP Client requests specific information from DNP3 outstation through the communication channel.

After the installation of DNP3 package, navigate to Services → DNP3 → DNP3 TCP Client and click on Add button to add a new DNP3 instance.

TCP Configuration

On this section we configure the parameters of the DNP3 Outstation that the Client will be querying with requests:

  1. Enable the instance;
  2. Choose your desired Name;
  3. Choose the IP address - in this case we used routers LAN IP address;
  4. Choose the Port via which the communication will be done;
  5. Choose the Local Address;
  6. Choose the Remote Address;
  7. Choose the Period;
  8. Choose the Timeout;

Requests Configuration

To obtain data from DNP3 Outstation, we will need to configure a DNP3 instance. The DNP3 Client will send a request to the DNP3 outstation specifying the function codes to be sent. The outstation then sends the requested data back to the DNP3 Client.

Refer to DNP3 Parameters for which parameters you want to read.

On the ADD NEW INSTANCE SECTION type the name of the instance. In this example, we want to read the serial number, so we will use the name Serial:

  1. Specify the name of request;
  2. Click on Add button;
  3. Write the Start Index value;
  4. Write the End Index value;
  5. Choose the Data type;
  6. Enable the request;
  7. Click on Save & Apply button once you are done configuring;


TCP Client should look like this:

DNP3 outstation

A DNP3 Outstation component communicates with a single Client via a communication channel.

To configure the DNP3 Outstation Go to Services → DNP3 → DNP3 OUTSTATION

DNP3 Outstation Configuration

  1. Enable the instance;
  2. Write the Local Address;
  3. Write the Remote Address;
  4. Write the Port via which the communication should be done;
  5. Enable Allow Remote Access if you wish to communicate externally;


NOTE: The Local Address and the Remote Address configuration in TCP Client and DNP3 Outstation are configured in reverse such that the Local address in TCP Client is the Remote address in the DNP3 Outstation and vice versa.

Testing DNP3

To test DNP3 protocol, we can go to Services → DNP3 → DNP3 TCP Client and edit the TCP client that we had set up:


Then scroll down to the Request configuration testing section and choose the request you want to test and click on Test button. It should show you the output of your request: