MAC¶
Summary
- MAC (Medium Access Control) sits below RLC and above the physical layer — it's the layer that finally turns everything above it into a Transport Block the radio can actually send.
- Its main jobs are:2
- Mapping between logical channels (RLC's world) and transport channels (PHY's world)
- Multiplexing/demultiplexing MAC SDUs into/from Transport Blocks
- Scheduling information reporting (BSR, PHR)
- Error correction through HARQ
- Priority handling — both between UEs (dynamic scheduling) and between a single UE's logical channels (Logical Channel Prioritization)
- Padding
- It's also, somewhat surprisingly if you've read this site in order, the layer that formally runs the Random Access procedure — RACH is MAC clause 5.1, not its own separate protocol.
Think of MAC as:
"The loading dock — it takes whatever boxes RLC hands it, decides which ones go on this truck (Transport Block) and in what order, labels the truck, and handles what happens if a truck gets lost."
If you are confused...
Remember RLC's note that segmentation is "MAC-size driven, not SDU-size driven"? This page is why — MAC is the layer that actually knows the Transport Block size for this TTI, and everything RLC does is downstream of that. And when you read the RACH page, every message from Msg1 through Msg4 (or MsgA/MsgB) was a MAC-layer procedure the whole time.
MAC in the Protocol Stack¶
Figure 1. MAC structure overview2
MAC is largely transparent to two logical channels — BCCH and PCCH — meaning it doesn't add any of its own header information to them, even though BCCH-over-DL-SCH still goes through HARQ.1 Everything else gets full MAC treatment: multiplexed alongside other logical channels, given a MAC subheader, and packed into a Transport Block.
Why do we need so many channels?
Splitting things into this many small channel types looks like unnecessary complexity until you see what it buys you. Logical channels classify what kind of information is being carried — broadcast system info, paging, common signalling, dedicated signalling, user data. Transport channels classify how PHY physically carries it — its own coding, HARQ behavior, and channel structure. Keeping those two classifications independent, rather than collapsing everything into one channel type, is exactly what lets MIB skip RLC and HARQ handling entirely by riding straight over BCH via PBCH, while SIB1 — the same logical channel, BCCH — shares DL-SCH with ordinary scheduled traffic and does get HARQ (see the worked example below). One logical channel, two very different physical treatments, because the two concerns were kept separate in the first place.
Logical Channels & Transport Channels¶
MAC's most fundamental job is bridging two different worlds — the logical channels RLC deals in, and the transport channels PHY deals in:2
| Logical Channel | Type | Carries |
|---|---|---|
| BCCH | Control | Broadcast system information (MIB/SIB1) |
| PCCH | Control | Paging |
| CCCH | Control | SRB0 messages, before any dedicated config exists — see the RRC message catalog |
| DCCH | Control | SRB1/SRB2 — dedicated RRC and NAS signalling |
| DTCH | Traffic | DRB user-plane data |
Table 1. NR Logical Channels
| Transport Channel | Direction |
|---|---|
| BCH | Downlink |
| DL-SCH | Downlink |
| PCH | Downlink |
| UL-SCH | Uplink |
| RACH | Uplink |
Table 2. NR Transport Channels
The mapping¶
Figure 2. NR Mac Layer Channel Mapping1
Tracing a message you already know through this table
Recall from the RRC message catalog that MIB uses "BCCH → BCH" with no RLC at all, while SIB1 uses "BCCH → DL-SCH" with RLC-TM. This table is exactly where those mappings come from — MIB is small and time-critical enough to go straight over BCH via PBCH, while SIB1 and everything else on BCCH shares DL-SCH with ordinary scheduled data.
And RACH, the uplink-only transport channel with no logical channel mapped to it at all, is exactly what carries a Msg1 preamble — there's no SDU involved yet, just a preamble sequence, which is why RACH doesn't appear as a mapping target for any logical channel above.
Core Functions¶
| Function | What it does |
|---|---|
| Logical/transport channel mapping | Covered above |
| Multiplexing / demultiplexing | Packs MAC SDUs from one or more logical channels into a Transport Block (and unpacks on the way down) |
| Scheduling information reporting | BSR and PHR — see below |
| HARQ | Fast, PHY-adjacent error correction — see below |
| Priority handling between UEs | The gNB's scheduler deciding who gets resources when |
| Logical Channel Prioritization (LCP) | Deciding, within one UE's own grant, which logical channels get served first |
| Padding | Filling out a Transport Block to the exact size the scheduler granted |
Table 3. MAC Core Functions
Function Relevance by Link Direction¶
The functions above don't all apply equally everywhere. TS 38.321's Table 4.4-1 breaks down exactly which link direction each function is relevant for — from the perspective of a single UE's MAC entity, so "Downlink" means the UE receiving and "Uplink" means the UE transmitting:2
| MAC Function | Downlink | Uplink | Sidelink TX | Sidelink RX |
|---|---|---|---|---|
| Mapping between logical channels and transport channels | ✅ | ✅ | ✅ | ✅ |
| Multiplexing | — | ✅ | ✅ | — |
| Demultiplexing | ✅ | — | — | ✅ |
| Scheduling information reporting | — | ✅ | ✅ | — |
| Error correction through HARQ | ✅ | ✅ | ✅ | ✅ |
| Logical Channel Prioritization | — | ✅ | ✅ | — |
| Radio resource selection | — | — | ✅ | — |
Table 4. MAC Function Relevance by Link Direction (TS 38.321 Table 4.4-1)
The pattern makes sense once you notice it: multiplexing and LCP only happen on the transmitting side (you don't need to prioritize or pack data you're receiving), demultiplexing only happens on the receiving side, and HARQ and channel mapping — being symmetric, per-direction concerns — apply everywhere. Sidelink (SL) is UE-to-UE device communication that bypasses the gNB entirely (used for V2X and similar use cases) and isn't otherwise covered on this site; Radio resource selection — the UE autonomously picking its own transmission resources rather than being scheduled — only exists in that sidelink context, which is why it's the one function with just a single ✅.
HARQ¶
HARQ (Hybrid ARQ) combines Forward Error Correction with a fast, PHY-level ACK/NACK retransmission loop — the sender transmits a coded version of the data, the receiver tries to decode it, and if it fails, the receiver keeps the failed attempt and combines it with the retransmission (soft combining) rather than throwing it away. Multiple HARQ processes run in parallel per cell, so the sender doesn't have to sit idle waiting for one ACK before sending the next Transport Block.
NR vs. LTE: Uplink HARQ is now asynchronous too
In LTE, downlink HARQ was asynchronous (retransmissions could happen at any time) but uplink HARQ was synchronous (retransmissions were fixed to a specific timing relative to the original transmission). NR removed that asymmetry — both uplink and downlink HARQ are asynchronous, which means every HARQ transmission needs to explicitly carry its process number, since you can no longer infer it from timing alone.3
How does this relate to RLC's ARQ?
They're two separate, complementary retransmission loops. HARQ (MAC) is fast and local — it recovers from ordinary radio-link errors within milliseconds, but doesn't guarantee ultimate success. RLC's ARQ (AM only) is the slower backstop — if HARQ keeps failing on the same data past maxRetxThreshold, RLC's own retransmission (and, if that also gives up, an RRC re-establishment) is what actually recovers it.
Scheduling Info: BSR & PHR¶
Since the gNB decides how much uplink resource each UE gets, the UE needs a way to say how much data it actually has and how much power headroom it has left:
- Buffer Status Report (BSR) — reports how much data is buffered, grouped into up to 8 Logical Channel Groups (LCGs) rather than per individual logical channel. Triggered three ways: Regular (new higher-priority data arrives), Periodic (a configured timer), and Padding (there's leftover space in a Transport Block too small for anything else useful).
- Power Headroom Report (PHR) — reports how much extra transmit power the UE has available beyond what it's currently using, helping the gNB avoid granting more uplink resource than the UE can actually transmit at.
Logical Channel Prioritization (LCP)¶
When a UE gets an uplink grant, it has to decide which of its own logical channels get served first. Each logical channel is configured via RRC's LogicalChannelConfig4 with a priority (1–16, lower number = higher priority), a Prioritized Bit Rate (PBR), and a Bucket Size Duration (BSD) — a token-bucket mechanism that guarantees every logical channel gets at least its configured rate before any leftover grant is handed to the highest-priority channel first.2
Within one UE's grant, the overall priority order is:2
- MAC CE for C-RNTI, or data from UL-CCCH
- MAC CE for BSR (except a BSR sent purely for padding)
- MAC CE for PHR
- Data from any other logical channel
- MAC CE for BSR sent purely for padding
LCP has mapping restrictions too
A single MAC entity can support multiple numerologies, cells, and transmission timings at once — LCP's configuration can restrict which of those a given logical channel is even allowed to use, which matters a lot once carrier aggregation or multiple numerologies are in play.2
MAC Control Elements¶
Not everything MAC sends is user or signalling data — some of it is MAC talking to MAC, using MAC Control Elements (CEs), identified by reserved LCID values in the MAC subheader:1
| MAC CE | Purpose |
|---|---|
| Timing Advance Command | Carried in the RACH RAR (Msg2) — tells the UE how to adjust its uplink timing |
| UE Contention Resolution Identity | Carried in RACH Msg4 — echoes back the UE's identity to resolve contention |
| C-RNTI | Identifies the UE in a MAC PDU where its C-RNTI isn't otherwise known |
| BSR (Short / Long / Short Truncated / Long Truncated) | Reports buffer status, as described above |
| PHR (Single Entry / Multi Entry) | Reports power headroom, as described above |
| SCell Activation/Deactivation | Turns a configured Secondary Cell on or off without a full reconfiguration |
| PDCP Duplication Activation/Deactivation | Turns PDCP duplication on or off dynamically |
| Recommended Bit Rate | Suggests a bit rate to the UE for a given logical channel |
Table 5. MAC Control Elements
MAC PDU Structure¶
A MAC PDU is a sequence of MAC subheaders, each immediately followed by the MAC SDU, MAC CE, or padding it describes. Subheaders carry an LCID (identifying which logical channel, or which CE, the payload is) and, for variable-length payloads, a length field — this is what lets multiple SDUs from different logical channels, and multiple CEs, all ride together in a single Transport Block.
Scheduling: What 3GPP Does — and Doesn't — Specify¶
Every TTI, the gNB's scheduler has to decide which UEs get which time/frequency resources, using exactly the inputs covered above: BSR (who has data to send), PHR (who has the power budget to send it), and channel quality feedback (CQI, not covered on this page) telling it who's likely to get a clean decode right now.
The scheduling algorithm itself isn't standardized
3GPP specifies the inputs to scheduling (BSR, PHR, CQI, LCP priorities) and the mechanics of granting resources (DCI, HARQ processes), but deliberately leaves the scheduling algorithm — the actual decision logic for who gets served this TTI — as a gNB vendor implementation choice. This is intentional: it's one of the few areas where vendors compete on proprietary algorithm quality rather than interoperability.
Common approaches vendors implement, none of them mandated by spec:
- Round Robin — cycles through UEs with pending data in a fixed order, regardless of radio conditions. Simple and fair, but ignores channel quality entirely.
- Max C/I (Maximum Carrier-to-Interference) — always schedules whoever currently has the best channel quality. Maximizes total cell throughput, but can starve UEs with persistently poor conditions (e.g., cell-edge users).
- Proportional Fair (PF) — schedules based on a UE's instantaneous channel quality relative to its own recent average throughput, rather than its absolute quality. This is the common middle ground: it still favors good conditions, but doesn't let a consistently strong UE monopolize the cell the way Max C/I would.
Whichever algorithm a vendor picks, it consumes the same BSR/PHR/CQI inputs and still has to respect each UE's own LCP configuration once that UE's grant is decided — scheduling decides how much resource a UE gets; LCP decides what that UE does with it.
Logical Channel Information Elements¶
The LogicalChannelConfig IE (below) is what actually configures a logical channel's LCP behavior — priority, PBR, BSD, and its assigned LCG.4
Not every channel gets a full LogicalChannelConfig
LogicalChannelConfig — priority, PBR, BSD, LCG assignment — really only applies to DCCH and DTCH. BCCH, PCCH, and CCCH are common channels scheduled with fixed, built-in priority rather than the LCP token-bucket mechanism, so what you'd actually capture for those three is closer to their message-set ASN.1 (BCCH-DL-SCH-Message, PCCH-Message, UL/DL-CCCH-Message — already covered on the RRC page) than a LogicalChannelConfig instance.
BCCH-BCH
BCCH-DL-SCH
DL-CCCH
UL-CCCH
UL-CCCH-Message ::= SEQUENCE {
message UL-CCCH-MessageType
}
UL-CCCH-MessageType ::= CHOICE {
c1 CHOICE {
rrcSetupRequest RRCSetupRequest,
rrcResumeRequest RRCResumeRequest,
rrcReestablishmentRequest RRCReestablishmentRequest,
rrcSystemInfoRequest RRCSystemInfoRequest
},
messageClassExtension SEQUENCE {}
}
UL-CCCH
DL-DCCH
DL-DCCH-Message ::= SEQUENCE {
message DL-DCCH-MessageType
}
DL-DCCH-MessageType ::= CHOICE {
c1 CHOICE {
rrcReconfiguration RRCReconfiguration,
rrcResume RRCResume,
rrcRelease RRCRelease,
rrcReestablishment RRCReestablishment,
securityModeCommand SecurityModeCommand,
dlInformationTransfer DLInformationTransfer,
ueCapabilityEnquiry UECapabilityEnquiry,
counterCheck CounterCheck,
mobilityFromNRCommand MobilityFromNRCommand,
dlDedicatedMessageSegment-r16 DLDedicatedMessageSegment-r16,
ueInformationRequest-r16 UEInformationRequest-r16,
dlInformationTransferMRDC-r16 DLInformationTransferMRDC-r16,
loggedMeasurementConfiguration-r16 LoggedMeasurementConfiguration-r16,
spare3 NULL, spare2 NULL, spare1 NULL
},
messageClassExtension SEQUENCE {}
}
UL-DCCH
UL-DCCH-Message ::= SEQUENCE {
message UL-DCCH-MessageType
}
UL-DCCH-MessageType ::= CHOICE {
c1 CHOICE {
measurementReport MeasurementReport,
rrcReconfigurationComplete RRCReconfigurationComplete,
rrcSetupComplete RRCSetupComplete,
rrcReestablishmentComplete RRCReestablishmentComplete,
rrcResumeComplete RRCResumeComplete,
securityModeComplete SecurityModeComplete,
securityModeFailure SecurityModeFailure,
ulInformationTransfer ULInformationTransfer,
locationMeasurementIndication LocationMeasurementIndication,
ueCapabilityInformation UECapabilityInformation,
counterCheckResponse CounterCheckResponse,
ueAssistanceInformation UEAssistanceInformation,
failureInformation FailureInformation,
ulInformationTransferMRDC ULInformationTransferMRDC,
scgFailureInformation SCGFailureInformation,
scgFailureInformationEUTRA SCGFailureInformationEUTRA
},
messageClassExtension CHOICE {
c2 CHOICE {
ulDedicatedMessageSegment-r16 ULDedicatedMessageSegment-r16,
dedicatedSIBRequest-r16 DedicatedSIBRequest-r16,
mcgFailureInformation-r16 MCGFailureInformation-r16,
ueInformationResponse-r16 UEInformationResponse-r16,
sidelinkUEInformationNR-r16 SidelinkUEInformationNR-r16,
ulInformationTransferIRAT-r16 ULInformationTransferIRAT-r16,
iabOtherInformation-r16 IABOtherInformation-r16,
mbsInterestIndication-r17 MBSInterestIndication-r17,
uePositioningAssistanceInfo-r17 UEPositioningAssistanceInfo-r17,
measurementReportAppLayer-r17 MeasurementReportAppLayer-r17,
spare6 NULL, spare5 NULL, spare4 NULL, spare3 NULL, spare2 NULL, spare1 NULL
},
messageClassExtensionFuture-r16 SEQUENCE {}
}
}
MCCH
PCCH
Useful Resources¶
- 3GPP TS 38.321 — NR MAC protocol specification: channels, functions, HARQ, LCP, MAC CEs, and Random Access (Clause 5.1)
- 3GPP TS 38.331 — RRC protocol specification, including
LogicalChannelConfig - 3GPP TS 38.300 — NR overall description, protocol stack overview
- ShareTechnote — 5G/NR: MAC Control Elements
- ShareTechnote — 5G/NR: HARQ
-
Ryu, J. (n.d.). 5G/NR – MAC Control Elements. ShareTechnote. https://www.sharetechnote.com/html/5G/5G_MAC_CE.html ↩↩↩
-
3GPP. (n.d.). NR; Medium Access Control (MAC) protocol specification (Technical Specification TS 38.321). 3rd Generation Partnership Project. https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=3194 ↩↩↩↩↩↩↩
-
Ryu, J. (n.d.). 5G/NR – HARQ. ShareTechnote. https://www.sharetechnote.com/html/5G/5G_HARQ.html ↩
-
3GPP. (n.d.). NR; Radio Resource Control (RRC) protocol specification (Technical Specification TS 38.331), Clause 6.3.2 —
LogicalChannelConfig. 3rd Generation Partnership Project. https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=3197 ↩↩

