# Low-Cost Software Evaluation of Communication Delays in Networked Industrial Systems
## 2 Related Works  
Efficient and effective modern network management cannot be without latency, since it is a key factor deeply affecting performance, and subsequently QoS requirements, real-time constraints in industrial and critical infrastructures [3], and network behavior in general [4]. Many papers and tools propose techniques to measure latency at runtime, when the system is in operation [5]. Among them, [6] uses passive techniques without injecting ad hoc crafted packets in the network; thus relying only on preexisting traffic and with the undoubted advantage of leaving the system completely unaffected by those measurements. The other side of the coin is that a precise interpretation of the obtained data can be difficult, as they are computed by monitoring network packets whose statistical properties are a priori unknown and cannot be changed. On the other hand, [7] actively injects probe packets into the running system, providing complementary advantages and drawbacks with respect to passive techniques. Probe packets perturb the system to some extent, but their properties, (such as payload length and generation law) can be precisely controlled, leading to higher precision and confidence about measured data.  
Latency evaluation has been addressed in different environments as follows: data centers [8; 9], SDN-based networks [5; 10; 11], radio communications [12], smart grids [13], IoT systems [14], proactive intrusion response [15], and clouds [16], that is, complex infrastructures where measured timings range from microseconds to milliseconds and more. In this work, we propose an infrastructure and methodology able to deal with even sub-microsecond latency, allowing us to build and verify the behavioral model of a DUT, as [17], to derive models for specific DUTs only, namely, low-capacity programmable switches for industrial environments.  
Latency evaluation, targeting individual hardware and/or software devices or small networks as DUTs, is aimed at obtaining deep knowledge about DUT behavior and performance. To achieve this, the obtained results must be both accurate and precise, starting from the first, unavoidable component, the traffic generator [18]. Some generators require ad hoc, i.e., not commonly available, hardware support to achieve their goals as follows: [19] is built on a FPGA, and [20] relies on a programmable switch ASIC.  
One of the most well-known and widespread traffic generators is iperf3 [21], but it does not match our needs in terms of packet generation periodicity and burstiness, as shown in Section 5. The authors of [22] propose a very precise, PTP-based measurement setup, further enhanced by removing the uncertainty caused by PTP synchronization. The achieved precision relies on an ad hoc external reference clock, thus affecting portability, one of our main goals.  
MoonGen [23; 24] has very good performance, even comparable to costly hardware-based generators [25] if traffic is generated exploiting the hardware assistance [26; 27] provided by few Intel NICs like the X550 [28], when they are managed by specific Linux device drivers and kernel versions. Further requirements are posed, for instance, on the number of available CPU cores. Those demanding hardware and software requirements make MoonGen poorly compatible with our goal of supporting a wide variety of packet generation platforms, possibly already deployed for different purposes, in the network under test, as mentioned in Section 1.  
Actually, despite MoonGen also having two operating modes that do not require special NICs, they were found unable to fully satisfy the requirements of the present work, as discussed in Section 5 in more details.