Traffic Detection Function
Traffic Detection Function (TDF) identifies and categorises traffic flows to enable features, such as application-specific charging, QoS enforcement, and content filtering.
The User Plane Gateway (UPG) acts as the TDF-U (User Plane). It checks traffic flows in real time and enforces policies directly on the data path. The Control Plane functionality (TDF-C) is handled by the Session Management ControllerBroken link (SMC) component, which manages session configuration, signaling, and policy control to control the User Plane's operations.
Configuration
Follow these steps to configure the UPG chart for the TDF use case:
Create FPPNetworks for the Access (
access-net) and Control (control-net) network interfaces outside the UPG chart. Also networks per NAT pool (at-netandde-net) needs to be created to separate the NATed traffic. This enables cross-node connectivity from access net CGW and CGWs on data network side. See the example:yamlSet the type field to
tdfto specify the use case in which UPG should run.UPG requires a node with running Fast Path Provider (FPP). Configure nodeAffinity 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 chart configuration looks like this:yamlFrom all the nodes with 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:yamlDefine labels used by the Grafana dashboard and the observability subsystem provided by the
upg-supportchart:yamlIf using a private registry, add 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 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, resources.memory must be at least1Gi, and resources.hugepages-2Mi must be at least4Gi. If set tofalse, hugepages are disabled, and resources.memory must be at leastheapsize + 1G. Turning hugepages on or off does not affect UPG's performance or stability.Set up networking for the UPG instance that includes GRX and Sx interfaces. The
sgiconfiguration is omitted because a separatesgiis added for each pool. See the configuration example:yamlAs a results, the UPG chart creates NADs with memif interfaces for GRX (
an1) and SX (sx1).TDF use case requires NAT (Network Address Translation). UPG supports two types of NAT: basic and carrier-grade NAT (CG-NAT). For TDF, use
cg-nat:yamlYou can configure the NAT flow idle timeout to release resources. The timeout depends on the protocol and can be set using UPG chart values:
yamlTo specify NAT pool capacity, use these parameters in the instances.{UPG_INSTANCE_NAME}.nat 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:
yamlNote
For more information on how to calculate NAT pool capacity, read the NAT pool capacity section.
When 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.
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 IPFIX capabilities and interface settings (name, type, MTU, IP address, and pool gateway address). This configuration generates Network Attachment Definitions (NADs) for NAT pool interfaces, using the fpp-cni and memif interface types. Here’s a configuration example for two NAT pools, pool-de and pool-at:
yamlThe resulting NADs look as follows:
yamlThe resulting UPGConfig CR is created by the UPG chart. The NWIs per NAT pool are defined and it includes the IPFIX configuration for each NWI:
yamlNAT pools configuration is included in VPPConfig with per UPG target:
yamlConfigure IPFIX. To set up ipfixPolicy for TDF, use the
NatEventtemplate. This example shows the IPFIX exporters configuration for pool-de and pool-at:yaml
For complete configuration details, see values.yaml files for these configuration examples:
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 instances.{UPG_INSTANCE_NAME}.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:
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 rateLimiterPPS parameter sets the number of allowed messages per second: