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:
Deploy
fpp-crdchartDeploy
upg-crdchartDeploy
upg-supportchartDeploy
upgchart
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:
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 upgmemifscan be used -
FPP_INSTANCE_NAME- set UPG name, used for watching resources labeled withfpp-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 infpp-manager. Needs to be set not to use the same directory thatfpp-manager -
FPP_INSTANCE_NAMESPACE- set namespace whereupg-managerwatches for CRs -
FPP_INSTANCE_UID- contains pod UID value, distinguish between pod generations and used in labelfpp-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
- CLI:
-
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
- CLI:
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:
CLI commands should be executed using afterCommands field in VPPConfig.spec CR:
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:
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 interfacesx- for control plane communicationsgi- for data network connectivity
As an example of grx interface, helm chart configuration:
Resulting NAD:
Static IP address assignment is used here, and resulting VPPInterface:
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.
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.
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:
More info on RoutingTable targeting is included in next paragraph.
Example of input of networking configuration:
This will create following RoutingTable CRs:
To check routes applied on UPG instance, run VPP CLI:
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:
This is propagated to VPPConfig that matches UPG instance:
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:
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:
For tdf type values.yaml:
And resulting UPGConfig:
To check the NWI configuration on running UPG instance, use VPP CLI:
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:

Steps needed to configure policy based routing:
- Regular SGI interface (called
inetin above picture) can be used for Internet connectivity, chart will create NAD forinet - 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
tapinterfaces deployed - Create NAD for VPN interface (outside of UPG chart)
- Define additional interface in UPG deployment for VPN connectivity -
additionalNetworksininstances.<name>.networking - Define policy names in UPG config using
additionalConfigsection ininstances.<name> - Define routing tables attached to policy created, outside of UPG chart
- For multi UPG instances, define
routingTableSelectorsso 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:
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:
And SGI IPFIX configuration:
For VPN interface, separate NAD needs to be created outside of UPG chart. Example:
This NAD vpn21-memif-inst01 can be added in additionalNetworks in per
instance network configuration:
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:
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:
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
ipfixExportesshould match per NWIipfixCollectorsettings, otherwise IPFIX feature will not work
Example:
UPG supports two IPFIX templates:
default- mainly created for TDF use-case, with NAT informationdest- 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:
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:
To check IPFIX configuration, VPP CLI on UPG can be executed:
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:
If UPG deployment should be pinned to specific node, then affinity can look
like this (assuming node name is worker-node1.test.cluster.net):
labels needs to be defined, because there are used in upg-support Grafana
dashboard:
If UPG Manager image is hosted on private registry, imagePullSecrets should be
set in values.yaml, example:
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:
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:
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:
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:
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:
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.
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:
NAT pools configuration will be included in VPPConfig with per UPG target:
This is example exporters configuration:
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.
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.
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.
PFCP Heartbeat configuration can be verified from VPP CLI: