# QoS Management and Flexible Traffic Detection Architecture for 5G Mobile Networks
## 4 Implementation and Analysis  
As proof of concept, a prototype with the topology shown in Figure 7 was created. It is constituted by eleven mobile network elements implemented as OpenFlow switches. Two of the switches represent OF-GW; two represent OF-NB; and seven represent backhaul Switches 1-7 (SW1-SW7). Additionally, four VMs (Virtual Machines) were created: three represent UE, and the fourth represents an application server. The application server represents a service to mobile UEs that requires specific QoS treatments.  
Mininet is used for the topology creation; Open vSwitch is used as the software switch that implements the OF-NB, backhaul mobile switches, and OF-GW; while the Controller is implemented using Ryu (all with support for OpenFlow 1.3 or higher due to the use of MPLS).  
The prototype implements the traffic detection logic and the EPS-Bearer with QoS creation procedure. Furthermore, it is implemented for both the backhaul and the core mobile network (the mobile access network is outside the scope of this work). Finally, the Controller was implemented as the mobile orchestrator with the functionalities of elements such as PCRF and SDD.  
Summarizing, the prototype is built to show the contribution listed next:  
* The proposed flexible traffic detection logic operation, giving an example of the different flow entries that compose it.  
* The proactive OpenFlow creation, which makes routes for the traffic immediately possible using the default EPS-Bearer without Controller interaction.
* The important characteristic of simultaneous traffic routing and traffic inspecting is detailed. In particular, an example of flow entry is described, which sends the QoS traffic by two pipelines, processing at the same time, one to route the traffic immediately using the default OF-Bearer and the other to process the traffic to identify the QoS requirements.
* It is indicated that the Controller creates an optimal EPS-Bearer with QoS, and the traffic is rerouted using it (examples of specific QoS flow entry to build the EPS-Bearer with QoS are given).
* The proposal uses MPLS, and the GTP-U protocol is not required.
* Finally, as all data plane mobile elements (as OF-GW, OF-NB, and switches) implement OpenFlow, Section 4.2 shows the solution flexibility, creating an optimal path that does not require using an OF-GW.  
As described in previous sections, the Controller initially creates the general flow entry to all OF-GW that can reach the other mobile elements, the application servers, and the PDN connection. Next, the Controller creates the default OF-Bearer that connects each OF-NB with the appropriate OF-GW and creates the OF-Bearers with QoS for massive services between OF-NBs and OF-GWs (using the appropriate MPLS labels). Finally, the traffic detection tables are inserted at all OF-NBs.  
The following examples start with the UEs attached and with the default EPS-Bearer created. In the case of UE 1, both are created, the default flow entry to UE 1 at eNodeB 1 (the uplink direction) and the default flow entry to UE 1 at OF-GW 1 (the downlink direction). These flow entries are responsible for linking the default Radio Bearer to UE 1 with the default OF-Bearer, building the default EPS-Bearer to UE 1 (a similar configuration is done to UE 2 at eNodeB 2 and OF-GW 2). Examples of the Flow entries are described in the following section.