>
Home5G NRMAC — Medium Access ControlRandom Access
🧩 MAC — Medium Access ControlIntermediate

Random Access (4-step & 2-step) in 5G NR

The RACH procedure — preamble, RAR, Msg3 and contention resolution, plus 2-step RA.

📚 3GPP-basedTS 38.321TS 38.213TS 38.211TS 38.331

Uplink transmission in NR is scheduled and time-aligned. Before the gNB can grant a UE anything, two things must be true: the gNB must know the UE exists, and the UE's uplink transmissions must arrive inside the gNB's receive window despite propagation delay that varies by tens of microseconds across a cell. Random Access is the one procedure in NR that bootstraps both from nothing. It is called random because in the contention-based case the UE picks its opening move -- a preamble sequence -- at random from a pool shared with every other UE in the cell, since the network has no way to pre-assign one to a UE it does not yet know about.

Contents
  1. 01Why Random Access Exists, and What Triggers It
  2. 02Contention-Based and Contention-Free
  3. 034-Step RACH, Message by Message
  4. 042-Step RACH and the Fallback Mechanism
  5. 05Before MSG1: Resource and Preamble Selection
  6. 06PRACH Configuration: Formats, Occasions, Root Sequences
  7. 07RA-RNTI, MSGB-RNTI, and the Worked Addressing Example
  8. 08Inside MSG2: RAR MAC PDU Bit Layout
  9. 09Timing Advance: What the 12-Bit Command Actually Means
  10. 10Power Control and Ramping
  11. 11Timers, Counters, and Backoff
  12. 12Failure Modes and What Each One Means
  13. 13Configuration Reference (ASN.1 and Ranges)
  14. 14Illustrative Message Traces
  15. 15Release Deltas: Rel-15 to Rel-18
  16. 16Reading RACH in Logs: A Checklist
  17. 17Glossary
  18. 18References

1. Why Random Access Exists, and What Triggers It

Uplink transmission in NR is scheduled and time-aligned. Before the gNB can grant a UE anything, two things must be true: the gNB must know the UE exists, and the UE's uplink transmissions must arrive inside the gNB's receive window despite propagation delay that varies by tens of microseconds across a cell. Random Access is the one procedure in NR that bootstraps both from nothing. It is called random because in the contention-based case the UE picks its opening move -- a preamble sequence -- at random from a pool shared with every other UE in the cell, since the network has no way to pre-assign one to a UE it does not yet know about.

TS 38.321 clause 5.1.1 lists the triggers. They matter far more than they first appear, because the same four messages carry completely different consequences depending on which trigger started them:

TriggerRRC stateTypeIf it fails, the result is
Initial accessRRC_IDLECBRAConnection establishment failure; T300 governs. UE logs a connEstFailReport and reselects.
RRC connection re-establishmentCONNECTED -> IDLE transitCBRAT301 expiry -> go to RRC_IDLE with release cause.
Resume from RRC_INACTIVERRC_INACTIVECBRAT319 expiry -> go to RRC_IDLE; context discarded.
Handover to target cellRRC_CONNECTEDCFRA usuallyT304 expiry -> handover failure -> re-establishment attempt.
DL data arrival, UL out of syncRRC_CONNECTEDCFRA (PDCCH order)Contributes to RLF if it exhausts on the SpCell.
UL data arrival, no PUCCH SR resourceRRC_CONNECTEDCBRASR failure handling; RACH is the fallback SR mechanism.
timeAlignmentTimer expiryRRC_CONNECTEDCBRAUL is unusable until re-sync; HARQ buffers flushed.
Beam Failure RecoveryRRC_CONNECTEDCFRA (dedicated BFR preamble)beamFailureRecoveryTimer expiry -> RLF.
SCell addition / secondary TAG alignmentRRC_CONNECTEDCFRASCell released; PCell unaffected.
Request for Other SI (on-demand SI)IDLE / INACTIVE / CONNECTEDEitherSI request retried; not a link failure.
Consistent LBT failure on SpCell (NR-U)RRC_CONNECTEDCBRARel-16. Triggers RLF if no usable LBT channel remains.

Table 1. Random Access triggers, TS 38.321 cl. 5.1.1, with the RRC-level consequence of exhaustion. See §12.

💡
Key Point

A RACH failure is a MAC event with an RRC meaning. MAC only ever reports "Random Access problem"; it never decides that the link is down. Whether that becomes a connection failure, a handover failure, an SCell release or a full RLF is decided by RRC based on the trigger. Reading a burst of preamble retries without knowing the trigger tells you almost nothing.

2. Contention-Based and Contention-Free

CBRACFRA
Preamble sourceUE draws at random from the shared pool broadcast in rach-ConfigCommonNetwork assigns a specific ra-PreambleIndex in a dedicated RRC message or a PDCCH order
Collision possible?Yes -- two UEs can draw the same preamble in the same RONo -- the index is unique to one UE
Contention resolution needed?Yes: MSG3 identity + MSG4 echoNo: steps 3-4 are skipped entirely
Effective message count4 (or 2 with MSGA/MSGB)2 -- preamble and response
Where configuredSIB1 servingCellConfigCommon -> uplinkConfigCommon -> rach-ConfigCommonRACH-ConfigDedicated inside reconfigurationWithSync, or BeamFailureRecoveryConfig
Typical useInitial access, re-establishment, resume, SR fallback, TA recoveryHandover, beam failure recovery, DL-data-triggered re-sync, SCell/TAG alignment

Table 2. CBRA and CFRA differ in exactly one thing -- who chooses the preamble -- and everything else follows from that.

CFRA is not a different procedure so much as the same procedure with the ambiguity removed. Because the gNB knows which UE owns preamble index n, detecting n is itself the identification, so the RAR can carry the real C-RNTI and the UE can go straight to using it. This is why a handover completes in roughly a third of the messages of an initial access, and why handover RACH failures show up in logs as timer expiries (T304) rather than as contention-resolution mismatches.

⚠️
Common Pitfall

CFRA preambles are carved out of the same 64-preamble space as CBRA preambles in the cell. totalNumberOfRA-Preambles in RACH-ConfigCommon bounds the contention-based portion; the remainder is what the scheduler has left to hand out for handovers and BFR. Over-provisioning CBRA preambles in a cell with heavy inbound mobility starves CFRA and quietly pushes handovers onto contention-based access.

3. 4-Step RACH, Message by Message

4-step contention-based random access sequence diagram4-Step Contention-Based Random Access, End to EndPreambleContention resolutionRRC + NASUEgNB-DUgNB-CUAMFRRC_IDLE. SIB1 read, SSB #2 selectedRSRP -96 dBm, PLMN allowedMSG1 RA preamble, index 23PRACH occasion SFN 132 slot 19 sym 4 | RA-RNTI 11531MSG2 RAR on PDSCH, CRC scrambled by RA-RNTIRAPID 23 | TA cmd 245 | UL grant | TC-RNTI 0x46012MSG3 RRCSetupRequestCCCH -> UL-SCH -> PUSCH, 56-bit payload, TC-RNTI3F1AP INITIAL UL RRC MESSAGE TRANSFERcarries the CCCH SDU + C-RNTI + SUL indicationMSG4 UE Contention Resolution IdentityCE + RRCSetupPDSCH addressed to TC-RNTI; CE echoes the 48-bit MSG3 CCCH SDU4CE matches own MSG3 -> RA successful.TC-RNTI promoted to C-RNTI 0x4601.RRCSetupCompleteDCCH -> UL-SCH, carries the NAS Registration RequestF1AP UL RRC MESSAGE TRANSFERNGAP INITIAL UE MESSAGENAS Registration Request forwarded to the 5GCra-ResponseWindowsl10ra-ContentionResolutionTimerSteps 1-4 are the Random Access procedure proper (TS 38.321 cl. 5.1).Everything below MSG4 is shown to place RACH in context.
Figure 1. 4-step CBRA from RRC_IDLE, drawn across a split gNB so the F1AP and NGAP hops are visible. MSG1-MSG4 are the Random Access procedure; the rest is context.

3.1 MSG1 -- the preamble

The UE transmits a Zadoff-Chu-derived preamble sequence on a PRACH occasion. It carries no data at all -- the only information conveyed is which of up to 64 preamble indices was sent, and when and where it was sent. That pair is the entire content of MSG1, and both halves are used: the index becomes the RAPID echoed in the RAR, and the arrival time relative to the expected occasion becomes the timing advance.

  • Sequence: generated from prach-RootSequenceIndex plus a cyclic shift determined by zeroCorrelationZoneConfig. Length 839 for long formats, 139 for short formats TS 38.211 cl. 6.3.3.1.
  • Power: open-loop, from preambleReceivedTargetPower plus the UE's own pathloss estimate, ramped on each retry (§10).
  • Beam: the preamble is sent using the spatial filter of the SSB the UE selected, which is how the gNB learns which beam to answer on.

3.2 MSG2 -- the Random Access Response

Within ra-ResponseWindow slots of the end of the preamble, the UE monitors Type1-PDCCH common search space for a DCI whose CRC is scrambled with the RA-RNTI it computed from its own PRACH occasion. The scheduled PDSCH carries a RAR MAC PDU, which may hold several MAC RARs (one per preamble the gNB detected in that occasion) plus an optional backoff subheader. The UE walks the subheaders looking for a RAPID equal to the preamble index it sent; anything else in the PDU belongs to other UEs and is discarded. §8 has the bit layout.

A matching RAR gives the UE three things it did not have: a timing advance command so its next transmission lands in the right place, an uplink grant for MSG3, and a Temporary C-RNTI.

3.3 MSG3 -- the first real uplink message

MSG3 is sent on PUSCH using the RAR's grant, scrambled with the TC-RNTI, and is the first transmission that is actually HARQ-protected and power-controlled in closed loop. For initial access it carries RRCSetupRequest on CCCH, whose payload includes a ue-Identity -- either a 5G-S-TMSI-Part1 if the UE has one, or a 39-bit random value. That identity is the token used for contention resolution. For other triggers MSG3 instead carries RRCResumeRequest, RRCReestablishmentRequest, RRCSystemInfoRequest, or, in RRC_CONNECTED, a C-RNTI MAC CE plus buffered data.

📘
Spec Detail

MSG3 is deliberately tiny -- 56 to 72 bits of RRC payload is typical -- because it is transmitted before any channel-quality feedback loop exists, on a grant the gNB sized blind. ra-Msg3SizeGroupA exists precisely so a UE that needs a larger MSG3 can signal that fact in its choice of preamble group, before it has any way to ask (§5.3).

3.4 MSG4 -- contention resolution

The gNB echoes back the first 48 bits of the CCCH SDU it received in MSG3, inside a UE Contention Resolution Identity MAC CE TS 38.321 cl. 6.1.3.3. Every UE that sent that same preamble in that same occasion decodes the CE and compares. Exactly one match is possible. The winner considers Random Access successful and promotes its TC-RNTI to C-RNTI; the losers discard the TC-RNTI and restart from MSG1 with the power-ramping counter unchanged -- their preamble was received fine, so ramping further would only raise interference.

For a UE already in RRC_CONNECTED that sent a C-RNTI MAC CE in MSG3, contention resolution is implicit instead: successful reception of a PDCCH addressed to its own C-RNTI is the confirmation, and no CE is needed.

4. 2-Step RACH and the Fallback Mechanism

2-step RACH, added in Rel-16, removes a full round trip by bundling the preamble and the MSG3-equivalent payload into a single transmission. The trade is that the payload is sent before any timing advance has been applied and before any grant has been received, so it only works where the UE's uplink timing error is already within the cyclic prefix and its power estimate is good enough -- in practice, in good coverage, which is why selection is gated on msgA-RSRP-Threshold.

2-step random access with success and fallback outcomes2-Step Random Access, Success and FallbackUEgNBRSRP -78 dBm, above msgA-RSRP-Threshold -> UE selects 2-step(TS 38.321 cl. 5.1.1)MSGA preamble + PUSCH payload in one shotPRACH preamble 12 (msgA group) + PUSCH occasion PO#3, DMRS port 0Aoutcome A -- payload decodedMSGB successRARUE Contention Resolution Id + C-RNTI 0x4A02 + TA cmd + TPCBoutcome B -- preamble seen, payload lostMSGB fallbackRARRAPID + TA cmd + UL grant + TC-RNTI -- i.e. an ordinary RARMSG3 (retransmit the payload on the granted PUSCH)procedure completes as 4-step from here; no restart, no re-rampMSG4 contention resolution + RRCSetupmsgB-ResponseWindowFallback is the mechanism that makes 2-step safe to enable: a lost payloadcosts one extra round trip, not a whole new preamble cycle.
Figure 2. MSGA/MSGB, with both outcomes. Fallback is what keeps a failed payload from costing a full restart.
MSGAMSGB
CompositionPRACH preamble from the msgA preamble group + a PUSCH payload in an associated PUSCH occasion (PO)Either a successRAR or a fallbackRAR, selected per detected preamble
AssociationPreamble index -> PO and DMRS port, by msgA-PUSCH-Config TS 38.331Addressed by MSGB-RNTI (§7)
successRAR carries--UE Contention Resolution Identity (48 bits), C-RNTI, TA command, TPC, PUCCH resource indicator, HARQ feedback timing
fallbackRAR carries--RAPID, TA command, UL grant, TC-RNTI -- byte-for-byte an ordinary RAR
Window--
msgB-ResponseWindow
Attempt counter
msgA-TransMax
--

Table 3. MSGA and MSGB contents, TS 38.321 cl. 5.1.3a and 5.1.4a.

Three outcomes are possible after MSGA, and the distinction is exactly what makes 2-step deployable:

