# QoS Management and Flexible Traffic Detection Architecture for 5G Mobile Networks
## 4 Implementation and Analysis
### Example 1, EPS-Bearer with QoS to the Application Server  
Figure 7 shows the default OF-Bearer between the OF-NB 1 and the OF-GW 1 (using SW1 and SW4) and the OF-Bearers with QoS between OF-NB 1 and both OF-GWs (proactively created for  
Figure 7: Prototype: Example 1, EPS-Bearer with QoS to the application server. SW, Switch; PDN, Package Data Network.  
massive QoS services). The OF-Bearers with QoS between OF-NB 1 and OF-GW 2 represent an optimal path with minimal delay for the OF-NB 1 to reach the application server (Example 1).  
Initially, the traffic from the UE 1 to the application server matches the default flow entry to UE 1. Next is shown an example of this flow entry:  
_cookie=0x0, duration=35.568s, table=0, n_packets=0, n_bytes=0, ip,nw_src=10.1.2 actions=push_mpls:0x8847,set_field:1010102\(->\)mpls_label, push_mpls:0x8847,set_field:100001\(->\)mpls_label, dec_mpls_ttl,output:1,goto_table:15_  
It can be seen that the flow entry processes the packets simultaneously through two pipelines: one inserting the two MPLS labels and sending the packets copy through the output Port 1 using the default OF-Bearer to reach the application server (see Figure 7); the other pipeline uses the goto tableaction, which sends the packet to Table 15 (traffic detection table to service profile to UE 1).  
When the packet arrives at the traffic detection table, it matches the flow entry to service detection, which detects traffic with the destination to the 20.20.20.20 IP address:  
_cookie=0x0, duration=42.918s, table=15, n_packets=0, n_bytes=0, priority=3500,ip,nw_dst=20.20.20 actions=CONTROLER:65535_  
As SSD is implemented in the Controller, the flow entry to service detection has an application action of the Controller type; then, detected traffic is sent to the Controller.  
The Controller processes the packet-in message, then determines that the traffic must be routed using the OF-Bearer with QoS between OF-NB 1 and OF-GW 2. Next, the Controller creates the specific service flow entry at OF-NB 1 and OF-GW2 to build the required EPS-Bearer with QoS (see Figure 7).  
Finally, the specific service flow entry at OF-NB 1 routes the traffic from UE 1 to the application server using the OF-Bearer with QoS.  
_cookie=0x0, duration=85.369s, table=0, n_packets=0, n_bytes=0, priority=4000,ip,nw_src=10.1.2, ip,nw_dst=20.20.20 actions=push_mpls:0x8847,set_field:510102\(->\)mpls_label, push_mpls:0x8847,set_field:50102\(->\)mpls_label, dec_mpls_ttl,output:1_  
The matching criteria used consider both the source UE 1 IP address (10.1.1.2) and the application server target IP address (20.20.20.20). Furthermore, the default flow entry adds two MPLS labels to define the EPS-Bearer with QoS. The 510102 (inner label) identifies the UE 1/Radio Bearer with QoS, and the 50102 (outer label) identifies the OF-Bearer with QoS. Finally, it is important to note that the specific service flow entry has more priority than other types of flow entries. Then, the traffic from UE 1 to the application service matches this specific flow entry and routes the traffic through the EPS-Bearer with QoS, as can be seen in Figure 7.