Traffic Detection Function
UPG provides both Traffic Detection Function (TDF) and Carrier-grade NAT (CG-NAT) capabilities. These are commonly combined into a single deployment to simplify network architecture and reduce operational overhead.
To deploy UPG as a Traffic Detection Function (TDF), you must deploy two Custom Resources (CRs) to your cluster:
Read the sections below to learn how to configure these CRs.
Deploy FPPNetworks
In the Core Cluster, create FPPNetworks for the Access and Control network interfaces (access-net and control-net respectively), independent of the UPGDeployment CR. Additionally, create networks per NAT pool (at-net and de-net) to separate the NATed traffic. This enables cross-node connectivity from the access network CGW and CGWs on the data network side. For example:
Deploy UPGDeployment
Create a UPGDeployment Custom Resource (CR) in the Management Cluster. For example:
Set the spec.operatorName to define the FPP Operator which should handle the UPG deployment creation:
yamlSet the spec.type field to
tdfto specify the use case in which UPG should run. By default, UPG operates inpgwmode, which configures GTP-U tunnels handling on the access network side. For TDF,tdfmode is used:yamlDefine labels used by the Grafana dashboard and the observability subsystem provided by the
fpp-supportchart:yamlIf using a private registry, add spec.imagePullSecrets:
yamlThis sets the service account and the UPG deployment to use the secret. You must create the secret outside of the UPG deployment.
Allocate sufficient resources for UPG based on the expected load for 250k sessions:
yamlThe spec.enableHugepagesAllocation parameter controls whether UPG uses hugepages for heap, stats, and buffers. If set to
true, UPG uses hugepages instead of standard memory. In this case, spec.resources.memory must be at least1Gi, and spec.resources.hugepages-2Mi must be at least4Gi. If set tofalse, hugepages are disabled, and spec.resources.memory must be at leastheapsize + 1G.Set up networking for the UPG instance that includes GRX and Sx interfaces. The
sgiconfiguration is omitted because a separate interface is added for each pool. See the configuration example:yamlAs a result, the
UPGDeploymentCR creates VPPInterface objects with memif interfaces for GRX (an1) and SX (sx1).TDF use case commonly uses NAT (Network Address Translation). UPG supports two types of NAT: basic and carrier-grade NAT (CG-NAT). For TDF,
cg-natshould be used instead of basic NAT because it is integrated with PFCP, ensuring that NAT bindings are correctly managed as part of the subscriber session state:yamlTo specify NAT pool capacity, use these parameters in the spec.instances.{UPG_INSTANCE_NAME}.nat.pools.{NAT_POOL_NAME} section:
- start - start of the NAT IP pool range, for example:
198.19.8.1 - end - end of the NAT IP pool range, for example:
198.19.8.254 - blocksize - range of ports assigned to the NAT binding
See the example:
yamlWhen the UPF session is deleted, the NAT binding is released, and the port block becomes available for other sessions. The NAT block is immediately available for allocation after release, depending on pool usage.
If a UE uses all the ports assigned in the NAT binding, new connections are not NATed, and traffic is blocked until some ports are freed up.
For more information on how to calculate NAT pool capacity, see the NAT pool capacity section.
UPG exposes vpp_nat_pool_capacity and vpp_nat_pool_utilization metrics for monitoring NAT pool usage. For more information, read the Metrics document.
- start - start of the NAT IP pool range, for example:
The per-pool configuration for NAT includes configuration for interface settings (name, type, MTU, IP address, and pool gateway address). This configuration generates VPPInterface objects for NAT pool interfaces. Here’s a configuration example for two NAT pools, pool-de and pool-at:
yaml
NAT pool capacity
The NAT pool's capacity, or the number of User Equipments (UEs) that the UPG can serve, is calculated as follows:
By default:
MIN_PORT= 1024MAX_PORT= 65535
You can configure these values in the spec.nat section:
For a NAT pool with two external IPs and the default port range:
This means the NAT pool can serve up to 129,022 bindings.
The total number of NAT flows is divided into smaller ranges, determined by the blocksize parameter. Each port block, combined with an external IP, creates a NAT binding. For example, a NAT binding might look like this:
Additional configuration
This section describes optional parameters that you can use to further customize the UPG deployment.
Affinity
UPG requires a node with a running Fast Path Provider (FPP). Configure spec.affinity to ensure that UPG runs on the correct node. For example, you can label all nodes with FPP with the label fpp-manager.cennso.com/vppswitch: "". In this case, the configuration looks like this:
From all the nodes with a running FPP, you can choose a specific node to deploy UPG. In this case, use the node name label, for example worker-node1.test.cluster.net:
IPFIX
IPFIX (IP Flow Information Export) is used to export flow-related information to a collector. You can configure IPFIX exporters and per-pool IPFIX policies.
To set up ipfixPolicy for TDF, use the NatEvent template. This example shows the IPFIX exporters configuration for pool-de and pool-at:
The per-pool configuration for NAT includes configuration for IPFIX capabilities:
Rate limiter
You can throttle the session creation rate in the TDF use case to avoid overloading the SMF. The rate limiter applies to the PFCP Session Report Requests sent from UPG to SMF. The spec.rateLimiterPPS parameter sets the number of allowed messages per second:
PFCP Heartbeats
You can configure PFCP heartbeat parameters:
NAT timeouts
You can configure the NAT flow idle timeout to release resources. The timeout depends on the protocol and can be set using UPGDeployment CR values:
Verification
To check if the UPGDeployment is installed and ready, run:
Sample output:
You can also check the status of the VPPDeployment resource that the UPGDeployment CR created in the Core Cluster:
Sample output:
To verify if UPG TDF setup is working, check following places: