Skip to content

QoS Flow / QFI / 5QI — What Is 5G QoS Actually Bound To?

Difficulty: Advanced (deep dive) / Estimated study time: 35 min / Prerequisites: QoS, PFCP and PDR / FAR / QER / URR / Main actors: UE, gNB, SMF, UPF (PCF) / Main interfaces: N1, N2, N3, N4

Learning objectives

After reading this chapter, you will be able to:

  • Explain, in the words of TS 23.501 §5.7.1, that 5G QoS is bound not to the PDU Session or the TEID, but to the QoS Flow
  • Distinguish TEID / QFI / 5QI by "what each identifies" and "where each is carried"
  • Explain the QoS characteristics referenced by a 5QI (Resource Type / Priority Level / PDB / PER, etc.) and the difference between GBR / Non-GBR / Delay-critical GBR
  • Explain that one QoS decision is distributed in different forms to three places — UE (QoS rule), gNB (QoS profile), UPF (PDR / QER) — and that only the QFI is the common tag on N3
  • Isolate a QFI mismatch by lining up the values on N1 / N2 / N4 / N3, and in Wireshark not misread a QFI value as a 5QI

Prerequisites

The focus of this chapter (Level ∞ Deep Dive)

In QoS we learned the structure "PDU Session > QoS Flow > DRB" and the split in which the PCF/SMF decide and the UPF/NG-RAN enforce. This chapter digs into, at the IE level and from a trace-analysis viewpoint, which identifier represents a QoS Flow, which IE of which message carries that identifier, and what happens when the values disagree somewhere. Bit-rate values (GFBR / MFBR / AMBR) and ARP are covered in the next chapter, GFBR / MFBR / AMBR / ARP.


Why — why did 5G stop doing QoS "per bearer"?

A single UE carries traffic of very different natures at the same time.

UE
├─ Voice              low delay and low loss come first
├─ Video              wants steady throughput
├─ Web                best effort is enough
└─ Background update  delay is acceptable

In 4G EPC, an EPS Bearer was set up for each kind of traffic that needed different QoS, and each bearer had its own GTP-U tunnel (TEID). The unit of QoS and the unit of the forwarding path were the same.

5GS separates them. The forwarding path is consolidated into one N3 tunnel per PDU Session, and packets flowing inside it carry a tag called the QFI; QoS differs per tag (TS 23.501 §5.7.1.1 / §5.7.1.6, sub-clause numbers to be confirmed). Adding or changing QoS no longer requires rebuilding the tunnel, and the radio side can flexibly bundle QoS Flows into DRBs.

Analogy: 4G is "running a separate truck for each grade of parcel"; 5G is "loading parcels of mixed grades onto one truck (N3 tunnel), each with a grade sticker (QFI)." The sticker number only says "which parcel group this is"; what the grade actually means (express or standard) is written in a separate ledger (5QI → QoS characteristics).


What — the QoS Flow model (TS 23.501 §5.7.1)

The QoS Flow is the finest unit of QoS differentiation

TS 23.501 §5.7.1.1 defines the following (summary; sub-clause numbers to be confirmed):

  • The 5G QoS model is based on QoS Flows. The QoS Flow is the finest granularity of QoS differentiation in a PDU Session
  • A QoS Flow is identified by a QFI (QoS Flow ID). User Plane traffic with the same QFI receives the same forwarding treatment
  • The QFI is unique within a PDU Session. On N3 (and N9) it is carried in the encapsulation header
  • The QFI may be dynamically assigned, or may be equal to the 5QI

That last point is what later causes "QFI vs 5QI" confusion.

A QoS Flow is represented by three parts

The same clause says that one QoS Flow is characterized by the following three:

