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.

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:

yaml

Deploy UPGDeployment

Create a UPGDeployment Custom Resource (CR) in the Management Cluster. For example:

yaml
  1. Set the spec.operatorName to define the FPP Operator which should handle the UPG deployment creation:

    yaml
  2. Set the spec.type field to tdf to specify the use case in which UPG should run. By default, UPG operates in pgw mode, which configures GTP-U tunnels handling on the access network side. For TDF, tdf mode is used:

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

    yaml
  4. If using a private registry, add spec.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.

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

    yaml

    The 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 least 1Gi, and spec.resources.hugepages-2Mi must be at least 4Gi. If set to false, hugepages are disabled, and spec.resources.memory must be at least heapsize + 1G.

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

    yaml

    As a result, the UPGDeployment CR creates VPPInterface objects with memif interfaces for GRX (an1) and SX (sx1).

  7. 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-nat should 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:

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

    yaml

    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.

    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.

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

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 spec.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

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:

yaml

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:

yaml

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:

yaml

The per-pool configuration for NAT includes configuration for IPFIX capabilities:

yaml

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:

yaml

PFCP Heartbeats

You can configure PFCP heartbeat parameters:

yaml

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:

yaml

Verification

To check if the UPGDeployment is installed and ready, run:

bash

Sample output:

bash

You can also check the status of the VPPDeployment resource that the UPGDeployment CR created in the Core Cluster:

bash

Sample output:

bash

To verify if UPG TDF setup is working, check following places: