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

IP Flow Information Export (IPFIX)

User Plane Gateway (UPG) supports exporting per-flow data using the IPFIX protocol, as defined in RFC5470 (architecture), RFC7011 (protocol), and RFC8158 (NAT extension).

Terminology

  • Flow - set of packets sent from one endpoint to another (UE to outside or outside to UE), Packets share the same src, dst, proto, src_port, and dst_port fields. UPG works with biflows and IPFIX reports contain information for both directions of the bidirectional flow.
  • Uplink direction - traffic direction from UE
  • Downlink direction - traffic direction to UE

Reporting

Three conditions can trigger IPFIX flow reporting:

  1. Flow creation
  2. Intermediate reports, if the reporting interval is configured
  3. Flow termination

The source address of the IPFIX report always points to UE, even if UE is not the initiator of this flow. It is not always guaranteed to detect the initiator of the biflow but the biflowDirection field provides a good estimation, which can be used for statistic purposes.

The side of PFCP session directed towards UE is determined by "Source Interface" IE in PDRs or "Destination Interface" IE in FARs. One of them should have the value "Access" providing UE flow direction.

Multiple reports can be batched in a single UDP packet depending on the network load.

Because of the unreliability of UDP messaging and multiple unpredictable reliability requirements, you should always assume that a fraction of reports can be missing.

Reporting on creation

The flow creation report is triggered by sending any packet which is not a part of the existing flow. The report is sent as soon as it determines all the required information for the corresponding flow, such as PDRs and FARs.

It is not guaranteed to send the creation report when the flow was destroyed before the determination of PDRs and FARs as this flow was finished.

Reporting on flow termination

Flow termination happens when:

  • Session is removed by a Control Plane event, such as session deletion request or association loss, or when a flow timeout occurs.
  • Flow timeout happens when there is no traffic received for this flow for the duration of the flow timeout. The timeout is configurable per protocol.

There is no difference in IPFIX reporting, no matter if the report was triggered by a flow timeout or a session deletion.

Reporting on intermediate report timer

The reporting interval of zero means that no intermediate reports are sent.

A configured reporting interval is the minimal time duration between the reporting intervals. The real value varies depending on the flow traffic presence.

Available Information Elements

Information Elements provided in the report depend on the configured IPFIX policy and the flow IP version. The provided elements used in the report do not depend on the reporting trigger. IE reference information can be obtained in "IP Flow Information Export (IPFIX) Entities" IANA-IPFIX registry assignments.

IPFIX policy NatEvent

IPFIX policy FlowUsage

NAT event field

The natEvent field can have values create(4), delete(5), and reserved(0) in the case that there is no event to report.

In the case of UPG, this field is not NAT-specific and if NAT is not configured, it relates to the flow creation or removal.

The natEvent field populated with values in the corresponding conditions:

  • create(4) - in the first IPFIX report for the flow
  • delete(5) - in the last IPFIX report for the flow
  • reserved(0) - in intermediate IPFIX reports for the flow

If the flow haven't finished the initialisation (no downlink packets in the case of connection failure), it may be that the delete(5) event is sent as the first and the last report for the flow without the create(4) report.

biflowDirection field

The biflowDirection field can have the following values:

  • initiator(1) if the flow was created by traffic from the UE side
  • reverseInitiator(2) if the flow was created by traffic in the direction to UE

This value should not be considered reliable, since it's not always possible to determine the correct direction of the flow.

IPFIX reporting policy configuration priority

You can configure the IPFIX reporting policy per NWI or for a session in the PFCP Forwarding Action Rule (FAR) through a vendored IE. The policy set in FAR applies only to flows using that FAR. If both NWI and FAR have reporting policies, the FAR policy takes priority. To disable IPFIX reporting for a specific FAR enabled on the NWI, use the special policy name none to override the NWI policy.

Configuration

UPG supports exporting IPFIX data, but for proper setup, you must configure IPFIX exporter and IPFIX setting for each NWI (Network Instance). Follow these steps to configure IPFIX and ensure it works correctly:

  1. Configure IPFIX exporter in the ipfixExporters section which includes the IPFIX collector setup:

    yaml

    UPG can send IPFIX data over a VPP interface, but the current configuration does not support Kubernetes default networks (such as Calico). The collectorAddress must be specified in FPPNetwork. The recommended network is Control Network Sx which is tested and works reliably. Since IPFIX collectors are identified by their IP addresses, each IP can only be associated with one collector (a VPP internal limitation). Additionally, collectorAddress must match the ipfixCollector setting in the instance..networking.sgi. If they do not match, IPFIX does not work.

  2. Configure IPFIX for each uplink NWI in the instances.{NAME}.networking section. To set up ipfixPolicy, choose one of the preconfigured template:

    • FlowUsage - for the Packet Gateway (PGW) use case
    • NatEvent - for the Traffic Detection Function (TDF) use case, with NAT information

    If ipfixPolicy is not set, IPFIX data is not sent by default, but it can be activated per session.

    • See the configuration example for the PGW use case:

      yaml

      In the PGW use case, you can set the ipfixPolicy in the NWI configuration. If you don’t set it, the PFCP Session Establishment Request should include the IPFIX Policy Information Element (IE), with a valid policy name (FlowUsage).

    • See the example for the TDF use case. For TDF, define IPFIX settings in the NAT pool configuration:

      yaml
  3. To check the IPFIX configuration, run this VPP CLI command:

    bash

    See the output example:

    bash