For AI agents: this documentation is indexed for you in llms.txt, and all of it in /llms.txt. Every page is also available as markdown: append .md to its address.

You are reading User Plane Gateway 2.17, an older release. The newest release is 3.2. Read this page in 3.2

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 Controller (SMC) component, which manages session configuration, signaling, and policy control to control the User Plane's operations.

TDF use case
TDF use case

Configuration

Follow these steps to configure the UPG chart for the TDF use case:

  1. Create FPPNetworks for the Access (access-net) and Control (control-net) network interfaces outside the UPG chart. Also networks per NAT pool (at-net and de-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:

    yaml
  2. Set the type field to tdf to specify the use case in which UPG should run.

  3. 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:

    yaml

    From 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:

    yaml
  4. Define labels used by the Grafana dashboard and the observability subsystem provided by the upg-support chart:

    yaml
  5. If using a private registry, add imagePullSecrets.

    yaml

    This sets the service account and the UPG deployment to use the secret. You must create the secret outside of the UPG deployment.

  6. Allocate sufficient resources for UPG based on the expected load for 250k sessions:

    yaml

    The 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 least 1Gi, and resources.hugepages-2Mi must be at least 4Gi. If set to false, hugepages are disabled, and resources.memory must be at least heapsize + 1G. Turning hugepages on or off does not affect UPG's performance or stability.

  7. Set up networking for the UPG instance that includes GRX and Sx interfaces. The sgi configuration is omitted because a separate sgi is added for each pool. See the configuration example:

    yaml

    As a results, the UPG chart creates NADs with memif interfaces for GRX (an1) and SX (sx1).

  8. 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:

    yaml

    You can configure the NAT flow idle timeout to release resources. The timeout depends on the protocol and can be set using UPG chart values:

    yaml
  9. To 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:

    yaml

    Note

    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.

  10. 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:

    yaml

    The resulting NADs look as follows:

    yaml
  11. The 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:

    yaml

    NAT pools configuration is included in VPPConfig with per UPG target:

    yaml
  12. Configure IPFIX. To set up ipfixPolicy for TDF, use the NatEvent template. 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:

Capacity=ExternalIPs×(MAX_PORT−MIN_PORT)Capacity = External IPs × (MAX\_PORT − MIN\_PORT)

By default:

  • MIN_PORT = 1024
  • MAX_PORT = 65535

You can configure these values in the instances.{UPG_INSTANCE_NAME}.nat section:

yaml

For a NAT pool with two external IPs and the default port range:

2×(65535−1024)=2×64511=1290222 × (65535 − 1024) = 2 × 64511 = 129022

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:

bash

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:

yaml