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.2, an older release. The newest release is 3.2. Go to 3.2

UPG deployment guide

UPG Deployment

upg-manager image uses fpp-manager as base image. This includes Golang based controller for VPPInterface, VPPConfig, IPFIXExporter and RoutingTable Custom Resources (CRs). UPG registers to watch for this resources on Kubernetes API. Besides that, UPG does reconciliation for UPGConfig CR.

This mechanism uses Kubernetes Custom Resources to configure interfaces, routing tables, PFCP Server parameters and NWIs (network instances) in VPP instance. Any CLI commands referring to this resources will be revoked and align with k8s API state.

General supported deployment model is using helm chartBroken link included in this repo.

Steps to deploy UPG:

  1. Deploy fpp-crd chart

  2. Deploy upg-crd chart

  3. Deploy upg-support chart

  4. Deploy upg chart

Deploy fpp-crd

fpp-crd chart deployment is needed because UPG uses VPPInterface and others FPP Custom Resources for configuration. This chart does not require any additional configuration and should be deployed once per cluster.

Deploy upg-crd

upg-crd helm chart provides UPG specific Custom Resources, which needs to be installed for proper upg-manager functioning. This chart does not require any additional configuration and should be deployed once per cluster.

This mean that UPG CRDs are shared between all UPG deployments in the cluster.

Deploy upg-support

upg-support chart provides Prometheus ServiceMonitor and UPG Overview Grafana dashboard.

Current limitation is that UPG Overview dashboard should be installed once in the cluster - it gathers metrics from multiple upg instances. Installing it twice may influence the Grafana Operator to flip the ownership and location of the dashboard.

Example of chart configuration:

text

To deploy upg-supprt without UPG Overview dashboard, simply does include dashboard.enabled: false in chart's values.yaml.

Deploy upg

upg chart deploys upg-manager with proper configuration. This chart can be installed multiple times in the same cluster.

Example configuration values:

General UPG configuration

Based on chart configuration, below settings are included in UPG deployment.

UPG manager acts like VPP manager - generates startup.conf and starts vpp as a child process. To start upg-manager, following environment variable should be defined:

  • FPP_DISABLE_UPLINK - set to any value will instruct manager that it should not use DPDK based physical interfaces, for upg memifs can be used

  • FPP_INSTANCE_NAME - set UPG name, used for watching resources labeled with fpp-manager.cennso.com/plumbing-instance, both values needs to match

  • FPP_VPP_RUN_PATH - define vpp runtime directory, by default set to /run/vppswitch, which is used in fpp-manager. Needs to be set not to use the same directory that fpp-manager

  • FPP_INSTANCE_NAMESPACE - set namespace where upg-manager watches for CRs

  • FPP_INSTANCE_UID - contains pod UID value, distinguish between pod generations and used in label fpp-manager.cennso.com/plumbing-instance-uid

  • FPP_HEAP_SIZE - declares heap size for UPG instance, by default set to 6G by manager

  • FPP_STATS_SIZE - declares stats segment size for metrics, default 512M

UPG handles configuration based on VPP CLI commands with upf plugin extension. UPF plugin consists of following:

  • definition of 3GPP TS 29.244 standard implementation (CLI: upf specification release 16)

  • Node name, used in control plane communication: (CLI: upf node-id fqdn <node-name>)

  • PFCP server configuration:

    • CLI: upf pfcp endpoint ip <ip-sx-interface> vrf <control-plane-table-id>
    • CLI: upf pfcp server set fifo-size 512
  • Define tunnel endpoint id:

    • CLI: upf gtpu endpoint ip <ip-sx-interface> nwi <cp-nwi-name> teid 0x80000000/2
    • if running in PGW mode, CLI: upf gtpu endpoint ip <ip-grx-interface> nwi epc teid 0x80000000/2

There are also general VPP commands used to configure UPG:

  • Setting up expiration time for ip neighbors per address family:
    • CLI: set ip neighbor-config ip4 age 10
    • CLI: set ip neighbor-config ip6 age 10

CLI commands should be executed using afterCommands field in VPPConfig.spec CR:

yaml

Additional config

If specific, non-standard CLI commands needs to be executed per UPG instance, it can be defined in additionalConfig field in values.yaml:

