## 1 Introduction
### Motivation  
As Industrial IoT (IIoT) applications continue to expand, the importance of network simulation and emulation becomes increasingly critical for several reasons. IIoT systems typically consist of a vast array of interconnected devices, sensors, and applications, all of which must function cohesively in real-world operational environments and under a wide range of operating conditions. Building a physical testbed for IIoT applications can be prohibitively expensive and time-consuming [5]. By leveraging simulation and emulation techniques, organizations can significantly reduce the costs associated with hardware procurement, installation, and maintenance. Virtual environments allow for rapid prototyping and testing, enabling organizations to iterate designs quickly and efficiently before deploying them in real-world environments. They also provide an important stepping stone to Digital Twins. As IIoT applications scale, network performance under varying loads becomes an essential consideration. Network simulation provides a means to assess how systems perform as they expand, testing different configurations and scales of operation. Emulation further enables organizations to simulate high-stress conditions, offering insights into the resilience and robustness of the system under various network disruptions. With the rise of cyber threats targeting IIoT systems, testing security protocols in a controlled environment is essential. Network simulation allows for examining potential attack vectors, enabling organizations to strengthen their defenses before systems are deployed in the field. Organizations can better prepare for real-world threats by emulating various attack scenarios, ensuring that their systems are resilient to emerging risks. IIoT ecosystems often involve devices from multiple vendors, each with its own implementation of communication protocols. This diversity in protocol support can lead to discrepancies in how devices behave, which may create security vulnerabilities that are not apparent when considering protocols in isolation [6]. For example, different vendors may implement the same protocol with slight variations in timing, error handling, or message parsing, which can introduce interoperability issues between devices from different vendors. A key goal of this paper is to develop a framework that can be leveraged to identify potential vulnerabilities before production deployment, as well as to capture and characterize each device's operating behavior to improve cybersecurity posture and awareness. In critical infrastructure sectors, awareness of potential vulnerabilities, implementation variations, and performance considerations is vital for ensuring secure, robust, and reliable operations. However, there remains a lack of comprehensive and versatile test solutions available for individual device protocol evaluations that also achieve high fidelity in representing production networks [7]. In this paper, we thus introduce an end-to-end framework for evaluating OT protocols and their on-device implementations within IIoT environments. The proposed framework combines formal modeling, a physical testbed coupled with hardware-in-the-loop (HIL) network emulation for device behavior profiling used to develop a high-fidelity representation model of the device under test, and a network scenario simulation stage that utilizes these device profiles to assess the security and performance of OT protocol implementations. Formal modeling is conducted using the Construction and Analysis of Distributed Processes (CADP) toolset, where the Lotos New Technology (LNT) specification language is employed to identify critical transition states within the protocol's specification. These critical states are used to identify potential areas of concern for cybersecurity vulnerabilities, especially if implemented incorrectly, and allow us to define test cases for individual OT devices in combination with a test harness.