1. Preamble and payload both decoded -> successRAR. The UE has a C-RNTI and the procedure is over in two messages.

2. Preamble decoded, payload not -> fallbackRAR. The UE retransmits just the payload on the granted PUSCH, i.e. it completes as 4-step from MSG3 onward. No new preamble, no power re-ramp, no restart.

3. Nothing decoded -> no MSGB inside msgB-ResponseWindow. The UE ramps power and retries MSGA, up to msgA-TransMax, after which it switches to 4-step for the remaining attempts if 4-step is also configured.

Bar chart comparing time to a usable uplink grantWhere the Milliseconds GoOrder-of-magnitude only, 30 kHz SCS, first attempt successful012345678Approximate time to a usable UL grant (ms)5.58.04-step CBRA4.00.02-step CBRA4.00.0CFRA (handover)Preamble + responsePayload + resolution2-step and CFRA both remove a full RTT; CFRA additionally removes the collision risk.
Figure 3. Why 2-step and CFRA exist. The saving is a full round trip, not faster transmission.
⚠️
Common Pitfall

The counters are separate but the budget is shared. A UE configured with msgA-TransMax = n4 and preambleTransMax = n10 gets four MSGA attempts and then up to six 4-step attempts -- not fourteen. Sizing these two without reference to each other is a common misconfiguration; it shows up as access that appears to give up early in marginal coverage.

5. Before MSG1: Resource and Preamble Selection

By the time a preamble goes out, the UE has already made four decisions that the gNB will never see directly. Understanding them is what turns an unexplained preamble index in a log into a readable statement about what the UE believed.

Flowchart of UE resource and preamble selection decisionsWhat the UE Decides Before It Transmits AnythingResource selection, TS 38.321 cl. 5.1.1 and 5.1.2RA triggered(TS 38.321 cl. 5.1.1)Dedicated preamblesignalled by RRC?yesCFRAno contentionno2-step configured ANDRSRP > msgA-RSRP-Threshold?yes2-stepMSGAno -> 4-stepAny SSB withRSRP > rsrp-ThresholdSSB?noPick anySSByesSelect that SSB -> its RO setMsg3 size > ra-Msg3SizeGroupAAND pathloss headroom OK?noGroup ApreambleyesGroup BpreambleEvery branch here is decided by the UE from broadcast or dedicated configuration --the network never sees the decision, only its result in the preamble it detects.
Figure 4. The selection chain the UE runs on every attempt, not just the first -- an SSB change between attempts re-enters it near the middle, with consequences for power ramping (§10).

5.1 SSB and beam selection

The UE measures SSB RSRP and picks an SSB whose RSRP exceeds rsrp-ThresholdSSB. If none does, it may pick any SSB TS 38.321 cl. 5.1.2. The chosen SSB determines both the spatial filter used for the preamble and, through the SSB-to-RO association, the set of PRACH occasions and preamble indices the UE is allowed to use. This is the mechanism by which a beamformed cell steers uplink access without any uplink measurement having happened yet.

5.2 SSB-to-RO association

ssb-perRACH-OccasionAndCB-PreamblesPerSSB specifies how many SSBs share one RO and how many contention-based preambles each SSB gets. The choice branch names are the ratio: oneEighth means one SSB is mapped across eight consecutive ROs (many occasions per beam, useful for a cell with few beams and heavy load), while sixteen means sixteen SSBs share a single RO (few occasions, many beams). The association repeats over an association period of 1, 2, 4, 8 or 16 PRACH configuration periods, chosen as the shortest that covers all actual SSBs TS 38.213 cl. 8.1.

🔍
What You See In Logs

RA-RNTI is computed from the RO, and the RO is shared by every SSB mapped to it. In a sixteen configuration, sixteen beams' worth of UEs compute the same RA-RNTI, so one RAR MAC PDU can legitimately contain MAC RARs for UEs on completely different beams. A RAR that appears to be "for the wrong beam" in a log is usually this, not an error.

5.3 Preamble group A and group B

When groupBconfigured is present, the 64 preambles are split. Choosing a group B preamble is the UE's way of saying "my MSG3 will be larger than ra-Msg3SizeGroupA and I have enough power headroom to send it well", letting the gNB size the MSG3 grant appropriately from the preamble alone. The UE picks group B only if both conditions hold; if it needs the bigger MSG3 but lacks headroom, it falls back to group A and accepts segmentation. messagePowerOffsetGroupB is the headroom test's threshold offset.

5.4 4-step or 2-step

If both are configured on the selected carrier and the measured SSB RSRP of the selected SSB is above msgA-RSRP-Threshold, the UE uses 2-step; otherwise 4-step. If only one is configured, that one is used. A dedicated CFRA configuration overrides all of this.

6. PRACH Configuration: Formats, Occasions, Root Sequences

6.1 Preamble formats

The format sets sequence length, subcarrier spacing, number of repeated sequences and cyclic prefix length -- and through the CP, the maximum round-trip delay the gNB can absorb, which is the cell radius limit. Long formats use a 839-length sequence at 1.25 or 5 kHz PRACH SCS; short formats use 139 at the same SCS family as the uplink data.

FormatLenPRACH SCSSeq x CPDuration @15 kHzMax cell radiusWhere it fits
08391.25 kHz1 x 3168k1 ms~14.5 kmGeneral-purpose macro; the default many vendors ship
18391.25 kHz2 x 21024k3 ms~100 kmVery large rural / coastal cells; huge CP
28391.25 kHz4 x 4688k3.5 ms~22 kmCoverage-limited macro; repetition buys link budget
38395 kHz4 x 3168k1 ms~14.5 kmHigh-speed / high-Doppler; wider SCS resists Doppler
A113915-120 kHz2 x 288k0.14 ms~0.94 kmDense small cell
A213915-120 kHz4 x 576k0.29 ms~2.1 kmSmall / micro cell
A313915-120 kHz6 x 864k0.43 ms~3.3 kmMicro cell
B113915-120 kHz2 x 216k0.13 ms~0.59 kmIndoor / very dense
B413915-120 kHz12 x 936k0.86 ms~3.9 kmCoverage-enhanced short format; common on FR1 mid-band
C013915-120 kHz1 x 1240k0.10 ms~5.4 kmOne symbol, long CP -- cheapest occasion, decent range
C213915-120 kHz4 x 2048k0.33 ms~9.3 kmBest range available from a short format

Table 4. Preamble formats, TS 38.211 Tables 6.3.3.1-1 and 6.3.3.1-2. k = 64; durations and radii are at 15 kHz and halve per SCS doubling. Radii are the CP-implied limits, not link-budget limits.

⚠️
Common Pitfall

Cell radius here is a timing limit, not a coverage one. The CP must absorb the full round-trip delay of the furthest UE, or that UE's preamble smears into the next occasion. A UE 30 km out in a Format 0 cell can be perfectly audible and still never complete RACH -- the preamble arrives outside the detection window. Symptom: preambles detected with implausible TA values, or not at all, only from distant UEs.

