How can we make the core network of mobile networks more flexible? That's what we will see in this video. Let's take the case of the traditional 4G architecture for the core network. We have the Serving Gateway and the Packet Gateway. If we analyze, we see that there is a mix between the User Plane and Control Plane. First of all, we have two protocols between S-Gateway and P-Gateway. Data Packet Management and tunneling (or encapsulation/ decapsulation) is managed by the GTP-U protocol: GPRS Tunnel Protocol in the User Plane. We have also exchanges to establish tunnels or to release them. This is made by GTP-C, GPRS Tunnel Protocol in the Control Plane. In the equipment functions, we also sometimes have a mixture of types. For example, the P-Gateway will accept user packets, process them, and add or remove headers. It's a gateway for the user data and it's clearly in the User Plane. But the P-Gateway also allocates the IP address to a UE when a user connects to the network and that is a Control Plane function. This mixture of types makes virtualization difficult. Indeed, to virtualize and have instances of functions that can start dynamically or be stopped, we need to have well identified and well isolated functions. The idea of CUPS, or Control and User Plane Separation, is precisely to separate everything related to the User Plane from everything in the Control Plane. We'll have two functions, P/SGW-C for control, and PGW-U for processing user packets by the P-Gateway. What is this processing? Well, Packet Forwarding with encapsulation or decapsulation for tunneling, Packet Inspection, for security purposes or to manage a priority rule, and thus have different quality of service levels. That is what we call QoS enforcement. This separation is possible in 4G, but it's also in 5G. The functions in the User Plane are exactly the same as before, but they are implemented by a function called UPF or User Plane Function. All the control functions are placed in the SMF for Session Management Function. Why is kept attractive? Well, precisely because it allows CP and UP functions to be independent. It's possible to keep existing CP instances and start new UP instances or otherwise, to keep the existing UP instances and start CP instances. They are independent of each other. The advantage is therefore elasticity. If for example, the data flows are more and more significant, namely, there is more and more data per flow, then we can start new UP functions. The other advantage that we can locate UP functions wherever we want. It's not hard to imagine that on the radio side, there could be UP functions that are triggered dynamically to allow processing as close as possible to the user, reducing latency. Let's see how processing is formalized in the UPF. Let's look at the classical example of a packet that arrives from an external network and is sent to the terminal. In this packet, we will find the address of the UE which is the destination address. What does the UPF do? It analyzes this address and from the address of the UE, it finds the corresponding tunnel. Once the UE is identified, it adds the GTP header, adds the UDP header, add the IP header, and finally, forwards the packet to the gNB. In the destination address, we're going to find the IP address of the gNB. The packet should be sent through the right channel. We find the TEID that has been allocated for this particular UE, namely the TEID allocated by the gNB. If we formalize what happened first, the received packet was analyzed by looking for the UE address. This will form what is called a "Packet Detection Rule" or PDR. This Packet Detection Rule is associated with "Forwarding Action Rule" (FAR). This involves adding the GTP-U, UDP, and IP headers. If we look at a packet that is sent by a terminal, well, we have something equivalent but slightly different. What is analyzed to identify the tunnel? It's the TEID. From the TEID, we determine which processing is appropriate. We remove the external header and send the packet back to the external network. We have a packet detection rule that is about the TEID and a Forwarding Action Rule which is about removing headers. Here, we see an example with IP addresses. We find in the UPF a table with a Packet Detection Rule. Here, for a packet coming from the UE, there is a TEID value, a forwarding action, and a parameter that indicates how to do the forwarding. Here, we remove the external error. In the other direction, we'll analyze the address of the UE and add the external header by indicating the value of the TEID to be placed. We have seen the Packet Detection Rules, the Forwarding Action Rules for adding or removing headers. We also have the possibility of defining rules for implementing the quality of service policy to give priority to one type of packets over another. It is also possible to define packet counting rules or usage reporting rules. This is interesting for operators who want to be able to bill. Finally, there are buffering action rules on the output ports. It is possible to define several rules on the same flow. In this case, there is a priority and rule 0 is analyzed first. If the packet doesn't verify this rule, we go to rule number 1 until we find the rule for which the packet verifies what is defined in the rule. Note that not all rules are necessarily defined. There may very well be no QoS rules. In conclusion, CUPS involves separating the control plane and user plane. It's possible in the 4G network, but it's systematic in the 5G network. In this case, the SMF sends a number of packet processing rules to the UPF and the UPF will apply these rules to user data packets.