# Implementation of a Lossless Moving Target Defense Mechanism
## 3 SDN Concept  
In traditional computer networks, each network node, such as a switch or router, has a fully implemented data plane and a control plane. The proper functioning of such a network necessitates applications running on individual nodes be compatible with each other. Considering that computer networks comprise heterogeneous devices, i.e., from different manufacturers and running different operating systems, application interoperability is sometimes significantly hindered. Furthermore, the need to ensure cooperation between applications restricts the functionality of the network being built. To make a particular service available throughout the network, control-layer applications must be running on all network devices (see Figure 1a). Naturally, applications that perform basic network functions, such as handling routing protocols, i.e., Open Shortest Path First (OSPF), Intermediate System to Intermediate System (IS-IS), Border Gateway Protocol (BGP), etc., or the DHCP protocol, are typically integrated in the operating systems of network devices. The use of advanced functions or applications necessitates their incorporation into the software stack of network devices, which is often an extremely difficult task. In SDNs, device planes are separated, with only the data plane implemented within the devices, and the control plane is separate, as shown in Figure 1b. Devices that perform the tasks of the data plane, known as SDN switches, are responsible for forwarding data between their inputs and outputs. A set of SDN switches managed by the same SDN controller is called an SDN. The rules for forwarding data are defined by devices that perform control plane functions, known as SDN controllers. Information about the rules  
Figure 1: Differences between traditional networks and SDNs. governing the operation of SDN switches is stored in flow tables. Data exchange between the controller and SDN switches can occur using the standard OpenFlow protocol. The primary advantage of SDN networks is their configurational flexibility and the ease of adding new services and enabling virtualization. This is made possible by using an SDN controller as a central device. In many solutions, centralizing control functions can become a bottleneck for network performance. However, in SDNs, centralizing the control layer along with flow tables on each device implementing the data plane increases network efficiency, allowing for the customization of the features offered to meet user requirements. The structure of SDNs is defined by the Open Networking Foundation (ONF) [40]. In Figure 2, the basic elements of an SDN are presented. The architecture and elements defined by the ONF should be considered as recommendations only. Each network equipment provider may employ a different approach and their own solutions when it comes to implementing SDNs. The vast majority of network hardware providers utilize the ONF recommendations, in which each SDN controller implements at least two types of interfaces, as shown in Figure 2. The northbound interface is used for communication between the SDN controller and user applications. By using Application Programming Interfaces (APIs) software, applications can influence the operation of the entire network by implementing various scenarios. The availability of a wide range of SDN controllers written in various programming languages allows for the selection of a solution tailored to the specific requirements. The ability to add applications that implement nonstandard functions is a significant advantage of SDNs. Another key component is the southbound interface, which facilitates the exchange of information between the SDN controller and the SDN switch. Through this interface, the controller receives telemetry data from the attached SDN switches and sends flow table updates. The well-known protocol used for data exchange through the southbound interface is the OpenFlow protocol, as described in the standard [41]. Its purpose is to modify the flow table in the controller.