6.2 PRACH occasions in time and frequency

prach-ConfigurationIndex selects a row of a large table TS 38.211 Tables 6.3.3.2-2 to 6.3.3.2-4 giving the format, the system-frame periodicity x and offset y, which subframes or slots within those frames carry ROs, the starting symbol, and how many time-domain ROs per slot. msg1-FDM (one/two/four/eight) then multiplies that in frequency, and msg1-FrequencyStart places the block in the uplink BWP.

PRACH occasions in time and frequency within one slotPRACH Occasions inside One Slotmsg1-FDM = four, short format B4, msg1-FrequencyStart = PRB 12t_id -> two time-domain PRACH occasions per slotRO f_id=0RO f_id=1RO f_id=2RO f_id=3RO f_id=0RO f_id=1RO f_id=2RO f_id=3RO 0RO 1RO 2RO 3012345678910111213OFDM symbol within the slotFrequency (PRBs, 12 per RO)PRACH occasion (RO)Other UL resources
Figure 5. One slot with msg1-FDM = four and two time-domain ROs. The (s_id, t_id, f_id) triple that identifies each RO is exactly what goes into the RA-RNTI formula in §7.

6.3 Root sequences and cyclic shifts

The 64 preambles a cell offers are generated from consecutive logical root sequences starting at prach-RootSequenceIndex, each root yielding several preambles through cyclic shifts. How many shifts fit per root is set by zeroCorrelationZoneConfig (N_CS): a larger zero-correlation zone tolerates more timing uncertainty -- necessary in a big cell -- but yields fewer preambles per root, so more roots are consumed to reach 64. restrictedSetConfig (type A or B) removes shifts that alias under high Doppler, at further cost in preambles per root.

⚠️
Common Pitfall

Neighbouring cells must not use overlapping root sequence ranges, or a preamble sent to one cell can be detected by the other, producing RARs the UE never expected and phantom uplink grants. The consumed range per cell is ceil(64 / preambles_per_root) roots, which grows as N_CS grows -- so raising zeroCorrelationZoneConfig for a large cell silently widens its root footprint and can collide with a neighbour that was previously spaced fine.

7. RA-RNTI, MSGB-RNTI, and the Worked Addressing Example

The gNB must address the RAR to a UE whose identity it does not know. It solves this by addressing the occasion instead: both sides can compute the same value from the time and frequency position of the preamble transmission TS 38.321 cl. 5.1.4.

Addressing formulae
RA-RNTI   = 1 + s_id + 14 x t_id + 14 x 80 x f_id + 14 x 80 x 8 x ul_carrier_id
MSGB-RNTI = RA-RNTI + 14 x 80 x 8 x 2

  s_id           first OFDM symbol of the PRACH occasion   0 .. 13
  t_id           first slot of the PRACH occasion in a system frame   0 .. 79
  f_id           frequency-domain index of the RO among the FDM'd ones   0 .. 7
  ul_carrier_id  0 = normal uplink (NUL),  1 = supplementary uplink (SUL)

7.1 Worked example

A UE transmits its preamble in the RO at symbol 4 of slot 19, frequency-domain index 1, on the normal uplink carrier:

🧮
Worked Calculation

s_id = 4, t_id = 19, f_id = 1, ul_carrier_id = 0

RA-RNTI = 1 + 4 + (14 x 19) + (14 x 80 x 1) + 0

= 1 + 4 + 266 + 1120

= 1391

Had the same UE used 2-step in the same RO:

MSGB-RNTI = 1391 + (14 x 80 x 8 x 2) = 1391 + 17920 = 19311

The gNB scrambles the DCI CRC for that RAR with 1391, and every UE that used that occasion -- regardless of preamble index or beam -- descrambles it successfully and reads the PDU. Disambiguation happens one layer up, at the RAPID subheader, and one layer up again at contention resolution.

📘
Spec Detail

The offset in MSGB-RNTI exists so that 2-step and 4-step responses in the same occasion never collide in the RNTI space. The RA-RNTI space is 1..17920 and MSGB-RNTI occupies 17921..35840; both must fit within the 0x0001-0xFFEF RNTI range shared with C-RNTI, P-RNTI, SI-RNTI and the rest TS 38.321 cl. 7.1.

8. Inside MSG2: RAR MAC PDU Bit Layout

A RAR MAC PDU is one or more MAC subPDUs. Each subPDU is a subheader, optionally followed by a payload. There are two subheader shapes, distinguished by the T bit:

  • T = 0, backoff subheader: E | T | R | R | BI(4). Carries no payload. If present it must be first, and it applies to every UE reading the PDU.
  • T = 1, RAPID subheader: E | T | RAPID(6). Followed by a 7-octet MAC RAR, except when the RAPID corresponds to an on-demand SI request, in which case there is no payload -- the acknowledgement is the RAPID.
  • E is the extension bit: 1 means another subPDU follows, 0 means this is the last.
Bit-level layout of a RAR MAC PDU across nine octetsRAR MAC PDU: Subheaders and the 7-Octet MAC RARTS 38.321 cl. 6.1.5, 6.2.2 and 6.2.3bit76543210Oct 1E=1T=0RRBI = 3 (30 ms backoff)Oct 2E=0T=1RAPID = 23Oct 3RTiming Advance Command (bits 11..5 of 12)Oct 4TA Command (bits 4..0)UL Grant (26..24)Oct 5UL Grant (bits 23..16)Oct 6UL Grant (bits 15..8)Oct 7UL Grant (bits 7..0) -- 27 bits totalOct 8Temporary C-RNTI (MSB) 0x46Oct 9Temporary C-RNTI (LSB) 0x01Octets 1-2 are two MAC subheaders: a backoff subheader (T=0) then a RAPID subheader(T=1, E=0 = last). Octets 3-9 are the fixed 7-octet MAC RAR it introduces.
Figure 6. A RAR MAC PDU with a backoff subheader and one MAC RAR. The 12-bit TA command and 27-bit UL grant both straddle octet boundaries, which is where hand-decoding usually goes wrong.
FieldBitsRangeMeaning
R
10Reserved, set to zero
Timing Advance Command120 .. 3846Initial UL timing correction; see §9 for the conversion
UL Grant27--Frequency hopping flag (1), PUSCH frequency resource allocation (14), PUSCH time resource allocation (4), MCS (4), TPC command for MSG3 (3), CSI request (1)
Temporary C-RNTI160x0001 .. 0xFFEFBecomes the C-RNTI if this UE wins contention resolution

Table 5. MAC RAR fields, TS 38.321 cl. 6.2.3. Total 56 bits = 7 octets, fixed.

8.1 The MSGB variant

A MSGB MAC PDU TS 38.321 cl. 6.1.5a can mix successRAR and fallbackRAR subPDUs plus a backoff subheader, because one MSGB answers every MSGA the gNB detected in that occasion and some payloads will have decoded while others did not. A successRAR is larger than a MAC RAR -- it carries the 48-bit contention resolution identity and a C-RNTI, since it must both identify the winner and equip it.

