UE RACH Procedure

The Random Access Channel (RACH) Procedure is the foundational "handshake" that a User Equipment (UE) performs to establish an initial connection with a cellular network (LTE or 5G NR).

#Overview

When a UE powers on, enters a new cell, or needs to re-establish a connection, it must "knock on the door" of the base station (eNB in LTE, gNB in 5G NR). This knock is the RACH procedure — a structured sequence of messages exchanged between the UE and the network to achieve uplink synchronization, request resources, and resolve potential collisions.

Why RACH Matters

Initial AccessUE powers on and camps on a cell
RRC Re-establishmentRadio link failure occurs
HandoverUE moves to a new cell
Uplink Data ArrivalUE has data to send but no UL sync
Downlink Data ArrivalNetwork has data but UE is not synchronized
Beam Failure Recovery5G NR beamforming link is lost

#Types of RACH

1. Contention-Based RACH (CBRA)

  • UE randomly selects a preamble from a pool
  • Multiple UEs may select the same preamblecollision possible
  • Requires a 4-step message exchange with contention resolution
  • Most commonly used for initial access and RRC connection requests

2. Contention-Free RACH (CFRA)

  • Network assigns a dedicated preamble to a specific UE
  • No collision is possible since the preamble is unique
  • Only requires 2 steps (Msg1 + Msg2) — no contention resolution
  • Used during handover, DL data arrival, and beam failure recovery

#Contention-Based RACH — The 4-Step Procedure

Animated 4-step RACH — messages fly between UE and gNB with step-by-step highlighting

UE (Device) gNB / eNB STEP 0 — Pre-Step DL Sync + Read SIB PSS / SSS • MIB (PBCH) • SIB1/SIB2 STEP 1 — Msg1 Random Access Preamble (PRACH) PRACH Preamble → STEP 2 — Msg2 Random Access Response (RAR) ← TA + UL Grant + Temp C-RNTI STEP 3 — Msg3 RRC Connection Request (PUSCH) UE Identity + RRC Setup Request → STEP 4 — Msg4 Contention Resolution (PDSCH) ← Echo of UE Identity ✅ Match → Success ❌ Mismatch → Retry

#Detailed Step-by-Step Breakdown

Step 0 Pre-Step — Downlink Synchronization & System Info

Before the UE can transmit anything, it must:

  1. Synchronize with the cell using:
    • PSS (Primary Synchronization Signal) — identifies the physical layer identity within the cell group
    • SSS (Secondary Synchronization Signal) — identifies the cell group identity
  2. Read the MIB (Master Information Block) via PBCH — contains essential cell configuration
  3. Read SIB1 / SIB2 (System Information Blocks) — contains:
    • Available RACH preambles (64 per cell)
    • PRACH time/frequency resources
    • Power control parameters
    • RACH response window size
    • Maximum number of preamble retransmissions

Step 1 Msg1 — Random Access Preamble Transmission

ParameterDetail
ChannelPRACH (Physical Random Access Channel)
Preamble Pool64 Zadoff-Chu sequence-based preambles per cell
SelectionUE randomly picks one preamble from the available pool
Preamble FormatDetermines sequence length & cyclic prefix (affects cell coverage range)
PowerCalculated based on path loss estimate + target received power

Key Points


Step 2 Msg2 — Random Access Response (RAR)

ParameterDetail
ChannelPDSCH (scheduled via PDCCH addressed to RA-RNTI)
Response WindowUE monitors PDCCH for a configurable window (ra-ResponseWindow)
ContentsTiming Advance, UL Grant, Temporary C-RNTI

RAR Contents Breakdown

FieldSizePurpose
Timing Advance Command12 bitsAdjusts UE uplink transmission timing to compensate for propagation delay
Uplink Grant20 bitsAllocates PUSCH resources (RB assignment, MCS, power control) for Msg3
Temporary C-RNTI16 bitsTemporary identity for the remainder of the RACH procedure
Backoff Indicator (optional)4 bitsTells UE to wait 0–960 ms before retrying (used under congestion)

If No RAR Is Received


Step 3 Msg3 — RRC Connection Request (First Scheduled Uplink)

ParameterDetail
ChannelPUSCH (using resources granted in Msg2)
ContentUE Identity + RRC Setup Request (or RRC Re-establishment Request)
UE IdentityS-TMSI (if already registered) or a random 40-bit value

Key Points


Step 4 Msg4 — Contention Resolution

ParameterDetail
ChannelPDSCH (addressed to Temporary C-RNTI or C-RNTI)
ContentEcho of the UE identity from Msg3
PurposeResolves collisions when multiple UEs selected the same preamble

Resolution Logic

Two UEs select preambles — watch contention resolution decide the winner

UE receives Msg4 Does Msg4 contain MY identity? ✅ YES — Resolved Temp C-RNTI → permanent C-RNTI RRC Connection established UE enters RRC_CONNECTED ❌ NO — Collision Flush HARQ buffer Apply backoff timer (if provided) Restart RACH from Step 1 Timer Expiry → Retry

#Power Ramping & Retransmission

When the RACH attempt fails (no RAR, contention resolution failure, or maximum retransmissions reached), the UE follows a recovery procedure:

Power ramping — transmit power increases with each retransmission until success or max reached

RACH Attempt Fails Preamble counter < preambleTransMax? ✅ YES — Retry +2 dB power ramping Select preamble (new or same) Wait backoff window expiry Retransmit Msg1 ❌ NO — Failure Report RACH Failure to upper layers Radio Link Failure (RLF) triggered UE may attempt cell reselection

#5G NR Enhancement — 2-Step RACH

4-step vs 2-step RACH race — watch which completes first with real-time latency counters

5G NR introduced a 2-step RACH procedure to reduce latency for time-critical applications.

4-Step vs 2-Step Comparison

Aspect4-Step RACH2-Step RACH
MessagesMsg1 → Msg2 → Msg3 → Msg4MsgA → MsgB
MsgAPreamble (PRACH) + Payload (PUSCH) combined
MsgBResponse + Contention Resolution combined
LatencyHigher (~13–16 ms)Lower (~7–9 ms)
Use CaseGeneral accessURLLC, low-latency scenarios
FallbackFalls back to 4-step if MsgA not decoded

4-Step RACH

UE ───Msg1──► gNB
UE ◄──Msg2─── gNB
UE ───Msg3──► gNB
UE ◄──Msg4─── gNB

2-Step RACH

UE ───MsgA (Preamble + Payload)──► gNB
UE ◄──MsgB (Response + Resolution)─ gNB

2-Step RACH Behavior


#Key Parameters Reference

ParameterDescriptionTypical Value
prach-ConfigIndexDefines PRACH time/frequency resourcesCell-specific
numRA-PreamblesNumber of available contention-based preambles52–64
preambleTransMaxMax preamble retransmissions3–10
powerRampingStepPower increase per retransmission0, 2, 4, 6 dB
ra-ResponseWindowWindow to monitor for RAR2–10 subframes
mac-ContentionResolutionTimerTimer for Msg4 reception8–64 subframes
preambleReceivedTargetPowerTarget received power at gNB-120 to -90 dBm
ra-PreambleIndex (CFRA)Dedicated preamble for contention-free RACHAssigned by network

#RACH in LTE vs 5G NR

FeatureLTE5G NR
Preamble SequenceZadoff-Chu (length 839 for FDD)Zadoff-Chu (length 839 or 139 depending on SCS)
RACH Types4-step only4-step and 2-step
Subcarrier SpacingFixed 1.25 kHz / 5 kHz for PRACHFlexible (15, 30, 60, 120 kHz)
Beam-based RACHNoYes — SSB-associated RACH occasions
NumerologyFixedFlexible numerology support
Supplementary UplinkNoSUL (Supplementary Uplink) supported

#RACH Occasions & SSB Association (5G NR)

In 5G NR, the network uses beamforming, and RACH resources are associated with specific SSBs (Synchronization Signal Blocks):

SSB beams map to RACH occasions — UE selects the best beam and its associated time-frequency slot


#Common Failure Scenarios & Recovery

FailureCauseRecovery
No RAR receivedPreamble not detected, poor coveragePower ramping + retransmission
RAR received but Msg3 failsUL grant issue, HARQ failureHARQ retransmission of Msg3
Contention resolution failureCollision (same preamble by multiple UEs)Backoff + restart from Msg1
Max retransmissions reachedPersistent failureRadio Link Failure → cell reselection
Beam failure (5G NR)Beam misalignmentBeam Failure Recovery via CFRA

#Summary Flowchart

UE RACH PROCEDURE DL Synchronization (PSS/SSS + MIB/SIB) Select Preamble (Contention-Based) Contention-Free (Dedicated) Msg1: Send Preamble on PRACH Msg2: RAR (TA + UL Grant + Temp C-RNTI) Msg3: RRC Connection Request (UE ID) Msg4: Contention Resolution ✅ Connected! ❌ Backoff + Retry ✅ Success! No collision possible Identity match?

#Further Reading

6G AI-Native MAC

☆ NTN MAC (Extended RACH) →