Part Held by Delivered by Used for
QoS profile (R)AN (gNB) SMF → AMF → gNB (N2), or pre-configured in the (R)AN Radio resources, DRBs, scheduling
QoS rule (one or more) UE SMF → AMF → UE (N1), or derived by the UE via Reflective QoS Classifying UL packets into QoS Flows
UL / DL PDR (one or more) UPF SMF → UPF (N4) Packet detection and QoS enforcement (via QER reference)
flowchart TD
    SMF["SMF
decides QoS Flows and assigns QFIs"] -- "N1: QoS rules +
QoS flow descriptions" --> UE["UE
UL classification"] SMF -- "N2: QoS Flow Setup Request List
(QFI + QoS Flow Level QoS Parameters)" --> GNB["gNB
QoS Flow → DRB"] SMF -- "N4: PDR (QFI in PDI) /
QER (QFI to set in DL)" --> UPF["UPF
detection, enforcement, marking"] UE == "Radio: DRB (SDAP)" ==> GNB GNB == "N3: GTP-U + QFI" ==> UPF

A single decision made by the SMF is distributed to three places in different forms, and the only common key that ties the three together on the User Plane is the QFI. That is why, when QFIs disagree, one place ends up believing a packet belongs to a different QoS Flow.

How one PDU Session relates to QoS Flows

UE
└─ PDU Session ID = 1 (DNN = ims)
    ├─ N3 tunnel: UL TEID = 0x00000101 (UPF side) / DL TEID = 0x12345678 (gNB side)
    │
    ├─ QoS Flow  QFI = 1  → 5QI = 5   (IMS Signalling, Non-GBR)  ← flow pointed to by the default QoS rule
    └─ QoS Flow  QFI = 2  → 5QI = 1   (Conversational Voice, GBR)

UE
└─ PDU Session ID = 2 (DNN = internet)
    ├─ N3 tunnel: different TEIDs
    └─ QoS Flow  QFI = 1  → 5QI = 9   (Non-GBR)  ← a different session, so QFI=1 can be used again

(Values are fictitious examples. The meaning of each 5QI follows Table 5.7.4-1, described later.)

  • The QFI is unique only within a PDU Session. QFI=1 in PDU Session ID = 1 and QFI=1 in PDU Session ID = 2 are unrelated.
  • The QFI value does not need to match the 5QI value (in the example above, QFI=2 has 5QI=1).

What — telling TEID, QFI and 5QI apart

Identifier What it identifies Scope of uniqueness Where it is carried Who decides the value
TEID Receiving endpoint of a GTP-U tunnel Within the receiving node GTP-U basic header (TS 29.281 §5.1, to be confirmed) The receiving side (UL: UPF or SMF; DL: gNB)
QFI QoS Flow within a PDU Session Within the PDU Session N3/N9: the PDU Session Container GTP-U extension header (TS 38.415 §5.5.2, to be confirmed). Also appears in N1 / N2 / N4 signaling SMF (TS 23.501 §5.7.1.5, to be confirmed)
5QI A set of QoS characteristics (the kind of quality) Standardized values have network-wide meaning; operator-defined values also exist Signaling only (N2 QoS profile, N1 QoS flow description, N7 PCC Rule, etc.). Not carried in user packets PCF (PCC Rule) or SMF configuration
Outer IP (gNB ⇔ UPF)
UDP (dst 2152)
GTP-U  TEID = 0x12345678          ← which PDU Session's tunnel
 └─ Extension Header: PDU Session Container
      ├─ PDU Type = DL PDU SESSION INFORMATION
      └─ QFI = 2                  ← which QoS Flow within that session
Inner IP (the UE's packet)

The 5QI is nowhere in this packet  ← you only learn the 5QI of QFI=2 by looking at N2/N1 signaling

Multiple QFIs ride on one TEID

The UPF transmits the PDUs of one PDU Session in a single tunnel between the 5GC and the (R)AN, and puts the QFI in the encapsulation header (TS 23.501 §5.7.1.6, to be confirmed). So the normal case is "1 TEID : multiple QFIs." As exceptions, when QoS Flows are split between MN / SN in Dual Connectivity, or with redundant transmission for URLLC, one PDU Session can have multiple N3 tunnels (TS 23.501 §5.33.2 and others, to be confirmed).


What — 5QI and QoS characteristics (TS 23.501 §5.7.3 / §5.7.4)

A 5QI is "a reference to QoS characteristics"

A 5QI is a scalar used as a reference to a set of QoS characteristics (TS 23.501 §5.7.2.1). Standardized 5QIs map one-to-one to the values in Table 5.7.4-1, so only the value is sent; the characteristics themselves are not signaled. Besides standardized 5QIs, there are 5QIs pre-configured in the AN and dynamically assigned 5QIs. Standardized and pre-configured 5QIs are sent as values only; only for a dynamically assigned 5QI are the characteristics signaled explicitly as part of the QoS profile (TS 23.501 §5.7.2.1 / §5.7.3.1; in NGAP, the Non-Dynamic 5QI Descriptor / Dynamic 5QI Descriptor CHOICE; TS 38.413 §9.3.1.12, to be confirmed).

QoS characteristic Meaning Defined in
Resource Type GBR / Delay-critical GBR / Non-GBR TS 23.501 §5.7.3.2
Priority Level Scheduling priority among QoS Flows. A lower value means higher priority TS 23.501 §5.7.3.3
Packet Delay Budget (PDB) Upper bound on the delay a packet may experience between the UE and the UPF (N6 termination). Includes the CN part (CN PDB) TS 23.501 §5.7.3.4
Packet Error Rate (PER) Upper bound on the rate of PDUs processed by the link layer but not successfully delivered to the upper layer TS 23.501 §5.7.3.5
Averaging Window Time window over which GFBR / MFBR are evaluated (GBR / Delay-critical GBR only) TS 23.501 §5.7.3.6
Maximum Data Burst Volume (MDBV) Largest amount of data the 5G-AN is required to serve within the 5G-AN PDB (Delay-critical GBR only) TS 23.501 §5.7.3.7

(Sub-clause numbers can move between versions, so to be confirmed.)

Resource Type — GBR / Non-GBR / Delay-critical GBR

Resource Type Bit-rate guarantee Characteristics Typical use (examples in Table 5.7.4-1)
GBR Yes (GFBR) Dedicated network resources are reserved. Has GFBR / MFBR Conversational voice, conversational video
Delay-critical GBR Yes (GFBR) The PDB is handled strictly and an MDBV is defined. Packets delayed beyond the PDB are counted as lost (only if the data volume in that period does not exceed the MDBV and the flow does not exceed its GFBR; TS 23.501 §5.7.3.4, to be confirmed) URLLC-type uses such as factory automation, V2X
Non-GBR No No bit-rate guarantee. Shared under the Session-AMBR / UE-AMBR ceiling IMS Signalling, general data

There is no third flow type called \"Delay-critical GBR QoS Flow\"

There are two QoS Flow types, GBR QoS Flow / Non-GBR QoS Flow; Delay-critical GBR is one of the Resource Types of a 5QI (TS 23.501 §5.7.1.1 / §5.7.3.2, to be confirmed). A flow with a Delay-critical GBR 5QI is handled as a GBR QoS Flow, with GFBR / MFBR.

Representative standardized 5QIs (TS 23.501 Table 5.7.4-1)

5QI Resource Type Default Priority Level PDB PER Example services
1 GBR 20 100 ms 10^-2 Conversational Voice
5 Non-GBR 10 100 ms 10^-6 IMS Signalling
9 Non-GBR 90 300 ms 10^-6 Video (Buffered Streaming), TCP-based (www, e-mail, etc.)
82 Delay-critical GBR 19 10 ms 10^-4 Discrete Automation (MDBV 255 bytes)

This is only a small excerpt. Rows, notes and values in the table are added and revised in each Release, so always refer to Table 5.7.4-1 of the target Release for actual design (values to be confirmed).

  • The Priority Level can override the 5QI default: if the QoS profile explicitly signals a Priority Level, a priority different from the standardized 5QI's default can be used (TS 23.501 §5.7.3.3, to be confirmed).
  • A 5QI is "the kind of quality promise," not "a bit rate": how many Mbps are guaranteed (GFBR) and how far a flow may go (MFBR) are parameters separate from the 5QI (next chapter).

What — the default QoS Flow and QoS rules (UE side)

The "default QoS Flow" is the flow pointed to by the default QoS rule

The central concept in the 3GPP text is the default QoS rule. TS 23.501 §5.7.1.4 specifies the following (summary, to be confirmed):

  • Every PDU Session has exactly one default QoS rule. It is sent to the UE at PDU Session establishment
  • The default QoS rule is the only QoS rule that may contain a Packet Filter Set that allows all UL packets, and in that case it uses the lowest priority (highest precedence value)
  • The QoS Flow associated with the default QoS rule remains established for the lifetime of the PDU Session

What practitioners call the "default QoS Flow" is this QoS Flow associated with the default QoS rule. Its role is close to the 4G Default Bearer, but "PDU Session = default flow" is not true.

Contents of a QoS rule (TS 24.501 §9.11.4.13)

In the NAS QoS rules IE, one QoS rule consists roughly of the following elements:

QoS rule
├─ QoS rule identifier (QRI)        ← identifies the QoS rule within the PDU Session
├─ Rule operation code              ← create / delete / modify ...
├─ DQR bit                          ← 1 = default QoS rule
├─ Number of packet filters
├─ Packet filter list
│   └─ Packet filter
│       ├─ Packet filter direction  ← UL only / DL only / bidirectional
│       ├─ Packet filter identifier
│       └─ Components               ← remote address, protocol, remote port, etc.
├─ QoS rule precedence              ← lower values are evaluated first
├─ Segregation bit
└─ QFI                              ← QoS Flow that carries UL packets matching this rule

(Excerpt of the main fields. For encoding details, see TS 24.501 §9.11.4.13.)

  • QRI and QFI are different things. Several QoS rules can point to the same QFI (multiple sets of packet filters tied to one QoS Flow).
  • The QoS Flow-side parameters (5QI, plus GFBR / MFBR for a GBR flow, etc.) are delivered per QFI to the UE in a separate IE, QoS flow descriptions (TS 24.501 §9.11.4.12). In PDU SESSION ESTABLISHMENT ACCEPT they are carried as Authorized QoS rules / Authorized QoS flow descriptions (TS 24.501 §8.3.2).

UL traffic classification

The UE evaluates a UL packet against the packet filters of the QoS rules in increasing order of precedence value, and sends it with the QFI of the first matching rule. If no rule matches, the UL packet is discarded (TS 23.501 §5.7.1.7, to be confirmed).

UL packet: TCP dst port 443
  ├─ QoS rule QRI=2  precedence=10   filter: UDP remote port 5004  → no match
  ├─ QoS rule QRI=3  precedence=20   filter: TCP remote port 443   → MATCH → QFI = 3
  └─ QoS rule QRI=1  precedence=255  DQR=1 (match-all)              (not evaluated)

Because the match-all default QoS rule acts as the final catch-all, "matches nothing and is discarded" normally does not happen. If the design does not put a match-all filter in the default QoS rule, UL packets that match no rule are dropped by the UE.

Reflective QoS is only outlined in this chapter

With Reflective QoS (TS 23.501 §5.7.5, TS 37.324 §6.2.2, to be confirmed), in which the UPF sets the RQI in the N3 PDU Session Container, the gNB conveys it to the UE with the RQI in the SDAP header, and the UE, triggered by it, derives UL QoS rules from DL packets, UL classification works without explicitly signaling QoS rules. In that case, "QoS rules received via signaling" and "derived QoS rules" coexist in the UE, so during analysis keep in mind which one a packet matched.


How — how QoS Flows are created and where they are distributed

Call Flow (the part embedded in PDU Session Establishment)

A QoS Flow is not created by a standalone procedure; it is established, added or modified within PDU Session Establishment (TS 23.502 §4.3.2.2.1) or PDU Session Modification (TS 23.502 §4.3.3.2).

sequenceDiagram
    participant UE
    participant gNB
    participant AMF
    participant SMF
    participant PCF
    participant UPF
    UE->>AMF: PDU Session Establishment Request (UL NAS Transport)
    AMF->>SMF: Nsmf_PDUSession_CreateSMContext
    opt Dynamic PCC
        SMF->>PCF: Npcf_SMPolicyControl_Create
        PCF-->>SMF: SM Policy Decision (PCC Rules, Session Rules)
    end
    Note over SMF: Bind PCC Rules to QoS Flows (QoS Flow binding)
assign QFIs, build QoS rules / QoS profiles / QERs SMF->>UPF: PFCP Session Establishment (Create PDR / QER) UPF-->>SMF: PFCP Session Establishment Response SMF->>AMF: Namf_Communication_N1N2MessageTransfer
(N1: Accept + QoS rules / N2: QoS Flow Setup Request List) AMF->>gNB: NGAP PDU Session Resource Setup Request Note over gNB: Decide QoS Flow → DRB (RAN implementation) gNB->>UE: RRC Reconfiguration (SDAP config + NAS Accept) gNB-->>AMF: PDU Session Resource Setup Response
(DL QoS Flow per TNL Information / QoS Flow Failed to Setup List) AMF->>SMF: Nsmf_PDUSession_UpdateSMContext SMF->>UPF: PFCP Session Modification (gNB F-TEID into DL FAR) Note over UE,UPF: From now on, UL is classified by the UE with QoS rules, and DL gets the QER QFI from the UPF

Signal Flow — what carries QoS Flow information

# Segment Message Main QoS Flow-related contents Defined in
1 PCF → SMF (N7) SM Policy Decision PCC Rule (QoS data: 5QI, ARP, GBR-type values, etc.), Session Rule (authorized Session-AMBR, authorized default QoS) TS 29.512 §4.2.2 / §5.6.2 (to be confirmed)
2 Inside the SMF — QoS Flow binding: PCC Rules with the same binding parameters (5QI, ARP, etc.) are bound to the same QoS Flow, and the QFI is decided TS 23.501 §5.7.1.5 / TS 23.503 §6.1.3.2.4 (to be confirmed)
3 SMF → UPF (N4) PFCP Session Establishment / Modification QFI in the PDI of the UL PDR; in the QER, Gate Status / MBR / GBR and the QFI to set in DL TS 29.244 §7.5.2.2 / §7.5.2.5 (to be confirmed)
4 SMF → gNB (N2, via AMF) PDU Session Resource Setup Request Transfer QoS Flow Setup Request List: QoS Flow Identifier + QoS Flow Level QoS Parameters (QoS Characteristics / ARP / GBR QoS Flow Information, etc.), PDU Session Aggregate Maximum Bit Rate TS 38.413 §9.3.4.1 / §9.3.1.12 (to be confirmed)
5 SMF → UE (N1, via AMF and gNB) PDU SESSION ESTABLISHMENT ACCEPT Authorized QoS rules (QFI, DQR, packet filters), Authorized QoS flow descriptions (5QI etc. per QFI), Session-AMBR TS 24.501 §8.3.2 / §9.11.4.12 / §9.11.4.13
6 gNB → SMF (N2, via AMF) PDU Session Resource Setup Response Transfer DL QoS Flow per TNL Information (gNB F-TEID and the list of QFIs carried in that tunnel), QoS Flow Failed to Setup List (per-flow rejection with Cause) TS 38.413 §9.3.4.2 (to be confirmed)

When QoS Flows are added to or modified in an existing PDU Session, N2 uses the QoS Flow Add or Modify Request List of PDU Session Resource Modify Request (TS 38.413 §8.2.3), and N1 uses PDU SESSION MODIFICATION COMMAND (TS 24.501 §8.3.9, to be confirmed).

The gNB can reject individual QoS Flows

Even if PDU Session Resource Setup "succeeds," if some QFIs appear in the QoS Flow Failed to Setup List of the Response Transfer, those QoS Flows were not established on the radio side. When "the PDU Session is up but only voice quality is bad," look here first. Because the UE has already received the QoS rules for those QFIs in the NAS Accept, the SMF follows up by removing the affected QoS rules / QoS Flows (TS 23.502 §4.3.2.2.1, to be confirmed).

Where does the SMF's default QoS come from?

The 5QI / ARP of the QoS Flow pointed to by the default QoS rule start from the UDM subscription data (subscribed default QoS) and, when a PCF is used, are decided by the PCF (the authorized default QoS in the Session Rule) (TS 23.501 §5.7.2.7, to be confirmed). In configurations without a PCF, the UDM values are used as they are or changed by SMF local configuration (the change policy is implementation dependent). The relationship between the PCF and SM, and PCC Rule details, are covered in PCF / SM Policy Association / PCC Rule.


How — RAN side: QoS Flow → DRB (SDAP)

Based on the received QoS profile, the gNB maps QoS Flows to DRBs (Data Radio Bearers). This mapping is handled by the radio-side SDAP (Service Data Adaptation Protocol) layer (TS 37.324 §4.4 / §5.3, TS 38.300 §12, to be confirmed).

flowchart LR
    subgraph N3["N3 Tunnel (1 TEID)"]
        Q1["QFI 1
5QI 5"] Q2["QFI 2
5QI 1"] Q3["QFI 3
5QI 9"] end subgraph RAN["gNB (SDAP)"] D1["DRB 1"] D2["DRB 2"] end Q1 --> D1 Q3 --> D1 Q2 --> D2 D1 --> UE["UE"] D2 --> UE
  • The gNB decides which QoS Flow goes onto which DRB and how many DRBs to create (RAN implementation dependent). It can bundle multiple QoS Flows into one DRB (N:1). This differs from the 1:1 "E-RAB = DRB" relationship in 4G.
  • The mapping is signaled to the UE in the RRC SDAP configuration (mapped QoS Flows, default DRB, etc.) (SDAP-Config in TS 38.331, clause number to be confirmed). In UL, packets of a QFI with no configured mapping are placed on the default DRB (TS 37.324 §5.2.1, to be confirmed).
  • The SDAP header (when configured) also contains the QFI (TS 37.324 §6.2.2, to be confirmed). In other words, the QFI is carried in two different headers: radio (SDAP header) → N3 (PDU Session Container).

How — UPF side: PDR / QER and QFI marking

UL:  gNB ──GTP-U (TEID=0x00000101, QFI=2)──► UPF
       PDR #11  PDI: Source=Access, F-TEID=0x00000101, QFI=2   → MATCH
         └─ QER #21: Gate UL=OPEN, MBR/GBR ...

DL:  DN ──IP (dst=UE IP, UDP 5004)──► UPF
       PDR #12  PDI: Source=Core, UE IP, SDF Filter (UDP 5004)  → MATCH
         ├─ FAR #12: Outer Header Creation (gNB F-TEID)
         └─ QER #22: Gate DL=OPEN, MBR/GBR ..., QFI = 2       ← QFI to put on DL GTP-U

(Values are fictitious examples.)

Direction Role of the QFI Defined in
DL The UPF identifies the QoS Flow with the PDR and writes the QER's QFI into the PDU Session Container. It may also mark the DSCP of the outer IP header per QoS Flow (based on 5QI and ARP) TS 23.501 §5.7.1.6 / TS 29.244 §7.5.2.5 (to be confirmed)
UL If the PDI of the UL PDR includes a QFI, matching can use the QFI in addition to the tunnel (F-TEID). The UPF verifies that the QFI of UL packets is aligned with the QoS rules given to the UE TS 23.501 §5.7.1.7 / TS 29.244 §7.5.2.2 (to be confirmed)
  • The 5QI itself is not in the PFCP QER. What the UPF needs to know is which packets (PDR), with which bit rates and gates (QER), and with which QFI (QER).
  • The mapping table from 5QI / ARP to DSCP values, and the queues / algorithms used for rate control, are operator configuration and vendor implementation.
  • For how to read PDRs / QERs themselves, see PFCP and PDR / FAR / QER / URR; for PDI matching conditions, see PDR / PDI / F-TEID / SDF Filter / Precedence.

Connecting it end to end

flowchart LR
    A["UE App"] --> B["QoS rules
evaluated in precedence order"] B --> C["QFI decided"] C --> D["SDAP
QFI → DRB"] D --> E["gNB"] E --> F["N3 GTP-U
TEID + QFI"] F --> G["UPF UL PDR
F-TEID + QFI"] G --> H["QER"] H --> I["N6 / DN"]

Packet Analysis (Wireshark)

Display Filter

Filter Use
gtp GTP-U on N3
gtp.ext_hdr.pdu_ses_con.qos_flow_id == 2 Filter by the QFI in the PDU Session Container (field name depends on version, to be confirmed)
gtp.teid == 0x12345678 && gtp.ext_hdr.pdu_ses_con.qos_flow_id == 2 Look at only one QoS Flow inside one tunnel (same caveat)
ngap QoS Flow Setup Request List / QoS Flow Level QoS Parameters
ngap.qosFlowIdentifier / ngap.fiveQI QFI and 5QI on NGAP (field names depend on version, to be confirmed)
pfcp Create PDR (QFI in PDI) / Create QER (QFI)
nas-5gs QoS rules / QoS flow descriptions in PDU SESSION ESTABLISHMENT ACCEPT

If NAS is ciphered, you cannot read the QoS rules

PDU SESSION ESTABLISHMENT ACCEPT is sent after NAS security is established, so it is normally ciphered, and the QoS rules cannot be read from a capture alone (they can be read with null ciphering in a test environment or with decryption using the keys). The NGAP QoS Flow Setup Request List, on the other hand, sits outside NAS ciphering, so it is practical to check the QFI-to-5QI correspondence in NGAP first (if N2 itself is protected with IPsec or similar, separate decryption is needed; TS 33.501 §9.2, to be confirmed).

Decode example (conceptual)

The following is a conceptual representation of the display structure, with fictitious values (capture needed).

NGAP PDUSessionResourceSetupRequest
 └─ PDUSessionResourceSetupListSUReq
     └─ PDUSessionResourceSetupItemSUReq
         ├─ pDUSessionID: 1
         ├─ pDUSessionNAS-PDU          ← contains PDU SESSION ESTABLISHMENT ACCEPT (may be ciphered)
         └─ PDUSessionResourceSetupRequestTransfer
             ├─ PDUSessionAggregateMaximumBitRate
             ├─ UL-NGU-UP-TNLInformation: 198.51.100.20 / TEID 0x00000101
             └─ QosFlowSetupRequestList
                 ├─ QosFlowSetupRequestItem
                 │   ├─ qosFlowIdentifier: 1
                 │   └─ qosFlowLevelQosParameters
                 │       ├─ qosCharacteristics: nonDynamic5QI → fiveQI: 5
                 │       └─ allocationAndRetentionPriority
                 └─ QosFlowSetupRequestItem
                     ├─ qosFlowIdentifier: 2
                     └─ qosFlowLevelQosParameters
                         ├─ qosCharacteristics: nonDynamic5QI → fiveQI: 1
                         ├─ allocationAndRetentionPriority
                         └─ gBR-QosInformation (MFBR / GFBR)

GTP-U (N3, DL)
 ├─ TEID: 0x12345678
 └─ PDU Session Container
     ├─ PDU Type: DL PDU SESSION INFORMATION (0)
     └─ QoS Flow Identifier: 2          ← not "5QI 2"; NGAP shows 5QI = 1

Order of checks

flowchart LR
    A["1. NGAP
build the QFI-to-5QI table"] --> B["2. NAS
QFI and packet filters
of QoS rules (if readable)"] B --> C["3. PFCP
QFI in PDI / QFI in QER"] C --> D["4. GTP-U
TEID + QFI of real packets"]

First build, in step 1, a table saying "in this PDU Session, QFI x = 5QI y", and then fit the values from steps 2–4 into it.

Do not confuse QFI and 5QI in Wireshark

Even if GTP-U shows QFI = 7, you cannot conclude "this is a 5QI 7 flow." The QFI is the number of a QoS Flow within a PDU Session, and the 5QI is the kind of quality of that flow. In environments where the SMF assigns QFI = 5QI they happen to match (TS 23.501 §5.7.1.1 allows this), but a match is not guaranteed. Always confirm the 5QI in NGAP (or NAS) signaling.


Trouble Shooting

Symptom Likely cause What to check Logs Packet Resolution
The PDU Session is up, but only the added QoS Flow (e.g., voice) has poor quality The gNB rejected only that QoS Flow QoS Flow Failed to Setup List and Cause in the Response Transfer gNB / AMF NGAP logs (implementation dependent) ngap Check the 5QI, GBR values and gNB capabilities
UL of a specific app ends up in the default flow Wrong packet filter in a QoS rule, wrong precedence order Packet filters and precedence in Authorized QoS rules SMF QoS-rule generation logs (implementation dependent) nas-5gs (if decryptable) / QFI in gtp Review PCC Rule flow descriptions and precedence design
Only UL packets of a specific QFI are dropped at the UPF Mismatch between the QFI in the UL PDR's PDI and the QFI of real packets QFI in Create PDR, QFI on N3 UPF PDR-mismatch / drop counters (implementation dependent) pfcp / gtp Fix the QFI in the PDRs generated by the SMF
DL is sent on a different DRB / priority than expected Wrong QFI in the QER (does not match the QFI signaled on N2) QFI in Create QER and QFI in the QoS Flow Setup Request List UPF / gNB logs (implementation dependent) pfcp / ngap / gtp Fix the QER's QFI. How the gNB treats an unknown QFI is implementation dependent
GTP-U has no PDU Session Container at all UPF / gNB implementation or configuration issue Next Extension Header Type in GTP-U N3 logs on both ends gtp Check the N3 configuration for 5GC (TS 29.281 §5.2.1 / §5.2.2.7 / TS 38.415, to be confirmed)
A report says "QFI=7 but we don't get 5QI 7 quality" Confusion between QFI and 5QI The qosFlowIdentifier / fiveQI pair in NGAP — ngap Build a QFI → 5QI table and re-evaluate

Isolating a QFI mismatch

Because the QFI appears in four places (N1 / N2 / N4 / N3), the fastest method is to line up the four values side by side for the same PDU Session.

Where to look IE Value (example) Verdict
N2 NGAP QoS Flow Identifier in the QoS Flow Setup Request List (5QI=1) 2 Reference
N1 NAS QFI of the Authorized QoS rule (voice packet filter) 2 OK
N4 PFCP QFI of Create QER (referenced from the voice DL PDR) 9 NG
N3 GTP-U QFI in the PDU Session Container of DL voice packets 9 NG, following N4
flowchart TD
    S["Expected QFI differs from QFI on N3"] --> D{"Direction?"}
    D -- "DL" --> Q["Compare the PFCP QER QFI
with the NGAP QFI"] Q -- "QER differs" --> F1["Fix QER generation in the SMF"] Q -- "QER is correct" --> P["Check which DL PDR matches
(Precedence / SDF Filter)"] D -- "UL" --> R["Check the QFI and packet filters
of the NAS QoS rules"] R -- "rules are correct" --> G["Check how the gNB maps DRB to QFI
and the QFI in the UL PDR"] R -- "rules differ" --> F2["Fix QoS rule generation in the SMF"]

Conversely, if the QFI on N3 is as expected but only the quality is wrong, the problem is not the QFI; suspect the QER's Gate / MBR / GBR, the gNB's DRB mapping and scheduling, and DSCP handling in the transport network.


Boundary between 3GPP specifications and vendor implementations

Defined by 3GPP Decided by vendors / operations
The QoS Flow model, QFI uniqueness (within a PDU Session), the triad of QoS profile / QoS rule / PDR QFI numbering policy (sequential, or QFI = 5QI)
Standardized 5QIs and QoS characteristics (Table 5.7.4-1) Characteristics of operator-defined 5QIs, the 5QI / ARP → DSCP mapping table
Encoding of QoS rules / QoS flow descriptions (TS 24.501) PCC Rule and packet filter design, default QoS values
NGAP QoS Flow Setup Request List / Failed to Setup List (TS 38.413) Number of DRBs at the gNB, how QoS Flows are bundled into DRBs, the scheduler
SDAP header and the QoS Flow → DRB mapping procedure (TS 37.324) Treatment by the gNB of a QFI received in N3 DL that was not configured via NGAP
PFCP QER (Gate / MBR / GBR / QFI), PDU Session Container (TS 38.415) UPF queues and rate-control algorithms (tc / DPDK / ASIC, etc.), CLIs such as show qos-flow

"Which queue / algorithm the UPF uses to honor the rate specified in the QER" and "which scheduler the gNB uses to meet the PDB" are outside the scope of 3GPP.


Comparison with EPC (4G)

Item 4G EPC 5GC
Unit of QoS EPS Bearer QoS Flow
Identifier EPS Bearer ID (EBI) QFI (unique within a PDU Session)
Kind of quality QCI 5QI
Relation to the forwarding path A separate GTP-U tunnel (TEID) per bearer One N3 tunnel per PDU Session + QFI
QoS identification on user packets Implicit, via the TEID Explicit, via the QFI in the PDU Session Container
Basic QoS Default Bearer QoS Flow associated with the default QoS rule
Additional QoS Dedicated Bearer Additional QoS Flows (within the same PDU Session)
UE-side classification UL TFT QoS rule (packet filters + precedence + QFI)
Radio side E-RAB and DRB are 1:1 The gNB decides QoS Flow → DRB (N:1 possible)
  • 5QI=1 corresponds to QCI=1 and 5QI=5 to QCI=5 (TS 23.501 §5.7.4). The correspondence of other values, and the details of how Priority Levels differ (e.g., 20 for 5QI 1 versus 2 for QCI 1), are to be confirmed.
  • For interworking with EPC (N26), the QoS flow description includes the EPS bearer identity so that the UE learns the correspondence between QoS Flows and EPS Bearers (TS 24.501 §9.11.4.12, to be confirmed). See Interworking for details.

3GPP Specification

Spec Clause Content
TS 23.501 §5.7.1.1 QoS Flow / QFI (unique within a PDU Session, QFI = 5QI allowed) (sub-clause numbers to be confirmed)
TS 23.501 §5.7.1.2 / §5.7.1.3 / §5.7.1.4 QoS profile / control of QoS Flows / QoS rules (default QoS rule) (to be confirmed)
TS 23.501 §5.7.1.5 / §5.7.1.6 / §5.7.1.7 QoS Flow mapping (QFI allocation) / DL traffic / UL traffic (to be confirmed)
TS 23.501 §5.7.2.1 / §5.7.2.7 5QI / default values (to be confirmed)
TS 23.501 §5.7.3.1–§5.7.3.7 QoS characteristics (Resource Type / Priority Level / PDB / PER / Averaging Window / MDBV) (to be confirmed)
TS 23.501 §5.7.4 (Table 5.7.4-1) Standardized 5QI to QoS characteristics mapping
TS 23.501 §5.7.5 Reflective QoS
TS 23.501 §5.33.2 Redundant transmission (example of multiple N3 tunnels for one PDU Session; to be confirmed)
TS 23.502 §4.3.2.2.1 / §4.3.3.2 PDU Session Establishment / Modification
TS 23.503 §6.1.3.2.4 QoS Flow binding (to be confirmed)
TS 24.501 §8.3.2 / §8.3.9 PDU SESSION ESTABLISHMENT ACCEPT / PDU SESSION MODIFICATION COMMAND (to be confirmed)
TS 24.501 §9.11.4.12 / §9.11.4.13 QoS flow descriptions / QoS rules
TS 38.413 §8.2.1 / §8.2.3 PDU Session Resource Setup / Modify
TS 38.413 §9.3.4.1 / §9.3.4.2 / §9.3.1.12 Setup Request Transfer (QoS Flow Setup Request List) / Setup Response Transfer / QoS Flow Level QoS Parameters (to be confirmed)
TS 38.415 §5.5.2 PDU Session Container (DL / UL PDU SESSION INFORMATION, QFI, RQI) (to be confirmed)
TS 29.281 §5.1 / §5.2.1 / §5.2.2.7 GTP-U header / extension headers / PDU Session Container (to be confirmed)
TS 29.244 §7.5.2.2 / §7.5.2.5 Create PDR (QFI in PDI) / Create QER (to be confirmed)
TS 29.512 §4.2.2 / §5.6.2 Npcf_SMPolicyControl_Create / data types (PCC Rule, Session Rule) (to be confirmed)
TS 37.324 §4.4 / §5.2.1 / §5.3 / §6.2.2 SDAP functions / UL data transfer / QoS Flow → DRB mapping / header formats (to be confirmed)
TS 38.300 §12 QoS in NG-RAN (to be confirmed)
TS 33.501 §9.2 Protection of N2 (to be confirmed)

Summary

  • 5G QoS is bound to the QoS Flow. A QoS Flow is identified by a QFI, and the QFI is unique only within a PDU Session
  • TEID = tunnel, QFI = QoS Flow within a session, 5QI = kind of QoS characteristics. Only the TEID and QFI are carried in user packets; the 5QI exists only in signaling
  • One PDU Session normally uses one N3 tunnel, with multiple QFIs flowing inside it (1 TEID : multiple QFIs)
  • A 5QI references the Resource Type (GBR / Delay-critical GBR / Non-GBR), Priority Level, PDB, PER, etc. Bit-rate values are separate from the 5QI
  • The "default QoS Flow" is the flow pointed to by the default QoS rule (DQR=1). The UE evaluates QoS rules in precedence order to decide the UL QFI
  • One SMF decision is distributed to the UE (QoS rules) / gNB (QoS Flow Setup Request List) / UPF (PDR, QER), and the gNB decides QoS Flow → DRB with SDAP
  • Isolate a QFI mismatch by lining up the values on N2 → N1 → N4 → N3. Do not read QFI = 7 in Wireshark as 5QI 7

Comprehension check

Q1. A PDU Session has a QoS Flow with QFI = 7, and a particular 5QI is configured for it. Which statement best describes the relationship between QFI and 5QI? A. The QFI identifies the GTP-U tunnel itself, and the 5QI represents that tunnel's TEID / B. The QFI identifies the QoS Flow within the PDU Session, and the 5QI is an identifier referring to the QoS characteristics applied to that QoS Flow / C. The QFI and 5QI must have the same value; only the names differ / D. The QFI identifies the AMF, and the 5QI identifies the SMF

Answer: B. The QFI identifies a QoS Flow within a PDU Session (TS 23.501 §5.7.1.1), and the 5QI is a reference to QoS characteristics (Resource Type, Priority Level, PDB, PER, etc.) (TS 23.501 §5.7.2.1 / §5.7.3). The tunnel is identified by the TEID (A is wrong), and setting the QFI equal to the 5QI is allowed but not mandatory (C is wrong). D is unrelated.

Q2. A PDU Session has three QoS Flows (QFI 1 / 2 / 3). In a normal configuration (no Dual Connectivity, no redundant transmission), how many DL N3 GTP-U TEIDs are used? And how does the gNB tell the three flows apart?

One. The UPF transmits the PDUs of a PDU Session in a single tunnel between the 5GC and the (R)AN, and flows are distinguished by the QFI in the GTP-U extension header (PDU Session Container) (TS 23.501 §5.7.1.6, TS 38.415 §5.5.2, to be confirmed). Based on the QFI and the QoS profile received via NGAP, the gNB puts each packet onto the corresponding DRB.

Q3. The UE has only two QoS rules, both with packet filters for specific ports only, and the rule with DQR=1 has no match-all filter. What happens to UL packets that match no filter?

The UE evaluates the QoS rules in increasing order of precedence, and UL packets that match no rule are discarded (TS 23.501 §5.7.1.7, to be confirmed). Normally the default QoS rule contains a match-all Packet Filter Set as the final catch-all, so this design can result in "no UL traffic at all except for specific apps." Check the DQR bit and packet filters in the NAS Authorized QoS rules.

Q4. NGAP signaled the voice QoS Flow as QFI = 2 (5QI = 1), but DL voice packets on N3 flow with QFI = 9. What do you check first?

The DL QFI is set by the UPF according to the QER's QFI, so first check the QFI in PFCP Create QER (or Update QER) and the DL PDR that references that QER (TS 29.244 §7.5.2.5, to be confirmed). If the QER's QFI is 9, the SMF generated the QER incorrectly; if the QER says 2 but 9 is applied, the packets may be matching an unintended DL PDR (Precedence / SDF Filter). How the gNB treats the unknown QFI 9 is implementation dependent.


Next Step