yaml

Interface creation

UPG uses VPPInterface CR to handle interface creation. For VPP-based workloads, most suitable interface type is memif - in memory interface, that connects underlying VPP switch with UPG.

VPPInterface can be created manually, by higher level UPG operator or by NetworkAttachmentDefinition (NAD) with fpp-cni as an interface type. NADs are created by helm chart provided with UPG Manager for interfaces:

  • grx - for access network interface
  • sx - for control plane communication
  • sgi - for data network connectivity

As an example of grx interface, helm chart configuration:

yaml

Resulting NAD:

yaml

Static IP address assignment is used here, and resulting VPPInterface:

yaml

Interface name in VPP CLI and in upg metrics is set to grx.

Network Attachment definitions for grx/sx/sgi are added to upg deployment by chart.

yaml

VPPInterface is targeted against UPG deployment by label: fpp-manager.cennso.com/plumbing-instance-uid.

Additional interfaces

Any additional interfaces than grx/sgi/sx can be connected to UPG by creating NAD and attaching its name in networks annotations. Chart configuration enables to define extra NAD names in additionalNetworks value (per upg deployment) or instances.<instance-name>.networking. (per UPG instance). NADs itself should be provisioned outside of the chart.

yaml

VRF - Routing Table creation

UPG uses RoutingTable CR to handle routing table creation. VPP CLI commands are not supported, as routing state is synced against CR objects, and additional routes will be removed from VPP.

For UPG deployment, chart configuration will create appropriate RoutingTable objects, for per interface route definition in values.yaml. Chart supports routes for access network (grx), data network (sgi) and NAT pools (default gw). Any additional routes should be defined during deployment, outside of UPG chart.

RoutingTable is targeted against UPG deployment by per instance label fpp-manager.cennso.com/plumbing-instance, or by set of labels defined in VPPConfig spec.routingTableSelectors. UPG charts generate list of label based on chart name, release name and UPG instance name:

yaml

More info on RoutingTable targeting is included in next paragraph.

Example of input of networking configuration:

yaml

This will create following RoutingTable CRs:

yaml

To check routes applied on UPG instance, run VPP CLI:

text

Targeting routing tables based on labels

To define routing table matching UPG instance, routingTableSelectors value in chart values.yaml can be defined. It enables to apply one Routing table to multiple UPG instance.

By definition of multiple label sets, one UPG instance can apply multiple routing tables matching different labels, example configuration in chart values.yaml:

yaml

This is propagated to VPPConfig that matches UPG instance:

yaml

UPG chart will generate the basic routing tables matching app.kubernetes.io/instance, app.kubernetes.io/name, cennso.net/cnf and instance labels. There can be created additional routing table objects, that match only additional label (crossInstance in example) outside of UPG chart:

yaml

In that case, all UPG instance that have VPPConfig with crossInstance label defined will fetch and apply above routing table.

NWI creation

In PGW mode, 3 NWIs should be created: epc, cp and sgi. For TDF mode, NWIs: access, cp and multiple sgis (one per destination, nat pool) should be created.

UPG chart takes care of proper NWI creation, based on values.yaml type value: pgw or tdf. One sgi per nat pool is added after declaration nat.enabled: true and nat.type set to cgnat.

NWI CR config

UPG uses UPGConfig CR to create NWIs. Old way of CLI NWI creation is not supported, as the only source of truth is Kubernetes API CRs.

For pgw UPG type, following NWIs will be created by chart:

yaml

For tdf type values.yaml:

yaml

And resulting UPGConfig:

yaml

To check the NWI configuration on running UPG instance, use VPP CLI:

text

Features

Policy-based routing configuration

Policy-based routing, or traffic steering feature, provides possibility to apply routing rules per session and forward traffic to different data networks like Internet or VPN. This feature assumes SMC support in PFCP Session Creation Request using 3GPP TS 29.244 V16.9.1 8.2.23 Forwarding Policy IE.

During session establishment, SMC assigns a policy by adding the Forwarding Policy IE to the FAR(s) with Destination Interface SGi-LAN/N6-LAN. For each session, one of the policies is applied, causing a lookup in one of the respective tables. UPG and SMC configuration should be in sync, SMC should send already configured policy IDs in UPG config. Policy ID is a regular string with max 63 characters. For example defaultInet or defaultVpn.