9. Timing Advance: What the 12-Bit Command Actually Means

The RAR's TA command is an absolute value, unlike the 6-bit relative adjustments carried later in Timing Advance Command MAC CEs. It sets:

TS 38.213 cl. 4.2
N_TA = T_A x 16 x 64 / (2^mu)            [in units of T_c]
  T_c = 1 / (480000 x 4096) s  ~ 0.509 ns
  mu  = numerology: 0 = 15 kHz, 1 = 30 kHz, 2 = 60 kHz, 3 = 120 kHz
  T_A = the 12-bit RAR field, 0 .. 3846
🧮
Worked Calculation

T_A = 245, 30 kHz SCS (mu = 1):

N_TA = 245 x 16 x 64 / 2 = 125 440 T_c

= 125 440 x 0.509 ns ~ 63.8 us

One-way propagation is half of that: ~31.9 us, which at c is ~9.6 km of path. The UE now advances every uplink transmission by 63.8 us so it lands aligned at the gNB.

Step size at 30 kHz: 16 x 64 / 2 = 512 T_c ~ 0.26 us ~ 39 m of range resolution.

The maximum T_A of 3846 corresponds to roughly 1 ms of advance at 15 kHz -- about 150 km of one-way path -- which is the ceiling on terrestrial cell size regardless of preamble format. Rel-17 NTN raises this with a separate common TA (ta-Common) applied on top, precisely because the 12-bit field cannot express a satellite's delay.

🔍
What You See In Logs

In logs, a TA command near zero on initial access means the UE is essentially at the antenna; a value that jumps by hundreds between consecutive RACH procedures on the same UE means it moved, changed beam to a differently-delayed path, or -- most often -- was answered by a different cell than you assumed. Correlate TA against the cell's known geometry before believing a mobility story.

10. Power Control and Ramping

PRACH power is open loop -- there is no feedback yet -- so the UE computes it from a target the network broadcasts plus its own downlink pathloss estimate, and increases it on each failed attempt TS 38.213 cl. 7.4:

PRACH transmit power
P_PRACH = min { P_CMAX ,
                preambleReceivedTargetPower
                + PL                                (DL pathloss estimate)
                + DELTA_preamble                    (format-dependent offset)
                + (COUNTER - 1) x powerRampingStep }

COUNTER = PREAMBLE_POWER_RAMPING_COUNTER, starts at 1
🧮
Worked Calculation

preambleReceivedTargetPower = -104 dBm, powerRampingStep = dB4, estimated PL = 118 dB, P_CMAX = 23 dBm:

attempt 1: -104 + 118 + 0 = 14 dBm

attempt 2: -104 + 118 + 4 = 18 dBm

attempt 3: -104 + 118 + 8 = 22 dBm

attempt 4: -104 + 118 + 12 = 26 dBm -> clipped to 23 dBm

From attempt 4 onward the UE is at maximum power and further ramping changes nothing. Attempts 4 through 10 are, in link-budget terms, identical retries -- they only help against collisions and fading, not against pathloss.

Timeline of three preamble attempts with response windows and backoffPower Ramping and RAR Windows Across Three AttemptspowerRampingStep dB4, ra-ResponseWindow sl10, backoffIndicator index 2PRACH Txra-ResponseWindowBackoff waitsl10 -> 5 ms @ 30 kHzatt 10 dBatt 2+4 dBatt 3+8 dBno RARno RARRAR receiveduniform(0, BI=20 ms)uniform(0, 20 ms)success0102030405060Time (ms)The wall-clock cost of a failed attempt is dominated by the RAR window plus the random backoff,not by the preamble itself.
Figure 7. Three attempts with ramping, RAR windows and random backoff. The elapsed time is dominated by the window and the backoff.
⚠️
Common Pitfall

