data plane rules and forwarding tables in SDN- based sensor networks has been presented. The data plane rules are configured by the control plane through southbound application platform interface (API) such as OpenFlow protocol. The control plane in the SDN-based sensor networks manages the sensors through forwarding data that is based on specified flow table and rules [105]. The SDN offers to the network administrators the ability to manage and control the data flow and to modify the characteristics of switching or routing devices from a centralized location by using software modules [105]. Several benefits can be gained by adopting SDN within the 5G RAN as follows [107]: 1. Decoupling the control and data planes. 2. Forwarding decisions flow-based instead of destination-based. 3. Control logic is moved to an external entity defined as SDN controller. 4. Several nodes can be controlled and managed by a SDN controller. 5. Enabling programmability where the network can be programmed via software modules running on the top of the SDN controller. In the meanwhile, several benefits can be gained by adopting SDN within MEC. SDN within MEC has been found to improve the devices management, reduce the delay, and eliminate the bottlenecks not only in the data plane but also in the control plane. The MEC can host device management functions that facilitate the control of a subset of end-user devices. In this context, the adoption of SDN shows an improvement in terms of fault detection and device provisioning time, energy consumption, and CPU usage [108]. Furthermore, the flexibility and programmability features of SDN facilitate the deployment of MEC-related functions at the edge. In addition, the SDN multi-tenancy supports the creation of an open environment across multi-vendor platforms at the edge [109, 110]. 1.4.1.1 SDN Architecture The ONF has defined an architectural framework for SDN as presented in Fig. 1.8. The SDN architecture in Fig. 1.8 is composed of infrastructure layer, control layer, and application layer. 