Example topology overview:

policy based routing topology
policy based routing topology

Steps needed to configure policy based routing:

  1. Regular SGI interface (called inet in above picture) can be used for Internet connectivity, chart will create NAD for inet
  2. Ensure that VXLANs for SGI and VPN interface are created (outside of UPG chart), to enable connectivity to Internet and VPN CGWs - both gateways need to have FPP-CNI tap interfaces deployed
  3. Create NAD for VPN interface (outside of UPG chart)
  4. Define additional interface in UPG deployment for VPN connectivity - additionalNetworks in instances.<name>.networking
  5. Define policy names in UPG config using additionalConfig section in instances.<name>
  6. Define routing tables attached to policy created, outside of UPG chart
  7. For multi UPG instances, define routingTableSelectors so that one routing table object will be used on each UPG.

Please refer to policy based routing values.yamlOpens a file and example of NAD and RoutingTableOpens a file definitions for full configuration needed.

Policy based routing feature should be used in pgw mode of UPG. To define forwarding policy, CLI commands in instances.<name>.additionalConfig should be used, example:

yaml

Current requirement is to create tables first before upf policy add id <name> command is used. Table creation in additionalConfig should be removed after implementing conditional wait for RoutingTable CR to be added before executing additionalConfig commands.

upf policy add id <policy-name> via ip4-lookup-in-table <table-id> via ip6-lookup-in-table <table-id> defines <policy-name> to be used for traffic forwarding, with connected IPv4 and IPv6 routing table look ups. Routing table must exist before referencing them in policy creation command. If routing table is deleted during runtime, policy is working, but no traffic is forwarded outside of UPG. After routing table is available again, traffic is passing normally.

Above example of policy creation shows how to configure policy based routing together with IPFIX activation per session. Two policies needs to be created, for example defaultInet and defaultInetIPFix, and proper configuration at SMC side will send PFCP IEs for routing (FAR - forwarding policy name) and ipfix template (TP IPFIX Policy IE - dest as prepared for PGW mode).

IPFIX configuration includes exporter config:

yaml

And SGI IPFIX configuration:

yaml

For VPN interface, separate NAD needs to be created outside of UPG chart. Example:

yaml

This NAD vpn21-memif-inst01 can be added in additionalNetworks in per instance network configuration:

yaml

Last step is to configure routing tables connected to policy tables. This needs to be done outside of UPG chart. Policy based routing enables pointing default route to Internet and specific IP network addresses to VPN data network. Also blocking of IP range is allowed. Example:

yaml

Above example shows different routes configuration for tables 201 and 202, where 201 table pass default traffic to Internet, and specific address to VPN data network. Table 202 does opposite routing, by default passing traffic to VPN data network, and only specific routes are forwarded to SGI (Internet) network. IP 9.9.9.9/32 is blocked.

Common label across all RoutingTable CRs is configured in UPG chart by:

yaml

IPFIX configuration

UPG enables IPFIX to be exported. This is built in feature and to properly use it, IPFIX exporter and per NWI IPFIX settings should be configured. IPFIX exporter configures the IPFIX collector, these are current assumptions for IPFIX exporter configuration:

  • UPG supports sending IPFIX data over VPP interface, so current configuration does not support to use Kubernetes default network (like Calico)
  • Collector IP address should use FPP-CNI, and recommended is control network (sx), as it was tested and reported to be working
  • IPFIX collectors are distinguish by IP address, so only one collector per IP is supported currently (this is VPP internal limitation)
  • Collector IP defined in ipfixExportes should match per NWI ipfixCollector settings, otherwise IPFIX feature will not work

Example:

yaml

UPG supports two IPFIX templates:

  • default - mainly created for TDF use-case, with NAT information
  • dest - used in PGW mode

Second part of IPFIX configuration is per NWI ipfix config, supported in sgi or per NAT pool configuration in values.yaml, example for PGW mode:

yaml

