SDN framework and its main components [71]. applications in the application layer. These help network administrators to programmati- cally shape the traffic and deploy services. In the SDN architecture for 5G networks, shown in Fig. 1.9, there are notably three layers: an infrastructure layer (user plane), a control layer (control plane), and an application layer (application plane). The infrastructure layer mainly consists of forwarding elements (e.g., physical and virtual switches, routers, wireless access points) that comprise the data plane. These devices are mainly responsible for collecting network status, storing them temporarily in local network devices, and sending the stored data to the network controllers and for managing packets based on the rules set by the network controllers or administrators. They allow the SDN architecture to perform packet switching and forwarding via an open inter- face. The control layer/control plane maintains the link between the application layer and the infrastructure layer through open interfaces. Three communication interfaces allow the controller to interact with other layers: the south-bound interface for interacting with the infrastructure layer, the north-bound interface for interacting with the application layer, and east-west-bound interfaces for communicating with groups of controllers. Their functions may include reporting network status and importing packet-forwarding rules and providing various service access points (SAPs) in various forms. The application layer is designed mainly to fulfill user requirements. It consists of the end-user business applications that uti- lize network services and resources. The SDN applications are able to control and access switching devices at the data layer through the control-plane interfaces. The SDN applica- tions include network visualization, dynamic access control, security, mobility, cloud com- puting, and load balancing. The functionalities of an SDN controller can be classified into four categories: (1) a high-level l