Dokumen - Tips - Emulation of Iec 60870 5 104 Communication in Digital
Dokumen - Tips - Emulation of Iec 60870 5 104 Communication in Digital
Dokumen - Tips - Emulation of Iec 60870 5 104 Communication in Digital
1 Introduction
Digital transformation of electricity grid continues as more areas are being up-
dated in order to support smart grids. One of the most important elements in
an electricity distribution network to undergo this transformation was Digital
substations (DS). It brought advantages such as effective real-time monitoring,
higher resiliency, infrastructure simplification and cost reductions. The same
process is now reaching secondary substations [15].
These secondary substations have much smaller scope in terms of transformed
voltage, number of equipment and served area; but on the other hand, their
number is an order of higher magnitude. Their digital transformation is therefore
essential in order to create resilient and efficient smart grid [15].
?
This work was funded by the Research Council of Norway, Innovation Project for the
Industrial Sector - ENERGIX program, project number 296381 (Security of supply
in smartgrids with interacting digital systems).
2 F. Holik, D. Abraham, S. Yayilgan
To our best knowledge, there is no related work which would target emulation
approaches of DSS communication. There are general papers describing the pro-
tocol and its network characterization [12], communication scenarios [13] and
communication structure [14]. Several papers [9, 16, 17] address security of the
IEC104 protocol. These papers confirm the importance and usefulness of an
emulation model described in this work.
The IEC 60870-5-104 protocol (IEC104) [1] is mostly used for communication
between the control center and DS (both primary and secondary) and is therefore
build on top of a reliable TCP communication.
Emulation of DSS IEC 60870-5-104 Communication 3
This section describes two methods for creating an emulated topology of a DSS.
For illustration purposes, examples show topologies of two DSS and a simplified
control center.
Mininet [3] is an open-source tool for creating a virtual network, which can
contain hosts (end devices), switches and software-defined network controllers.
Mininet uses a lightweight virtualization where all devices share the kernel with
the host system. For this reason, Mininet is available only for Linux-based oper-
ating systems. This requirement can be avoided by installing Mininet within a
Linux-based virtual machine (VM). This also allows an easy export of the entire
model - including the DSS topology, the libIEC60870-5 library and any other
software tools. This method is recommended and shown in Figure 2.
Routing Simulation Routing can be ignored if all the topology devices are
located within the same subnet. If the routing behavior is required, it can be sim-
ulated with the use of software-defined networking (SDN). An SDN controller
can instruct switches of how to handle incoming messages. The traffic is for-
warded based on inserted flow rules. These rules might use almost any header
field (or multiple fields) in the message - MAC addresses, IP addresses, transport
layer ports, etc. Most of the common SDN controllers provide routing function-
ality, which can be easily enabled without the need to program it separately.
This method should not be used for any performance measurement as latency
can vary especially if flow rules must be processed on the SDN controller.
This approach uses virtual machines for emulation of RTUs, routers and the mon-
itoring control center host. Each device is implemented in one virtual machine
and a virtual network is created for their interconnection. A hosting platform for
this approach can use any virtualization tool (Oracle VM VirtualBox, VMware
Workstation, OpenStack, etc). Oracle VM VirtualBox [7] was used in this work.
The emulation schema is shown in Figure 3. Sensor and multimeter devices are
omitted from VMs as they would unnecessary increase the topology complexity.
Their messages are generated by the RTU (on the figure shown with dash lines).
The main advantage of this approach is a possibility to fully emulate routers,
which can be implemented as Linux-based hosts with appropriate tools, or as
general boxes with router operating systems (for example pfSense, VyOS, Open-
Wrt and its variants). In case of the DSS emulation, these routers have to be
configured with the following features:
6 F. Holik, D. Abraham, S. Yayilgan
Network Emulation The network emulation varies based on the used vir-
tualization technology. In Oracle VM VirtualBox, the internal network adapter
option should be used to interconnect neighboring devices (for example the RTU
to the router gateway). Name of the network must be the same on both devices.
These interfaces then have to be configured within virtual machines (to set up
theirs IP addresses, network masks and default gateways).
Optionally, an additional network adapter can be used for administration
(host-only adapter ) or for external access (NAT ). The host-only network can be
configured under the File/Host Network Manager, where an IP address of the
host and a DHCP server can be set.
4 Communication Emulation
The library libIEC60870-5 [4] is used for communication emulation in both em-
ulation methods. The library is written in C language and supports all major
operating systems including Linux, macOS and Windows. This library must be
installed on end nodes which varies based on the used emulation method. In
both methods, the library can be downloaded from the official webpage [4].
Emulation of DSS IEC 60870-5-104 Communication 7
Full Emulation Emulated end nodes (RTUs and the control center) must use
a supported operating system of the libIEC61850 library. This operating system
should be lightweight, well documented and up to date. One of the relevant ex-
amples is Linux Lite 5.2 (based on Ubuntu 20.04.01 with long term support) [5].
The library must be separately downloaded and decompressed on each emulated
device.
5 Library Evaluation
The topology presented in Figure 3 was implemented according to the description
in Section 4. The IEC104 traffic was then transmitted and analyzed by the
Wireshark tool [8]. Emulated traffic was compared to real traffic provided by
Norwegian National Smart Grid Laboratory [2]. This traffic is stated as ”real
traffic”.
8 F. Holik, D. Abraham, S. Yayilgan
Real Traffic Behavior Real data traffic is exchanged based on a polling mech-
anism. Typically, an S message (can be accompanied by an I message) is sent to
the monitoring device and the device then sends a measurement I message back.
Transmission is not bounded by time as it runs indefinitely.
io = (InformationObject)
MeasuredValueShortWithCP56Time2a_create(NULL, 3, 29.25,
IEC60870_QUALITY_GOOD, timestamp);
io = (InformationObject) SinglePointWithCP56Time2a_create(NULL,
11, false, IEC60870_QUALITY_GOOD,timestamp);
io = (InformationObject)
IntegratedTotalsWithCP56Time2a_create(NULL, 9, bcr,timestamp);
5.4 Discussion
The aforementioned library script modifications can create identical messages to
real traffic. This has been proven by comparing the traffic in the Wireshark tool.
Figure 4 shows comparison of M ME TF 1 messages - real traffic and emulated
using the script. It can be seen that the IEC104 messages contain same values
Emulation of DSS IEC 60870-5-104 Communication 11
Fig. 4. Comparison of real (left part) and emulated (right part) traffic
6 Conclusion
The analysis of the libIEC60870-5 library has shown that the tool can be used
to easily recreate messages with values corresponding to the real DSS or to
purposefully create messages with a potential to cause damage. This can be
used to verify security mechanisms or to test any other communication behavior
without a need to use a real DSS network.
The paper did not cover any performance measurements as these are irrel-
evant in DSS. IEC104 messages are mostly used for monitoring purposes and
not for real-time grid adjustments as is the case of GOOSE messages in DS. In
our future work, we would like to target emulation of these messages including
theirs performance comparison.
References