> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/upg/2.2/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/components/upg/2.2.md).

# User Plane Gateway (UPG) based on FPP

User Plane Gateway is a Cennso Network Function (CNF) for user plane traffic handling.
User traffic from an *Access Network* is forwarded to a *Data Network* and vice versa. As part
of the forwarding, policy enforcement and charging functions can be applied. The control plane (*CP*)
component can be integrated via the Packet Forwarding Control Protocol (PFCP) interface.

![UPG Architecture](https://docs.cennso.com/api/assets/components/upg/2.2/images/upg-architecture.png)

UPG is used as part of a composition of many Cennso Network Functions forming a particular Mobile Core
Network Service. Most commonly, this is a Packet Gateway for a certain Mobile Core Network or Service. In this role,
UPG is combined with at least Session Management Function (SMF) or another PGW-C Function based on the required
functionality and RAN Technology (2-3G, 4G, 5G). In a Cennso Composable Cloud Core, Session Management Controller (SMC)
can be used to create a fully functional Packet Gateway (P-GW). Other than that, you can also use UPG to deploy
other services, such as pure IP-based Session Control Gateway (SCG) solutions.

UPG implements the functionality of 3GPP 5G User Plane Function (UPF) following the Control
User Plane Split (CUPS) architecture. In addition, UPG also works as the user plane element
of 3GPP 2G-4G GGSN or P-GW, based on [3GPP TS 23.214][TS23214] and [3GPP TS 29.244][TS29244] Release 15.

UPG also includes collocated SGi-LAN features like IP Routing, Traffic and Application Detection
(TDF/ADF), and Carrier Grade NAT (CG-NAT).

UPG is a cloud native network function which is fully containerized and can be deployed on a cloud native environment based on Kubernetes.

The distinguishing features of UPG are:

- [3GPP TS 23.501][TS23501] R15-16 5G User Plane Function (UPF)
- [3GPP TS 23.214][TS23214] R14 4G PGW-U
- GTP-u Tunnel Management for a CUPS based 2G/3G GGSN
- GTP-u Encap Decap
- TEID pooling and charging
- Packet Forwarding Control Protocol (PFCP) for Sx, N4
- Policy Enforcement for Online Charging (Time, Volume)
- Time and Volume Accounting for Offline and Online Charging (URR)
- Traffic Detection Function (TDF)
- Application Detection Function (ADF)
- IP Routing
- Carrier Grade NAT
- Policy-based Routing

# UPG components

## UPG Manager
UPG Manager is a Golang application which imports FPP Manager 
as a module that enables configuring a VPP instance using Kubernetes Custom Resources (CRs). UPG Manager extends
this capability with UPF plugin configuration using CRs. UPG Manager runs modified VPP version provided
by [FPP VPP](https://github.com/travelping/fpp-vpp), together with UPF VPP plugin (`upf_plugin.so`) installed
as deb file from [UPG-VPP](https://github.com/travelping/upg-vpp).

![Docker Image Diagram](https://docs.cennso.com/api/assets/components/upg/2.2/images/docker-images.svg)

## Kubernetes API Extensions
UPG uses Kubernetes Custom Resource Definitions (CRDs) from FPP Manager to configure the VPP instance.

UPG Management API also provides additional resources belonging to the `upg-manager.cennso.com` API group:

- `UPGConfig` - configures UPF-related settings, currently Network Instance (NWI) and PFCP Heartbeats parameters

Detailed description is available in the [Custom Resources](https://docs.cennso.com/components/upg/2.2/crs.md) document.

## Deployment method
UPG provides Helm charts that install all UPG components. There are three charts available:

* UPG CRD - chart with the Custom Resource Definitions deployment
* UPG support - chart that installs Grafana dashboard and Prometheus ServiceMonitor
* UPG - chart with the main UPG Manager deployment

[TS23214]: http://www.3gpp.org/ftp/Specs/html-info/23214.htm
[TS23501]: http://www.3gpp.org/ftp/Specs/html-info/23501.htm
[TS29244]: http://www.3gpp.org/ftp/Specs/html-info/29244.htm
