Skip to content
Docs / dflux TinyCore
ContactGet started

User plane

How the UPF forwards user traffic between the gNB and the data network, and the rules and interfaces that drive the datapath.

Overview

The UPF (User Plane Function) is where user packets actually flow. Everything else in the core is control plane: it sets up sessions and programs rules. The UPF sits on the data path, decapsulating traffic from the radio side and forwarding it to the internet (and back). It is driven entirely over PFCP (the N4 interface) by the SMF inside the DMF — see PDU sessions for how those rules get installed.

N3 and N6

The UPF straddles two interfaces:

  • N3 — toward the gNB, carrying GTP-U (GTP user-plane, UDP/2152). User packets ride inside a GTP-U tunnel keyed by a TEID. On uplink the UPF strips the GTP-U header (decap); on downlink it adds one (encap).
  • N6 — toward the data network. In the userspace datapath this is a TUN interface: plain IP packets to and from the internet, NATed onto the host.

PDRs, FARs and QERs

Per session, the SMF installs the rules the UPF matches packets against:

  • PDR (Packet Detection Rule) — matches a packet on an interface (access/N3 for uplink, core/N6 for downlink, the latter by UE IP).
  • FAR (Forwarding Action Rule) — the action: forward, drop, or buffer, plus any outer header to create (the GTP-U header on downlink) or remove (on uplink).
  • QER (QoS Enforcement Rule) — enforces the flow's QoS; the default flow is non-GBR QFI 9 (5QI 9).

Uplink and downlink paths

Uplink: a GTP-U packet arrives from the gNB on N3. The UPF matches the uplink PDR, removes the GTP-U outer header, applies the QER, and the uplink FAR forwards the inner IP packet out N6 to the data network.

Downlink: an IP packet for the UE arrives on N6. The UPF matches the downlink PDR by destination UE IP, the downlink FAR builds a GTP-U outer header toward the gNB's tunnel endpoint, and the packet goes out N3. (Until the gNB's tunnel is known, the downlink FAR drops — see PDU sessions.)

IP pools and DNNs

Each UE gets an address from the pool tied to its DNN. The default DNN is internet and the default UE pool is 10.45.0.0/16. For how pools and DNNs are configured, see DNNs and IP pools.

Datapath modes

The UPF can run one of several datapaths:

  • stub — an in-memory forwarder that installs rules but moves no real packets; used for control-plane tests and the docker lab.
  • userspace — a pure-Go forwarder over a TUN interface and a GTP-U/UDP socket; forwards real traffic without special hardware.
  • dpdk — a high-throughput fast path over DPDK ethdev ports.
Choosing and configuring a datapath
See UPF datapath for how to select and run each mode, and the d3x-core-upf CLI reference for the flags (N4 :8805/udp, N3 GTP-U :2152, metrics :9095).