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
#Types of RACH
1. Contention-Based RACH (CBRA)
- UE randomly selects a preamble from a pool
- Multiple UEs may select the same preamble → collision 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
#Detailed Step-by-Step Breakdown
Step 0 Pre-Step — Downlink Synchronization & System Info
Before the UE can transmit anything, it must:
- 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
- Read the MIB (Master Information Block) via PBCH — contains essential cell configuration
- 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
| Parameter | Detail |
|---|---|
| Channel | PRACH (Physical Random Access Channel) |
| Preamble Pool | 64 Zadoff-Chu sequence-based preambles per cell |
| Selection | UE randomly picks one preamble from the available pool |
| Preamble Format | Determines sequence length & cyclic prefix (affects cell coverage range) |
| Power | Calculated based on path loss estimate + target received power |
Key Points
- The preamble serves two purposes: signals the network that a UE wants to connect, and allows the gNB to estimate the UE's timing offset (propagation delay).
- Some preambles are reserved for contention-free access (handover, etc.).
- Preambles are grouped into Group A and Group B — Group B is used when the UE has a larger Msg3 to send (based on data volume threshold).
Step 2 Msg2 — Random Access Response (RAR)
| Parameter | Detail |
|---|---|
| Channel | PDSCH (scheduled via PDCCH addressed to RA-RNTI) |
| Response Window | UE monitors PDCCH for a configurable window (ra-ResponseWindow) |
| Contents | Timing Advance, UL Grant, Temporary C-RNTI |
RAR Contents Breakdown
| Field | Size | Purpose |
|---|---|---|
| Timing Advance Command | 12 bits | Adjusts UE uplink transmission timing to compensate for propagation delay |
| Uplink Grant | 20 bits | Allocates PUSCH resources (RB assignment, MCS, power control) for Msg3 |
| Temporary C-RNTI | 16 bits | Temporary identity for the remainder of the RACH procedure |
| Backoff Indicator (optional) | 4 bits | Tells UE to wait 0–960 ms before retrying (used under congestion) |
If No RAR Is Received
- UE performs power ramping (increases transmit power by
powerRampingStep, typically 2 dB) - UE retransmits Msg1 with the same or a different preamble
- Maximum retransmissions controlled by
preambleTransMax
Step 3 Msg3 — RRC Connection Request (First Scheduled Uplink)
| Parameter | Detail |
|---|---|
| Channel | PUSCH (using resources granted in Msg2) |
| Content | UE Identity + RRC Setup Request (or RRC Re-establishment Request) |
| UE Identity | S-TMSI (if already registered) or a random 40-bit value |
Key Points
- This is the first scheduled uplink transmission — the UE now has proper timing alignment and allocated resources.
- The UE identity is critical for contention resolution in Step 4.
- The message also includes the establishment cause (e.g., mobile-originated data, emergency, high-priority access).
Step 4 Msg4 — Contention Resolution
| Parameter | Detail |
|---|---|
| Channel | PDSCH (addressed to Temporary C-RNTI or C-RNTI) |
| Content | Echo of the UE identity from Msg3 |
| Purpose | Resolves collisions when multiple UEs selected the same preamble |
Resolution Logic
Two UEs select preambles — watch contention resolution decide the winner
#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
#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
| Aspect | 4-Step RACH | 2-Step RACH |
|---|---|---|
| Messages | Msg1 → Msg2 → Msg3 → Msg4 | MsgA → MsgB |
| MsgA | — | Preamble (PRACH) + Payload (PUSCH) combined |
| MsgB | — | Response + Contention Resolution combined |
| Latency | Higher (~13–16 ms) | Lower (~7–9 ms) |
| Use Case | General access | URLLC, low-latency scenarios |
| Fallback | — | Falls 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
- If the gNB successfully decodes both parts of MsgA → responds with MsgB (success)
- If the gNB decodes the preamble but not the payload → sends a fallback RAR (equivalent to Msg2), and the UE continues with Msg3/Msg4 (falls back to 4-step)
- If nothing is decoded → UE retries MsgA with power ramping
#Key Parameters Reference
| Parameter | Description | Typical Value |
|---|---|---|
prach-ConfigIndex | Defines PRACH time/frequency resources | Cell-specific |
numRA-Preambles | Number of available contention-based preambles | 52–64 |
preambleTransMax | Max preamble retransmissions | 3–10 |
powerRampingStep | Power increase per retransmission | 0, 2, 4, 6 dB |
ra-ResponseWindow | Window to monitor for RAR | 2–10 subframes |
mac-ContentionResolutionTimer | Timer for Msg4 reception | 8–64 subframes |
preambleReceivedTargetPower | Target received power at gNB | -120 to -90 dBm |
ra-PreambleIndex (CFRA) | Dedicated preamble for contention-free RACH | Assigned by network |
#RACH in LTE vs 5G NR
| Feature | LTE | 5G NR |
|---|---|---|
| Preamble Sequence | Zadoff-Chu (length 839 for FDD) | Zadoff-Chu (length 839 or 139 depending on SCS) |
| RACH Types | 4-step only | 4-step and 2-step |
| Subcarrier Spacing | Fixed 1.25 kHz / 5 kHz for PRACH | Flexible (15, 30, 60, 120 kHz) |
| Beam-based RACH | No | Yes — SSB-associated RACH occasions |
| Numerology | Fixed | Flexible numerology support |
| Supplementary Uplink | No | SUL (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
- Each SSB represents a different beam direction from the gNB
- The UE selects the RACH occasion associated with the best SSB (strongest signal)
- This allows the gNB to know which beam the UE is in, enabling beam-aligned random access
- The parameter
ssb-perRACH-Occasioncontrols how many SSBs map to each RACH occasion
#Common Failure Scenarios & Recovery
| Failure | Cause | Recovery |
|---|---|---|
| No RAR received | Preamble not detected, poor coverage | Power ramping + retransmission |
| RAR received but Msg3 fails | UL grant issue, HARQ failure | HARQ retransmission of Msg3 |
| Contention resolution failure | Collision (same preamble by multiple UEs) | Backoff + restart from Msg1 |
| Max retransmissions reached | Persistent failure | Radio Link Failure → cell reselection |
| Beam failure (5G NR) | Beam misalignment | Beam Failure Recovery via CFRA |
#Summary Flowchart
#Further Reading
- 3GPP TS 38.321 — NR MAC Protocol Specification (RACH procedure details)
- 3GPP TS 38.331 — NR RRC Protocol Specification (RRC Connection Request)
- 3GPP TS 36.321 — LTE MAC Protocol Specification
- 3GPP TS 38.211 — NR Physical Channels (PRACH waveform details)