tiation. Traffic detection function provides communication service providers the opportunity to capitalize on analytics for traffic optimization, charging and content manipulation, working in conjunction with policy management and charging system. Traffic detection function enforces traffic policies based on predetermined rules or dynamically determined rules by the policy and charging rules function on data flows in real time. Traffic detection function was introduced together with Sd reference point as a means for traffic management in the 3GPP Rel-11 specifications using layer-7 traffic identification. 34 Chapter 1 Gx Gy Gw Gz S6b Gwn Gzn Gn/Gp -S5/S8- Pre-release 14 architecture Gx Gy Gw Gz S6b Gwn Gzn Gn/GpO SGW-C S5/S8C PGW-C TDF-C Gn/GpU SGW-U -S5/S8 PGW-U TDF-U 3GPP Release 14 architecture ehancements for CUPS Figure 1.12 Separation of control plane and user plane in EPC [1]. to the use of SDN concept in 3GPP networks. The following high-level principles were incorporated in the CUPS framework [8,36]: As shown in Fig. 1.12, the control-plane functions terminate control-plane protocols such as GTP-C, Diameter23 (Gx, Gy, Gz) and a control-plane function can interface multiple user-plane functions, as well as a user-plane function can be shared by multiple control-plane functions. A UE is served by a single SGW-C but multiple SGW-U can be selected for different packet data network (PDN) connections. A user-plane data packet may traverse multiple user-plane functions. Diameter is an application-layer protocol for authentication authorization and accounting. It is a message- based protocol, where authentication authorization and accounting nodes receive positive or negative acknowledgment for each message exchanged. For message exchange, Diameter uses the transmission con- trol protocol and stream control transmission protocol, which makes it more reliable. Diameter base protocol is specified in IETF RFC 6733 (https://tools.ietf.org/html/rfc6733). 5G Network Architecture The control-plane functions control the