UPF Config

June 16, 2025 · View on GitHub

Description

Currently UPF have several config parameters shown below.

Parameters can be configured through command line interface, config files (YAML, JSON) or environment variables.

ParameterDescriptionyamlenvcli argDefaults
Interface name MandatoryList of network interfaces handling N3 (GTP) & N6 (SGi) traffic. eUPF attaches XDP hook to every interface in this list. Format: [ifnameA, ifnameB, ...].interface_nameUPF_INTERFACE_NAME--ifacelo
N3 address MandatoryIPv4 address for N3 interfacen3_addressUPF_N3_ADDRESS--n3addr127.0.0.1
N9 address OptionalIPv4 address for N9 interfacen9_addressUPF_N9_ADDRESS--n9addrn3_address
XDP mode OptionalXDP attach mode: ∘ generic – kernel-level (evaluation) ∘ native – driver-level ∘ offload – NIC-level (direct NIC execution). Refer to How XDP Worksxdp_attach_modeUPF_XDP_ATTACH_MODE--attachgeneric
API address OptionalLocal address for serving REST API serverapi_addressUPF_API_ADDRESS--aaddr:8080
PFCP address OptionalLocal address that PFCP server will listen topfcp_addressUPF_PFCP_ADDRESS--paddr:8805
PFCP NodeID OptionalLocal NodeID for PFCP protocol. Format is IPv4 address.pfcp_node_idUPF_PFCP_NODE_ID--nodeid127.0.0.1
GTP peer OptionalList of gtp peer's address to send echo requests to. Format is [hostnameA:portA, hostnameB:portB, ...].gtp_peerUPF_GTP_PEER--peer-
Echo request iterval OptionalEcho request sending interval. Format is seconds.echo_intervalUPF_ECHO_INTERVAL--echo10
Metrics address OptionalLocal address for serving Prometheus mertrics endpoint.metrics_addressUPF_METRICS_ADDRESS--maddr:9090
QER map size OptionalSize of the QER eBPF map. Overrides value derived from max_sessions when set (non-zero).qer_map_sizeUPF_QER_MAP_SIZE--qersize1024
FAR map size OptionalSize of the FAR eBPF map. Overrides value derived from max_sessions when set (non-zero).far_map_sizeUPF_FAR_MAP_SIZE--farsize1024
PDR map size OptionalSize of the PDR eBPF map. Overrides value derived from max_sessions when set (non-zero).pdr_map_sizeUPF_PDR_MAP_SIZE--pdrsize1024
URR map size OptionalSize of the URR eBPF map. Overrides value derived from max_sessions when set (non-zero).urr_map_sizeUPF_URR_MAP_SIZE--urrsize1024
Max Sessions OptionalMaximum number of sessions. Automatically calculates map sizes (PDR = 2×max_sessions, FAR = PDR, QER = max_sessions, URR = 3×max_sessions) when no individual (qer_map_size, etc.) is set.max_sessionsUPF_MAX_SESSIONS--maxsessions65535
Logging level OptionalLogs having level <= selected level will be written to stdoutlogging_levelUPF_LOGGING_LEVEL--loglvlinfo
UEIP Feature OptionalSupport for IP allocation optionfeature_ueipUPF_FEATURE_UEIP--ueipfalse
FTUP Feature OptionalSupport for TEID allocation optionfeature_ftupUPF_FEATURE_FTUP--ftupfalse
UE IP Pool OptionalPool of IP addresses, needed to allocate ip when the UEIP option is enabledueip_poolUPF_UEIP_POOL--ueippool10.60.0.0/24
TEID Pool OptionalPool of TEIDs, needed to allocate TEID when the FTUP option is enabledteid_poolUPF_TEID_POOL--teidpool65535
PFCP peers OptionalList of PFCP peers (SMF hostnames or IP addresses) which UPF will try to connectpfcp_nodeUPF_PFCP_NODE--pfcpnode-
Association Setup timeout OptionalTimeout between Association Setup Requests initiated by UPFassociation_setup_timeoutUPF_ASSOCIATION_SETUP_TIMEOUT--astimeout5

We are using Viper for configuration handling, Viper uses the following precedence order. Each item takes precedence over the item below it:

  • CLI argument
  • environment variable
  • configuration file value
  • default value

NOTE: as of commit we are currently only support IPv4 NodeID.

Example configuration

Default values YAML

interface_name: [lo]
xdp_attach_mode: generic
api_address: :8080
pfcp_address: :8805
pfcp_node_id: 127.0.0.1
metrics_address: :9090
n3_address: 127.0.0.1
n9_address: 127.0.0.1
resize_ebpf_maps: true
qer_map_size: 1024
far_map_size: 1024
pdr_map_size: 1024
urr_map_size: 1024
feature_ueip: true
feature_ftup: true
ip_pool: 10.60.0.0/16
teid_pool: 65535

Environment variables

UPF_INTERFACE_NAME="[eth0, n6]"
UPF_XDP_ATTACH_MODE=generic
UPF_API_ADDRESS=:8081
UPF_PFCP_ADDRESS=:8806
UPF_METRICS_ADDRESS=:9091
UPF_PFCP_NODE_ID: 10.100.50.241  # address on n4 interface
UPF_N3_ADDRESS: 10.100.50.233
UPF_N9_ADDRESS: 10.100.50.233

CLI

eupf \
 --iface n3 \
 --iface n6 \
 --attach generic \
 --aaddr :8081 \
 --paddr :8086 \
 --nodeid 127.0.0.1 \
 --maddr :9090 \
 --n3addr 10.100.50.233