PREAMBLE_POWER_RAMPING_COUNTER is not incremented when the UE changes the spatial filter -- i.e. when it selects a different SSB between attempts TS 38.321 cl. 5.1.3. This is correct behaviour (the new beam's pathloss is a fresh estimate, not an under-estimate to correct) but it means a UE oscillating between two marginal beams can burn through preambleTransMax at almost constant power and fail without ever having ramped meaningfully. In logs this looks like ten attempts at the same power -- which is easy to misread as a broken ramping configuration.

11. Timers, Counters, and Backoff

ParameterASN.1 valuesTypicalWhat it does
ra-ResponseWindow
sl1, sl2, sl4, sl8, sl10, sl20, sl40, sl80sl10Slots to monitor for the RAR after the preamble. Starts at the first PDCCH occasion after the preamble ends, not at the preamble.
msgB-ResponseWindow
sl1 .. sl320sl20Same, for MSGB. Longer because MSGA payload decoding takes the gNB longer.
ra-ContentionResolutionTimer
sf8, sf16, sf24, sf32, sf40, sf48, sf56, sf64sf64Subframes to wait for MSG4 after MSG3. Expiry = contention considered lost, restart from MSG1.
preambleTransMax
n3, n4, n5, n6, n7, n8, n10, n20, n50, n100, n200n10Total preamble transmissions before MAC reports a Random Access problem to RRC.
msgA-TransMax
n1, n2, n4, n8, n16, n32, n64n4MSGA attempts before switching to 4-step (if configured).
powerRampingStep
dB0, dB2, dB4, dB6dB2 or dB4Increment per attempt that did not change spatial filter.
preambleReceivedTargetPower
-202 .. -60 dBm (1 dB steps)-104 dBmTarget received power at the gNB; the anchor of the open-loop calculation.
backoffIndicator
index 0..15 in the RARsignalled per RARUpper bound of a uniform random wait before the next attempt. Load control.
T300
ms100 .. ms2000ms1000RRC: RRCSetupRequest sent -> RRCSetup received. Bounds the whole initial access, RACH included.
T304
ms50 .. ms10000ms1000RRC: handover execution. Bounds the CFRA at the target cell.
T319
ms100 .. ms2000ms1000RRC: RRCResumeRequest sent -> RRCResume received.

Table 6. RACH-relevant timers and counters, TS 38.331 RACH-ConfigGeneric and UE-TimersAndConstants.

11.1 Backoff indicator values

A gNB under load sets a backoff subheader in the RAR. Every UE reading that PDU -- including UEs whose RAPID is not present -- waits a uniformly random time in [0, BI] before its next attempt, which spreads a thundering herd without any per-UE signalling.

Index01234567
ms0102030406080120
Index891011121314-15
ms1602403204809601920reserved

Table 7. Backoff parameter values, TS 38.321 Table 7.2-1.

12. Failure Modes and What Each One Means

Sequence diagram of the preambleTransMax failure pathFailure Path: preambleTransMax ReachedUE MACUE RRCgNBPreamble attempt 1 (-104 dBm target + PL)PREAMBLE_POWER_RAMPING_COUNTER = 11Preamble attempt 2 (+4 dB)counter = 22attempts 3 .. 9 omitted -- each one: new preamble drawn, +4 dB, optional backoff waitPreamble attempt 10 (+36 dB, clipped at P_CMAX)counter = 10 = preambleTransMax10Random Access problem indicationTS 38.321 cl. 5.1.4 -- MAC tells RRC,it does not retry on its ownRRC action depends on the state the RA was triggered fromIDLE, T300 running -> connection establishment failure,log connEstFailReport, reselectCONNECTED, on SpCell -> Radio Link Failure -> re-establishmentCONNECTED, on SCell -> SCell release only, PCell unaffectedDuring handover (T304) -> T304 continues; expiry = HO failureA run of preamble failures is not itself a link failure -- what it means is decided entirely by RRC,from the trigger. This is the single most common source of confusion when reading RACH logs.
Figure 8. Exhausting preambleTransMax produces one MAC event with four possible RRC meanings.
FailureDetected byImmediate UE actionDiagnostic pointer
No RAR within ra-ResponseWindowMACIncrement counter, ramp power, draw a new preamble, apply backoff, retryUplink coverage, PRACH configuration mismatch, or gNB PRACH detector threshold. If TA values in successful attempts are large, suspect the CP/format limit (§6.1).
RAR received but RAPID does not matchMACTreat as no RAR for this UE; the PDU belonged to othersNormal under load. Persistent, with high load, means preamble collision -- consider more preambles per SSB or more ROs.
MSG3 sent, no MSG4 before ra-ContentionResolutionTimerMACRestart from MSG1; counter incrementedMSG3 grant too small or MCS too aggressive; or the UE lost contention. Check whether group B was selected with inadequate headroom.
MSG4 CE does not echo own identityMACContention lost. Restart from MSG1 without incrementing the power ramping counterPure collision. The preamble was fine, so ramping would only add interference.
preambleTransMax reachedMAC -> RRCRandom Access problem indication to RRC; MAC stopsMeaning depends on trigger -- see the table in §1.
msgB-ResponseWindow expiry (2-step)MACRamp and retry MSGA up to msgA-TransMax, then fall back to 4-stepmsgA-RSRP-Threshold set too permissively for the coverage; UEs are choosing 2-step where the payload cannot survive.
fallbackRAR receivedMACNot a failure. Retransmit payload as MSG3 on the granted PUSCHA high fallback rate is the signal -- it means the preamble link is fine but the MSGA PUSCH is not.

Table 8. RACH failure modes, what the UE does, and what each one points at.

💡
Key Point

Two of these -- RAPID mismatch and MSG4 identity mismatch -- are expected in any loaded cell and are not faults. Only their rate is informative. The two that always deserve attention are preambleTransMax exhaustion and contention-resolution-timer expiry, because both cost a full procedure restart.

13. Configuration Reference (ASN.1 and Ranges)

The broadcast configuration lives at SIB1 -> servingCellConfigCommon -> uplinkConfigCommon -> initialUplinkBWP -> rach-ConfigCommon. Abridged to the fields that matter for the procedure:

RACH-ConfigCommon ::= SEQUENCE {
    rach-ConfigGeneric                RACH-ConfigGeneric,
    totalNumberOfRA-Preambles         INTEGER (1..63)              OPTIONAL,
    ssb-perRACH-OccasionAndCB-PreamblesPerSSB CHOICE {
        oneEighth   ENUMERATED {n4,n8,n12,...,n64},
        oneFourth   ENUMERATED {n4,n8,n12,...,n64},
        oneHalf     ENUMERATED {n4,n8,n12,...,n64},
        one         ENUMERATED {n4,n8,n12,...,n64},
        two         ENUMERATED {n4,n8,...,n32},
        four        INTEGER (1..16),
        eight       INTEGER (1..8),
        sixteen     INTEGER (1..4)
    }                                                              OPTIONAL,
    groupBconfigured SEQUENCE {
        ra-Msg3SizeGroupA          ENUMERATED {b56,b144,b208,b256,...,b1000},
        messagePowerOffsetGroupB   ENUMERATED {minusinfinity,dB0,dB5,...,dB18},
        numberOfRA-PreamblesGroupA INTEGER (1..64)
    }                                                              OPTIONAL,
    ra-ContentionResolutionTimer      ENUMERATED {sf8,sf16,...,sf64},
    rsrp-ThresholdSSB                 RSRP-Range                   OPTIONAL,
    prach-RootSequenceIndex           CHOICE {
        l839  INTEGER (0..837),
        l139  INTEGER (0..137)
    },
    msg1-SubcarrierSpacing            SubcarrierSpacing            OPTIONAL,
    restrictedSetConfig               ENUMERATED {unrestrictedSet,
                                                 restrictedSetTypeA,
                                                 restrictedSetTypeB},
    msg3-transformPrecoder            ENUMERATED {enabled}         OPTIONAL
}

RACH-ConfigGeneric ::= SEQUENCE {
    prach-ConfigurationIndex          INTEGER (0..255),
    msg1-FDM                          ENUMERATED {one,two,four,eight},
    msg1-FrequencyStart               INTEGER (0..maxNrofPhysicalResourceBlocks-1),
    zeroCorrelationZoneConfig         INTEGER (0..15),
    preambleReceivedTargetPower       INTEGER (-202..-60),
    preambleTransMax                  ENUMERATED {n3,n4,n5,n6,n7,n8,n10,
                                                 n20,n50,n100,n200},
    powerRampingStep                  ENUMERATED {dB0,dB2,dB4,dB6},
    ra-ResponseWindow                 ENUMERATED {sl1,sl2,sl4,sl8,sl10,
                                                 sl20,sl40,sl80}
}

Listing 1. Abridged from TS 38.331. ... marks omitted enumeration members and extension markers.

14. Illustrative Message Traces

🔍
About These Traces

Illustrative trace. Field names and encodings follow 3GPP; the values are constructed for this document and are not a capture from any deployed or lab network.

14.1 The broadcast configuration the UE starts from

[RRC-DL-BCCH] SIB1 -- rach-ConfigCommon
SIB1
 servingCellConfigCommon
  uplinkConfigCommon
   initialUplinkBWP
    rach-ConfigCommon
     rach-ConfigGeneric
      prach-ConfigurationIndex ....... 159        -- format B4, every 10 ms
      msg1-FDM ....................... four       -- 4 ROs side by side
      msg1-FrequencyStart ............ 12         -- PRB offset in the BWP
      zeroCorrelationZoneConfig ...... 11
      preambleReceivedTargetPower .... -104       -- dBm
      preambleTransMax ............... n10
      powerRampingStep ............... dB4
      ra-ResponseWindow .............. sl10
     totalNumberOfRA-Preambles ....... 56         -- 8 reserved for CFRA
     ssb-perRACH-OccasionAndCB-PreamblesPerSSB
      one ........................... n56
     groupBconfigured
      ra-Msg3SizeGroupA ............. b56
      messagePowerOffsetGroupB ...... dB10
      numberOfRA-PreamblesGroupA .... 48
     ra-ContentionResolutionTimer .... sf64
     rsrp-ThresholdSSB ............... 42         -- RSRP-Range -> -114 dBm
     prach-RootSequenceIndex
      l139 .......................... 22
     restrictedSetConfig ............. unrestrictedSet

Listing 2. rach-ConfigCommon as it would appear in a decoded SIB1.

14.2 MSG1 and MSG2

[MAC] MSG1 / MSG2
12:04:31.882  [MAC-UL] RA procedure initiated
              trigger ................ initialAccess (RRC_IDLE)
              ra-Type ................ 4-step   (2-step not configured)
              selected SSB ........... idx 2, RSRP -96 dBm  (> -114 threshold)
              preamble group ......... A        (Msg3 56 bits <= b56)
              ra-PreambleIndex ....... 23       (random, 0..47 in group A)
              PRACH occasion ......... SFN 132, slot 19, symbol 4, f_id 1
              RA-RNTI ................ 1391     (see the worked example, S7)
              PREAMBLE_POWER_RAMPING_COUNTER 1
              P_PRACH ................ 14.0 dBm (target -104 + PL 118)

12:04:31.887  [PHY-DL] PDCCH found, DCI 1_0, CRC scrambled by RA-RNTI 1391
              -> PDSCH  32 PRB, MCS 4

12:04:31.888  [MAC-DL] RAR MAC PDU, 9 octets
              subPDU 1  E=1 T=0  BI=3            -- 30 ms backoff advertised
              subPDU 2  E=0 T=1  RAPID=23        -- our preamble, match
                MAC RAR
                  R ...................... 0
                  Timing Advance Command . 245     -> N_TA 125440 T_c ~ 63.8 us
                  UL Grant ............... 0x0A3C81
                    freq hopping ......... 0
                    PUSCH freq alloc ..... 6 PRB from PRB 18
                    PUSCH time alloc ..... k2=3, S=0, L=14
                    MCS .................. 2
                    TPC for MSG3 ......... 0 dB
                    CSI request .......... 0
                  Temporary C-RNTI ....... 0x4601
              -- RAPID matched: stop ra-ResponseWindow, apply TA, send MSG3

Listing 3. Preamble transmission and a matching RAR, including the backoff subheader that a loaded cell would set.

14.3 MSG3 and MSG4

[MAC/RRC] MSG3 / MSG4
12:04:31.892  [MAC-UL] MSG3 on PUSCH, TC-RNTI 0x4601, 8 octets
              CCCH SDU (48 bits carried onward for contention resolution)
              RRCSetupRequest
                ue-Identity
                  randomValue .......... 0x3F2A19C4B7   -- 39-bit random
                establishmentCause ..... mo-Signalling
                spare .................. 0

12:04:31.902  [MAC-DL] PDSCH to TC-RNTI 0x4601, 42 octets
              MAC subheader  LCID=62  (UE Contention Resolution Identity)
                UE Contention Resolution Identity  48 bits
                  = 0x1F3F2A19C4B7  -- first 48 bits of our MSG3 CCCH SDU
              MAC subheader  LCID=0   (CCCH)
                RRCSetup
                  rrc-TransactionIdentifier .. 0
                  radioBearerConfig
                    srb-ToAddModList  srb-Identity 1
                  masterCellGroup ............ (SEQUENCE, 214 bytes)

12:04:31.902  [MAC] Contention Resolution Identity matches own MSG3
              -> RA procedure successfully completed
              -> TC-RNTI 0x4601 promoted to C-RNTI
              -> stop ra-ContentionResolutionTimer

12:04:31.910  [RRC-UL] RRCSetupComplete on SRB1 (DCCH)
                selectedPLMN-Identity ...... 1
                dedicatedNAS-Message ....... (NAS Registration Request)

Listing 4. Contention resolution succeeding: the echoed 48-bit identity is the whole mechanism.

14.4 A failing procedure

[MAC/RRC] preambleTransMax exhaustion
12:07:14.201  [MAC-UL] RA initiated  trigger=initialAccess  SSB idx 5 RSRP -119 dBm
12:07:14.201  [MAC-UL] preamble 31  counter 1   P_PRACH 19.0 dBm
12:07:14.211  [MAC]    ra-ResponseWindow expired, no RAR
12:07:14.229  [MAC-UL] preamble 07  counter 2   P_PRACH 23.0 dBm  (P_CMAX)
12:07:14.239  [MAC]    ra-ResponseWindow expired, no RAR
12:07:14.244  [MAC]    SSB reselected: idx 5 -> idx 6, RSRP -117 dBm
12:07:14.244  [MAC]    spatial filter changed -> counter NOT incremented
12:07:14.262  [MAC-UL] preamble 44  counter 2   P_PRACH 23.0 dBm
                       ... attempts 4..9 elided, all at 23.0 dBm ...
12:07:14.612  [MAC-UL] preamble 12  counter 10  P_PRACH 23.0 dBm
12:07:14.622  [MAC]    ra-ResponseWindow expired, no RAR
12:07:14.622  [MAC]    PREAMBLE_TRANSMISSION_COUNTER = preambleTransMax (n10)
12:07:14.622  [MAC]    -> Random Access problem indication to RRC
12:07:14.622  [RRC]    T300 still running; RA problem during establishment
12:07:14.622  [RRC]    -> connection establishment failure
12:07:14.622  [RRC]    -> store connEstFailReport (measured RSRP, numberOfPreamblesSent 10)
12:07:14.623  [RRC]    -> to RRC_IDLE, perform cell reselection

Listing 5. Ten attempts, eight of them at maximum power, ending in a connection establishment failure rather than an RLF -- because the trigger was initial access.

🔍
What You See In Logs

Note the counter behaviour at 12:07:14.244. The SSB change means attempt 3 reuses counter value 2, so the power is unchanged. Nine of the ten attempts in this trace were transmitted at P_CMAX -- the ramping configuration had no effect on the outcome, and tuning powerRampingStep would not have helped. The connEstFailReport the UE stores here is retrievable by the next cell it connects to, which is the intended way to diagnose exactly this.

15. Release Deltas: Rel-15 to Rel-18

ReleaseChangeWhy it matters when reading RACH
Rel-154-step CBRA and CFRA; SSB-to-RO association; group A/B; long and short preamble formatsThe baseline. Everything in §3 and §5 is Rel-15.
Rel-162-step RACH (MSGA/MSGB, msgA-* configuration, MSGB-RNTI, fallbackRAR)Two response windows and two attempt counters now coexist; a trace can switch flavour mid-procedure.
Rel-16NR-U: consistent LBT failure as an RA trigger; RACH on unlicensed spectrumA RACH failure can now be a channel access failure with no radio problem at all.
Rel-17RedCap: separate initialUplinkBWP-RedCap, separate PRACH resources, featureCombination gatingTwo UE classes can use disjoint RACH resources in the same cell; preamble indices are no longer cell-unique across classes.
Rel-17Small Data Transmission (RA-SDT) -- user data in MSGA/MSG3 from RRC_INACTIVEA completed RACH no longer implies a transition to RRC_CONNECTED.
Rel-17NTN: ta-Common, extended ra-ResponseWindow, UE-computed pre-compensationThe 12-bit TA field alone no longer describes the total advance (§9).
Rel-17Slice-based and coverage-based RACH prioritisation (ra-PrioritizationFor*)Two UEs in the same cell can legitimately show different backoff and ramping behaviour.
Rel-18LTM (L1/L2-triggered mobility) -- cell switch with or without RACH at the targetA successful mobility event may contain no RACH at all; absence of RACH is no longer evidence of no handover.
Rel-18Network-controlled repeaters; further NTN and energy-saving refinementsRepeater-side timing adds delay that appears in TA without any UE movement.

Table 9. RACH-relevant changes by release. Feature presence should always be confirmed against the UE capability exchange -- see the companion UE Capability document.

16. Reading RACH in Logs: A Checklist

1. Find the trigger first. Everything downstream is interpreted differently depending on it (§1). If the log does not state it, infer it from what RRC was doing: T300 running means initial access, T304 means handover, T319 means resume.

2. Establish CBRA or CFRA. A dedicated ra-PreambleIndex in a preceding reconfigurationWithSync or PDCCH order means CFRA, and contention resolution should be absent. Its presence in a supposed handover means the CFRA resource was unavailable -- worth investigating on its own.

3. Check the preamble index against the group boundary. An index below numberOfRA-PreamblesGroupA is group A; at or above it is group B and implies a large MSG3 with adequate headroom.

4. Recompute the RA-RNTI from the logged occasion (§7). A mismatch against the RNTI the UE actually monitored is a configuration or frame-timing problem, and it is silent otherwise.

5. Read the TA command as a distance (§9) and sanity-check it against the cell you believe answered.

6. Count attempts, then check the power on each. Many attempts at constant power means either powerRampingStep = dB0, or P_CMAX clipping, or repeated spatial filter changes suppressing the counter (§10). These three look identical in a naive read and have entirely different fixes.

7. Distinguish the four no-progress cases: no RAR, RAPID mismatch, no MSG4, MSG4 identity mismatch (§12). They are four different problems and only the first two can be helped by more power.

8. For 2-step, count fallbacks separately from failures. A fallbackRAR is a successful preamble. A high fallback rate with a low failure rate means msgA-RSRP-Threshold is too low, not that coverage is bad.

17. Glossary

TermExpansionMeaning in this document
PRACHPhysical Random Access ChannelThe uplink physical channel that carries preambles; occupies specific PRBs and symbols set by prach-ConfigurationIndex and msg1-FDM.
ROPRACH OccasionOne time-frequency instance in which a preamble may be sent, identified by (s_id, t_id, f_id).
RAPIDRandom Access Preamble IdentifierThe 6-bit echo of the transmitted preamble index in a RAR subheader; how a UE finds its own RAR in a shared PDU.
RA-RNTIRandom Access RNTIComputed from the RO, not from any UE identity. Addresses MSG2.
MSGB-RNTI--The 2-step equivalent, offset by 17920 so the two never collide.
TC-RNTITemporary C-RNTIAssigned in the RAR; becomes the C-RNTI on winning contention resolution, discarded on losing.
CBRA / CFRAContention-Based / Contention-Free Random AccessDistinguished solely by who chose the preamble (§2).
MSGA / MSGB--The 2-step messages: preamble+payload, and the combined response.
N_CSZero-correlation zone sizeSet by zeroCorrelationZoneConfig. Governs cyclic shift spacing, and so preambles per root sequence.
Zadoff-Chu--Constant-amplitude zero-autocorrelation sequence family; cyclic shifts of one root stay mutually orthogonal, which is what lets many preambles share one occasion.
N_TATiming advance in T_c unitsThe uplink transmission advance the UE applies; derived from the RAR TA command (§9).
P_CMAXUE maximum configured output powerThe ceiling that makes late ramping steps ineffective (§10).

18. References

  • 3GPP TS 38.321 -- NR MAC protocol specification. Clause 5.1 (Random Access procedure), 5.1.1 (initialisation and triggers), 5.1.2 (resource selection), 5.1.3 / 5.1.3a (preamble / MSGA transmission), 5.1.4 / 5.1.4a (RAR / MSGB reception, RA-RNTI and MSGB-RNTI), 5.1.5 (contention resolution), 5.1.6 (completion), 6.1.5 / 6.1.5a (RAR and MSGB MAC PDU), 6.2.3 (MAC RAR), 6.1.3.3 (UE Contention Resolution Identity CE), Table 7.2-1 (backoff values).
  • 3GPP TS 38.213 -- Physical layer procedures for control. Clause 4.2 (timing advance), clause 7.4 (PRACH power control), clause 8 (random access procedure, SSB-to-RO association, RAR window).
  • 3GPP TS 38.211 -- Physical channels and modulation. Clause 6.3.3 (preamble generation), Tables 6.3.3.1-1 / 6.3.3.1-2 (formats), Tables 6.3.3.2-2 to 6.3.3.2-4 (PRACH configuration index).
  • 3GPP TS 38.331 -- RRC protocol specification. RACH-ConfigCommon, RACH-ConfigGeneric, RACH-ConfigDedicated, MsgA-ConfigCommon, BeamFailureRecoveryConfig, UE-TimersAndConstants.
  • 3GPP TS 38.300 -- NR overall description. Clause 9.2.6 (random access procedure overview and its place in the state model).
  • 3GPP TS 38.104 / 38.133 -- RF and RRM requirements, for the measurement accuracy that underpins rsrp-ThresholdSSB and msgA-RSRP-Threshold decisions.

Companion documents in this set

  • 01 Registration Process -- what MSG3's NAS payload goes on to do.
  • 02 Radio Frame Structure -- SFN, slots and the symbol numbering that s_id and t_id index.
  • 04 Timing Advance -- the TA maintenance loop after the initial command in §9.
  • 06 Channel Mapping -- how CCCH/UL-SCH/PUSCH relate for MSG3.
  • 07 MAC PDU and Control Elements -- the general subheader format that §8 specialises.
  • 10 BSR, PHR, SR -- the SR mechanism that RACH substitutes for.
  • 12 Beam Failure Recovery -- a CFRA user.
  • 16 RLM and RLF -- where preambleTransMax exhaustion goes in RRC_CONNECTED.
  • 17 System Information / 18 MIB and SIB1 IEs -- where rach-ConfigCommon is broadcast.
  • 22-25 Handover documents -- the largest CFRA user.