ipfixExporters.collectorAddress and instances.<name>.networking.sgi.ipfixCollector needs to match, otherwise IPFIX will not be sent. For PGW mode, ipfixPolicy can be set in NWI configuration, or if policy is omitted, PFCP Session Establishment Request should include PFCP TP IPFIX Policy IE with a valid name of the policy (dest/default). PGW mode can use dest as ipfixPolicy. In case where ipfixPolicy is empty, no ipfix is sent by default and IPFIX is activated per session.

For TDF mode, per NAT pool ipfix configuration is supported, and should be included in NAT config section, example:

yaml

To check IPFIX configuration, VPP CLI on UPG can be executed:

text

TDF with CG-NAT

To configure UPG in TDF mode, following settings needs to be defined in values.yaml.

First of all, we need to define type to tdf.

As UPG require FPP-enabled node to run on, nodeAffinity needs to be defined. For example if all nodes with fpp enabled are labeled with fpp-manager.cennso.com/vppswitch: "", then chart config should include:

yaml

If UPG deployment should be pinned to specific node, then affinity can look like this (assuming node name is worker-node1.test.cluster.net):

yaml

labels needs to be defined, because there are used in upg-support Grafana dashboard:

yaml

If UPG Manager image is hosted on private registry, imagePullSecrets should be set in values.yaml, example:

yaml

This will set the service account to use that secret, as well as it will be set in UPG deployment. The secret needs to be created outside UPG deployment.

Based on load test (250k sessions), recommendation for resource allocation is following:

yaml

enableHugepagesAllocation defines if UPG should use hugepages for heap, stats segment and buffer. If set to false, UPG will not use hugepages extensively. If set to true - hugepages-2Mi should be set to heapsize plus 2G. It was tested, that enable/disable hugepages allocation for heap, stats and buffer does not influence performance or stability of UPG.

Networking configuration for UPG instance includes regular grx and sx interface configuration. sgi configuration is omitted, as per pool sgi will be added. Example config:

yaml

Above will cause upg chart to define NADs with memif interfaces for grx (named an1) and sx (named sx1). Proper VXLANs should be created (i.e. 4201 and 4101) using Custom Resource of vxlan.fpp-manager.cennso.com. UPG chart does not created those VXLAN objects. This will enable cross node communication. Example:

yaml

Usually TDF setup requires NAT. UPG enables 2 types of NAT: basic and carrier grade NAT (CG-NAT). In this case, cg-nat will be used. To enable cg-nat values.conf should include:

yaml

Where 500000 is a number of connections for all users, and this number was verified by load test to be sufficient (250k sessions run).

NAT pools are configured in instances.<name>.nat section of chart values.yaml. Example NAT pool configuration:

yaml

In per pool configuration, ipfix capabilities are defined, interface details (name, type, mtu, IP address and pool gateway address). vni refers to FPP VXLAN network id. This vxlan needs to be created with with vxlan.fpp-manager.cennso.com CRs outside of UPG chart. Above configuration will generate NADs for NAT pool interfaces, with fpp-cni and memif type.

yaml

Based on NAT pool definitions, NWI per NAT pool will be defined using UPGConfig CR. Also IPFIX configuration per NWI will be included. IPFIX template default should be used for TDF use-case:

yaml

NAT pools configuration will be included in VPPConfig with per UPG target:

yaml

This is example exporters configuration:

yaml

Rate limiter

For TDF case, there is possibility to throttle the session creation rate, which is important to not overwhelm SMF. Rate limiter will be applied to PFCP Session Report Request, sent from UPG to SMF. rateLimiterPPS included in values.yaml will set how many messages per second can be sent.

yaml

PFCP Server Configuration

UPGConfig CR can be used to configure UPG PFCP Server parameters.

PFCP Heartbeat Configuration

PFCP Heartbeat mechanism is used to identify connectivity problems between UPG and CP-Function. The number of retries for unanswered PFCP Heartbeat Request and the timeout between retries in seconds can be configured within pfcp section of UPGConfig.

yaml

UPGConfig CR is populated with dedicated values by setting appropriate parameters in values.yaml. Note, that number of retires should not be greater than 30, and timeout should be positive number in seconds not greater than 120.

yaml

PFCP Heartbeat configuration can be verified from VPP CLI:

text