UPG IP Flow Information Export (IPFIX)
UPG allows exporting per-flow information based on the IPFIX protocol described 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:
- Flow creation
- Intermediate reports, if the reporting interval is configured
- 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 flowdelete(5)- in the last IPFIX report for the flowreserved(0)- in other cases
If the flow haven't finished the initalisation (no downlink packets in the case of connection faliure), 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 sidereverseInitiator(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.