QoS Flow → DRB Mapping in 5G NR
How QoS flows (identified by QFI) are mapped onto Data Radio Bearers.
In 5G, QoS is not applied to a bearer end to end — it is applied to a QoS flow, and that flow is mapped down onto a radio bearer only at the very last step. The result is a clean two-level model: the core turns IP packets into QoS flows, and the radio turns QoS flows into DRBs. Get that split straight and everything about QFI, SDAP, reflective mapping and the default DRB falls into place. This page sits across TS 23.501 (the 5G QoS model) and TS 37.324 (SDAP).
Introduction
QoS-flow mapping is the machinery that decides, for every user-plane packet, which QoS flow it belongs to and then which radio bearer carries it. It is the heart of the 5G QoS architecture, spanning the NAS/core model of TS 23.501 and the SDAP protocol of TS 37.324, and configured on the radio side by RRC (TS 38.331).
It runs whenever a PDU session is active — on every packet, in both directions. In the downlink the core classifies and the radio steers; in the uplink the UE does both jobs itself. Because the mapping happens at two layers run by two different nodes, a QoS problem is almost always localisable to one of those two steps, which is why keeping the two levels distinct is the single most useful habit here.
This is also where the identifiers you meet everywhere else in 5G QoS — QFI, 5QI, ARP, the default DRB, reflective mapping — first fit together into one chain. Understand the two-level mapping and the rest of the QoS pages read as elaborations of it.
On this page
Why Two-Level Mapping Is Needed
In plain words: think of a big mailroom. First a sorter reads each letter's address and drops it into a labelled pigeonhole (that label is the QFI — this is the NAS-level "packet to flow" step). Then a courier collects several pigeonholes into one van for delivery (the van is the DRB — this is the AS-level "flow to bearer" step). Splitting the job in two lets the courier pack many pigeonholes into one van without the sorter having to care, while each letter keeps the priority its label gave it.
LTE did the whole job in one step: the EPS bearer was the unit of QoS, so classifying traffic and choosing a bearer were the same decision, fixed at bearer-setup time. That is simple but rigid — every distinct QoS treatment needed its own bearer and its own end-to-end tunnel, and there was no way to regroup traffic onto bearers without tearing the bearer down.
5G separates the two decisions so they can evolve independently. Classifying a packet into a flow (and giving it a QFI) is a core/NAS decision that reflects service policy; carrying that flow on a radio bearer is a RAN/AS decision that reflects radio conditions and bearer economics. Because they are decoupled, the radio can bundle several flows onto one DRB, or split them, or move a flow to a different DRB — all without the core re-classifying anything. The QFI is what keeps each flow's identity and treatment intact across that regrouping.
The Two-Level QoS Model
The single most important idea is that mapping happens twice, at two different layers, run by two different nodes. The first mapping is at the NAS level: raw IP flows are classified into QoS flows, each stamped with a QFI (QoS Flow Identifier). The second is at the AS level: those QoS flows are carried by data radio bearers, and the layer that decides which flow rides which DRB is SDAP (Service Data Adaptation Protocol). LTE had no equivalent of the first step — the EPS bearer was the unit of QoS. 5G decouples them so that many QoS flows can share one radio bearer while each keeps its own identity end to end.
Two mappings in series. NAS level: IP packets → QoS flows (QFI), performed by the UPF in the downlink and by the UE in the uplink. AS level: QoS flows → DRBs, performed by SDAP in the gNB (DL) and the UE (UL).
Decoupling QoS from the bearer lets the radio bundle several flows onto one DRB, or split them, without the core caring. The QFI keeps each flow's treatment intact even when flows are grouped, so the network scales to many services inside one PDU session.
The SMF defines the flows and their QoS, pushes packet-detection rules to the UPF and QoS rules to the UE, and sends a QoS profile per flow to the gNB over NGAP. The gNB then binds each flow to a DRB and configures SDAP and the UE via RRC.
One sentence to remember: the core maps packets to flows (NAS), the radio maps flows to bearers (AS). The QFI is the glue — it is written by whoever does the NAS mapping and read by whoever does the AS mapping.
| Aspect | NAS-level mapping | AS-level mapping |
|---|---|---|
| Maps | IP flows (SDFs) → QoS flows | QoS flows → DRBs |
| Identifier used | QFI assigned | QFI read, DRB chosen |
| Classifier rule | Packet filters / TFT (QoS rules, PDRs) | SDAP mapping rules from RRC |
| Downlink node | UPF | gNB SDAP |
| Uplink node | UE NAS / QoS rules | UE SDAP |
| Cardinality | Many IP flows → one QoS flow | Many QoS flows → one DRB |
| Spec | TS 23.501 | TS 37.324 |
NAS Level: IP Flows to QoS Flows
Inside a single PDU session the network splits the user's traffic into QoS flows, each identified by a QFI (6 bits, so up to 64 flows per PDU session, values 0–63). A QoS flow is the finest granularity of QoS differentiation in 5G: every packet with the same QFI gets the same forwarding treatment. The mapping from IP packets to a QoS flow is done by matching packets against packet filters — the 5G continuation of the LTE Traffic Flow Template (TFT) idea — where each filter looks at the classic five-tuple (source/destination IP, ports, protocol) and possibly DSCP.
The direction determines who classifies. In the downlink, the UPF receives IP packets from the data network, matches them against its Packet Detection Rules (PDRs) that carry Service Data Flow templates, and assigns each to a QoS flow — then marks that flow's QFI. In the uplink, the UE holds a set of QoS rules (each a packet filter set plus a QFI and a precedence value); it matches each outgoing packet against them in precedence order and stamps the resulting QFI. Every QoS rule is the UL counterpart of a UPF classification, so the two ends agree on which packets belong to which flow.
Each QoS flow's treatment is defined by its QoS characteristics, selected by the 5QI (5G QoS Identifier, an integer 0–255). The 5QI points at a resource type (Non-GBR, GBR, or Delay-critical GBR), a priority level (lower number = higher priority), a Packet Delay Budget, and a Packet Error Rate. Standardised 5QI values have fixed characteristics; dynamically assigned ones carry the characteristics explicitly. This is the key distinction to keep straight: the QFI names the flow, while the 5QI describes how it should be treated. Alongside the 5QI, every flow also carries an ARP (Allocation and Retention Priority, priority level 1–15 plus pre-emption capability and vulnerability flags) that governs admission and which flows survive under congestion.
Default QoS rule: every PDU session must have exactly one QoS rule marked as the default. It may be a match-all filter (lowest precedence) so that any packet not caught by a more specific rule still gets a QFI. Without it, an uplink packet could have nowhere to go — the default QoS rule guarantees classification, just as the default DRB later guarantees carriage.
AS Level: QoS Flows to DRBs (SDAP)
Once a packet carries a QFI, the radio side takes over. There is exactly one SDAP entity per PDU session, and its whole job is to map QoS flows onto data radio bearers. The relationship is many-to-one: several QoS flows may be carried on a single DRB, but a given QoS flow is mapped to exactly one DRB at any time. Grouping flows with similar QoS onto one DRB keeps the bearer count manageable; splitting flows that need different RLC modes or reliability across separate DRBs preserves their handling. A one-to-one mapping is simply the special case where a flow gets a DRB of its own — used for a flow with strict, unique requirements. Each DRB is named by a DRB-Identity (INTEGER 1–32 in TS 38.331), so the bearer budget is finite even when the flow count is not.
Default DRB: each PDU session has one DRB configured as the default. Any QoS flow with no explicit SDAP mapping rule is carried on the default DRB. This guarantees every flow has somewhere to go before the network signals a specific rule — and it is the anchor for reflective mapping, since a reflected flow starts life on the default DRB.
SDAP header, present or absent. A DRB can be configured with or without an SDAP header, per direction, via SDAP-Config (sdap-HeaderDL, sdap-HeaderUL, each the enumerated value present or absent). When the header is present, the QFI travels in it so the mapping is observable and, in the uplink, so the core can police it. When a DRB is configured without an SDAP header, it can carry only one QoS flow and no reflective mapping is possible on it — the flow-to-DRB relationship is fixed by configuration and the QFI is implicit. This "header-less" arrangement is the DRB-less-of-signalling case: minimal overhead, but no flexibility to remap or reflect.
| SDAP header field | Downlink (network → UE) | Uplink (UE → network) |
|---|---|---|
QFI (6 bits) | Present — identifies the QoS flow | Present — marks the flow the UE used |
RQI (Reflective QoS Indication) | Present — trigger UE to update packet→QoS-flow mapping (NAS level) | — not present |
RDI (Reflective DRB Indication) | Present — trigger UE to update QoS-flow→DRB mapping (AS level) | — not present |
D/C bit | — | Present — Data PDU vs Control PDU (end-marker) |
The End-to-End Picture
The clearest way to see the two levels is to follow a downlink packet from the data network all the way to the UE, and remember that the uplink is the same chain reversed. The UPF classifies and marks; the transport network carries the QFI in the GTP-U encapsulation header across N3; the gNB's SDAP reads that QFI and maps to a DRB; the radio delivers it.
The Downlink Path in Detail
On the downlink the network owns every decision, so there is nothing to signal to the UE about classification — the UE just receives. The chain runs like this. First, IP packets arrive at the UPF from the data network. The UPF matches them against the SDF templates in its Packet Detection Rules, assigns each to a QoS flow, and writes that flow's QFI into the encapsulation header of the GTP-U tunnel on the N3 interface between UPF and gNB. If reflective QoS is in play for that flow, the UPF also sets the Reflective QoS Indicator in the same encapsulation header.
Second, the gNB terminates the N3 tunnel, reads the QFI, and hands the packet to the SDAP entity of that PDU session. SDAP applies its configured QoS-flow-to-DRB mapping and puts the packet on the right DRB — adding a DL SDAP header (with the QFI, and the RQI/RDI bits if reflective operation is wanted) when the DRB is configured to carry one. If the flow has no explicit mapping rule, it goes on the default DRB. Third, PDCP/RLC/MAC carry the packet over the air, and the UE's SDAP strips the header and delivers the payload to the application, using the RQI/RDI bits to update its reflective mappings for the uplink.
Where the QFI physically lives: on N3 it is a field in the GTP-U extension header, not in the user's IP packet. Over the air it is in the SDAP header (when present). The user's own IP packet is never modified — the QFI is always carried around it.
The Uplink Path and Reflective Mapping
The uplink is the interesting direction, because the UE has to do both mappings itself and the network has a choice about how much to signal. Step one, NAS level: the UE takes an outgoing IP packet and matches it against its QoS rules in precedence order; the first matching rule gives the QFI, which the UE stamps on the packet. Step two, AS level: the UE's SDAP takes that QFI and maps it to a DRB, writing the QFI into the UL SDAP header so the network can verify the UE used the correct flow (QFI mapping verification at the gNB, and again at the UPF).
How does the UE learn the flow-to-DRB mapping for step two? Two ways:
- Explicit mapping: the network signals the mapping via RRC.
SDAP-Configlists, per DRB, theQFIs mapped to it (mappedQoS-FlowsToAdd). This is deterministic and always takes precedence. - Reflective mapping: the UE derives the UL mapping from what it sees in the downlink. When a DL SDAP PDU arrives with
RDIset, the UE updates its UL QoS-flow-to-DRB mapping so that the flow uses the same DRB the DL packet came in on — no explicit UL rule needed. This is the AS-level reflection.
There is a parallel NAS-level reflection driven by the RQI bit: when the UE sees RQI set, it creates or updates a derived QoS rule that mirrors the downlink packet's filter (swapping source and destination) and binds it to the same QFI, so future uplink packets of that same conversation are classified identically without the network ever signalling an explicit QoS rule. Explicit rules always win over derived ones for the same traffic. The full mechanism, timers and lifecycle are covered in Reflective QoS.
| Responsibility | Downlink | Uplink |
|---|---|---|
Assign QFI (NAS map) | UPF via PDR/SDF template | UE via QoS rules (explicit or derived) |
Carry QFI on transport | GTP-U encap header on N3 | UL SDAP header, then GTP-U on N3 |
| Map QoS flow → DRB (AS map) | gNB SDAP | UE SDAP (explicit / reflective) |
| Trigger reflection | Sets RQI (NAS) / RDI (AS) | — (UE reacts to DL bits) |
| Verify mapping | UE trusts network | gNB + UPF verify QFI |
| Unmapped flow lands on | Default DRB | Default DRB / default QoS rule |
End-marker on remap: when a flow is moved between DRBs, the UE sends an SDAP end-marker control PDU (flagged by the D/C bit) carrying the QFI on the old DRB, so the receiver knows the old bearer has drained and can switch cleanly without reordering. It is the only SDAP control PDU defined.
How the QoS Profile Reaches the gNB
The gNB does not invent QoS — it is told. The SMF is the control-plane owner of the 5G QoS model: it defines each QoS flow, allocates the QFI, picks the 5QI and ARP, and derives the per-flow QoS profile. That profile is delivered to the NG-RAN inside the PDU Session Resource Setup Request (or Modify) over NGAP (the N2 interface, relayed by the AMF). For each flow the profile carries the 5QI, the ARP (Allocation and Retention Priority), and, for GBR flows, the GFBR/MFBR (guaranteed/maximum flow bit rates) plus optional notification control.
Armed with the QoS profile, the gNB performs bearer mapping: it decides how to group the flows onto DRBs, sets each DRB's RLC mode and PDCP/SDAP configuration, and then configures the UE via RRCReconfiguration — sending the DRB setup and the SDAP-Config that lists the QFI-to-DRB mapping. The UE at the same time receives its QoS rules over NAS (from the SMF, in the PDU Session Establishment/Modification container). So three parameters flow together but land in different places: the QFI identifies the flow everywhere, the 5QI tells the gNB how to treat it, and the QoS profile is the NGAP package that carries them to the RAN.
| Parameter | Set by | Meaning / role |
|---|---|---|
QFI | SMF | Names the QoS flow within the PDU session (6 bits, up to 64). |
5QI | SMF | Selects QoS characteristics: resource type, priority, PDB, PER. |
ARP | SMF | Priority for admission/retention (pre-emption capability & vulnerability). |
GFBR/MFBR | SMF | Guaranteed / maximum bit rate, GBR flows only. |
| QoS profile | SMF → NG-RAN | The NGAP bundle (5QI+ARP+GBR params) in PDU Session Resource Setup. |
| QoS-flow→DRB map | gNB | Decided by RAN, signalled to UE in SDAP-Config via RRC. |
LTE ↔ NR: LTE had one mapping level, not two. The MME derived a per-bearer QoS from the QCI and pushed it to the eNB, which set up a dedicated EPS bearer with its own S1/S5 tunnel — classification (the TFT) and carriage (the bearer) were welded together. In 5G the SMF replaces the MME's QoS role, the 5QI replaces the QCI, packet filters / QoS rules replace the TFT, and the second (AS) mapping in SDAP is entirely new — it is what lets many flows share one DRB, which had no LTE equivalent.
Summary
5G QoS mapping is two steps in series, run by two nodes. NAS level classifies IP packets into QoS flows and stamps a QFI — done by the UPF (DL) via Packet Detection Rules, and by the UE (UL) via its QoS rules, matched in precedence order. AS level maps those flows onto DRBs — done by SDAP in the gNB (DL) and the UE (UL), many-to-one, with anything unmapped landing on the default DRB.
The QFI is the glue that survives the whole chain: written at the NAS step, carried on N3 in the GTP-U encapsulation header and over the air in the SDAP header, and read at the AS step. The 5QI (plus ARP and, for GBR flows, GFBR/MFBR) travels separately in the NGAP QoS profile the SMF sends the gNB, telling the RAN how to treat each flow before it decides the DRB grouping.
Uplink adds the twist that the UE can learn its mapping two ways — explicit RRC signalling (mappedQoS-FlowsToAdd, always wins) or reflective derivation from the downlink RQI/RDI bits. Keep the two levels distinct and every other QoS page — SDAP, reflective QoS, the wider model — slots onto this skeleton.
Quick Q&A
Q. What are the two levels of QoS mapping and who performs each?
A. NAS level maps IP flows to QoS flows (assigning a QFI) — done by the UPF in the downlink and by the UE's QoS rules in the uplink. AS level maps QoS flows to DRBs — done by SDAP in the gNB (DL) and in the UE (UL).
Q. Is the QoS-flow-to-DRB mapping one-to-one or many-to-one?
A. Many-to-one: several QoS flows can share one DRB, but each flow maps to exactly one DRB at a time. One-to-one is just the special case of a flow given its own DRB. Any unmapped flow falls to the default DRB.
Q. How does the QFI travel on the downlink between UPF and gNB, and then over the air?
A. On N3 it is carried in the GTP-U encapsulation (extension) header written by the UPF; over the air it is carried in the DL SDAP header added by the gNB. The user's IP packet itself is never modified.
Q. What is the difference between explicit and reflective flow-to-DRB mapping?
A. Explicit mapping is signalled by RRC in SDAP-Config (mappedQoS-FlowsToAdd). Reflective mapping is derived by the UE from the downlink: when RDI is set the UE maps the UL flow to the same DRB the DL arrived on. Explicit always takes precedence.
Q. What is the role of the 5QI versus the QFI?
A. The QFI names the flow (its identity end to end); the 5QI describes how the flow is treated (resource type, priority, packet delay budget, packet error rate). The SMF pairs them and sends the 5QI to the gNB inside the QoS profile.
Q. How does the QoS profile get to the gNB?
A. The SMF builds a per-flow QoS profile (5QI, ARP, and GBR rates for GBR flows) and sends it to NG-RAN over NGAP in the PDU Session Resource Setup Request, relayed via the AMF on N2. The gNB then chooses the DRBs and configures the UE by RRC.
Where this leads next
The two-level mapping is the skeleton of 5G QoS; the reflective mechanism and the wider model explain why it is shaped this way, and SDAP is the layer that runs the AS half.