WirelessBrewTools

Main Navigation

  • Home
  • Calculators & Tools
  • Technical Articles
  • Cheatsheets

Tool Categories

  • 5G NR
    • 5G NR & 4G LTE Frequency Bands
    • 5G NR & LTE Measurement Gap
    • 5G NR ARFCN Calculator
    • 5G NR GSCN to Frequency Calculator
    • 5G NR PRACH Configuration Calculator
    • 5G NR RRC Timers
    • 5G NR RSRP Measurements
    • 5G NR Throughput Calculator
    • 5QI/QoS Reference
    • Beam Failure Recovery Sandbox
    • BWP Calculator
    • Cell Selection Criterion
    • MAC CE Parser
    • MCS Table Reference
    • Measurement Events Simulator
    • Paging & Wake-Up Calculator
    • Resource Grid Explorer
    • RSRP Mapper
    • SCS & Numerology
    • SLIV/RIV/FDRA Calculator
    • SSB Configuration
    • TBS Calculator
    • Timing Advance Calculator
  • 4G LTE
    • 4G LTE EARFCN Calculator
    • LTE CQI Calculator
    • LTE PRACH Configuration Calculator
    • LTE RRC Timers
    • LTE Throughput Calculator
    • TDD Configuration
  • RF Tools
    • Antenna Downtilt Calculator
    • Antenna Gain Calculator
    • Cable Loss Calculator
    • Cell Range Calculator
    • EIRP Calculator
    • Fresnel Zone Calculator
    • Idle Mode Reselection
    • Link Budget Calculator
    • Path Loss Calculator
    • PCI Calculator
    • PIM Calculator
    • RSRP/RSRQ/SINR Calculator
  • Common RF
    • dB Calculator
    • dBm to Watt Converter
    • Free Space Path Loss Calculator
    • Thermal Noise Calculator
    • VSWR Calculator
  • Reference Tools
    • 3GPP Specs Reference
    • 3GPP Timeline
    • IMSI/IMEI Analyzer
    • Technology Comparison
    • UE Category Reference
  • Beta Releases
    • 3GPP NTN Satellite Planner
    • CORESET/PDCCH Calculator
Contact UsSettings
WirelessBrew
HomeCalculatorsCheatsheetsTechnical Articles
Tool Categories
5G NR
5G NR & 4G LTE Frequency Bands5G NR & LTE Measurement Gap5G NR ARFCN Calculator5G NR GSCN to Frequency Calculator5G NR PRACH Configuration Calculator5G NR RRC Timers5G NR RSRP Measurements5G NR Throughput Calculator5QI/QoS ReferenceBeam Failure Recovery SandboxBWP CalculatorCell Selection CriterionMAC CE ParserMCS Table ReferenceMeasurement Events SimulatorPaging & Wake-Up CalculatorResource Grid ExplorerRSRP MapperSCS & NumerologySLIV/RIV/FDRA CalculatorSSB ConfigurationTBS CalculatorTiming Advance Calculator
4G LTE
4G LTE EARFCN CalculatorLTE CQI CalculatorLTE PRACH Configuration CalculatorLTE RRC TimersLTE Throughput CalculatorTDD Configuration
RF Tools
Antenna Downtilt CalculatorAntenna Gain CalculatorCable Loss CalculatorCell Range CalculatorEIRP CalculatorFresnel Zone CalculatorIdle Mode ReselectionLink Budget CalculatorPath Loss CalculatorPCI CalculatorPIM CalculatorRSRP/RSRQ/SINR Calculator
Common RF
dB CalculatordBm to Watt ConverterFree Space Path Loss CalculatorThermal Noise CalculatorVSWR Calculator
Reference Tools
3GPP Specs Reference3GPP TimelineIMSI/IMEI AnalyzerTechnology ComparisonUE Category Reference
Beta Releases
3GPP NTN Satellite PlannerCORESET/PDCCH Calculator
Preferences
Back to 5g nr
#5G#NR#RACH#PDCCH#PRACH#RNTI

Msg2-Random Access Response (RAR) Process in 5G NR RACH

WirelessBrew Team
February 15, 2026
7 min read
  • Msg2-Random Access Response (RAR) Process in 5G NR RACH
  • Overview of the Random Access Procedure
  • What is Msg2-Random Access Response (RAR)?
  • Key Characteristics of RAR
  • The RAR Window in 5G NR
  • RAR Window Size
  • RAR Window Timing
  • RNTI Masking for RAR Detection
  • RA-RNTI Calculation
  • RNTI Masking Process
  • Why RNTI Masking is Important
  • RAR Content and UE Actions
  • Key Fields in RAR
  • UE Actions Upon Receiving RAR
  • RAR Transmission Timing
  • Timing Advance Command Calculation
  • Further Reading
  • Interactive Tools

Msg2-Random Access Response (RAR) Process in 5G NR RACH

The Random Access (RA) procedure in 5G New Radio (NR) is a fundamental process that enables a UE to establish initial access to the network or regain synchronization when the radio link quality deteriorates. The second message in this procedure, the Random Access Response (RAR), is critical for assigning initial resources to the UE and synchronizing its uplink transmissions.

5G NR RACH Process "Overview of the Random Access Channel (RACH) procedure in 5G NR."

This post provides a detailed explanation of the Msg2-RAR process in 5G NR.


Overview of the Random Access Procedure

The Random Access procedure is initiated by the UE when it needs to access the network. This can occur during:

  • Initial Access: When a UE powers on or is out of coverage and needs to connect to the network.
  • RRC Re-establishment: When the UE loses connection with the network and attempts to restore it.
  • Handover: When the UE is handed over to a new cell.
  • Uplink Data Transmission: When the UE has data to send but no uplink resources are allocated.

The RA procedure consists of four messages:

  1. Msg1: Preamble Transmission (PRACH)
  2. Msg2: Random Access Response (RAR)
  3. Msg3: RRC Setup/Connection Establishment
  4. Msg4: RRC Setup Complete/Connection Establishment Complete

This post focuses on Msg2, the Random Access Response.


What is Msg2-Random Access Response (RAR)?

Msg2, or the Random Access Response (RAR), is transmitted by the gNB (base station) in response to a successful preamble detection from the UE. It is a downlink message that contains critical information for the UE, including:

  • Uplink Resource Allocation: Temporary C-RNTI (Cell Radio Network Temporary Identifier) and UL-GUTI (Uplink Generic User Equipment Identifier) for identification.
  • Timing Advance: Adjustment needed for the UE's uplink transmission timing.
  • Power Control: Initial power level for the UE's uplink transmissions.
  • Backoff Indicator: Delay before retransmitting if the preamble was not detected.

Key Characteristics of RAR

  • Transmission Medium: RAR is transmitted on the Physical Downlink Shared Channel (PDSCH).
  • Detection: The UE detects RAR by monitoring the Physical Downlink Control Channel (PDCCH) for scheduling information.
  • RNTI Masking: RAR messages are masked with a specific RNTI to ensure only the intended UE processes them.

The RAR Window in 5G NR

The RAR window defines the time interval during which the gNB expects to receive a preamble from the UE and the time interval during which the UE expects to receive the RAR in response.

RAR Window Size

The RAR window size is configurable by the network and is signaled to the UE via the randomAccessWindowLength parameter in the RACH-ConfigCommon or RACH-ConfigDedicated IE.

randomAccessWindowLengthRAR Window Size (Slots)RAR Window Duration (ms)
oneT10.5
twoT21.0
fourT42.0
eightT84.0

Note: The duration depends on the slot duration, which varies with the numerology (e.g., 1 ms for 15 kHz SCS, 0.5 ms for 30 kHz SCS).

RAR Window Timing

The RAR window starts at the end of the PRACH occasion (Msg1 transmission) and lasts for the duration specified by randomAccessWindowLength.

  • Start Time: The RAR window begins at the end of the PRACH occasion where the preamble was transmitted.
  • End Time: The window ends after the specified number of slots.
  • UE Expectation: The UE expects to receive the RAR within this window. If no RAR is received, the UE will retransmit the preamble (up to the maximum number of attempts).

RNTI Masking for RAR Detection

The gNB masks the RAR messages with a specific Random Access Radio Network Temporary Identifier (RA-RNTI) to ensure that only the UE that transmitted the preamble processes the response.

RA-RNTI Calculation

The RA-RNTI is calculated based on the PRACH occasion (frequency and time resources) used by the UE for Msg1 transmission.

RA-RNTI = 1 + scrambled_ID mod 65537

Where:

  • scrambled_ID is derived from the PRACH preamble index (0 to 63) and the frequency domain resource used for transmission.
  • The scrambling is performed using a cell-specific scrambling sequence.

RNTI Masking Process

  1. UE Transmits Preamble: The UE selects a PRACH preamble and transmits it on a specific frequency domain resource within a PRACH occasion.
  2. gNB Detects Preamble: The gNB detects the preamble and identifies the PRACH preamble index and frequency domain resource used.
  3. gNB Calculates RA-RNTI: The gNB calculates the RA-RNTI corresponding to that specific PRACH occasion.
  4. gNB Masks RAR: The gNB masks the RAR message with the calculated RA-RNTI.
  5. UE Monitors PDCCH: The UE monitors the PDCCH for scheduling information using the calculated RA-RNTI.
  6. UE Detects RAR: If the UE detects a PDCCH message with its RA-RNTI, it knows that a RAR is available for decoding.

Why RNTI Masking is Important

  • Collision Avoidance: Multiple UEs may transmit preambles simultaneously. RNTI masking ensures that each UE only processes its own response.
  • Efficient Detection: The UE only needs to monitor PDCCH for its specific RA-RNTI, reducing processing overhead.
  • Security: Masking provides a basic level of security by ensuring that only the intended recipient can decode the RAR.

RAR Content and UE Actions

The RAR message contains several fields that provide the UE with the necessary information to complete the random access procedure.

Key Fields in RAR

FieldDescriptionUE Action
Random Access Preamble IdentifierIdentifies which preamble was detectedUsed to confirm successful detection
Timing Advance CommandAdjustment needed for UL timingUE adjusts its transmission timing
UL GrantTemporary UL resource allocationUE schedules its Msg3 transmission
Temporary C-RNTITemporary identifier for the UEUsed for initial communication
Backoff IndicatorDelay before retransmissionUE waits for the specified duration

UE Actions Upon Receiving RAR

  1. Verify Preamble: The UE checks if the Random Access Preamble Identifier in the RAR matches the preamble it transmitted.
  2. Apply Timing Advance: If a timing advance command is present, the UE adjusts its uplink transmission timing to synchronize with the gNB.
  3. Schedule Msg3: The UE uses the UL grant to schedule its Msg3 transmission (RRC Setup/Connection Establishment).
  4. Store Temporary C-RNTI: The UE stores the temporary C-RNTI for use in subsequent messages.
  5. Check Backoff Indicator: If a backoff indicator is present, the UE waits for the specified duration before retransmitting (if no RAR was received).

Engineering Tool

5G NR PRACH Configuration Calculator

Interactive tool to calculate the PRACH configuration parameters based on the given inputs.

RAR Transmission Timing

The timing of RAR transmission is critical for the success of the random access procedure. The gNB must transmit the RAR within the RAR window, starting from the end of the PRACH occasion.

Timing Advance Command Calculation

The timing advance command in the RAR is calculated based on the propagation delay between the UE and the gNB. The gNB measures the arrival time of the preamble and determines the necessary adjustment to ensure that the UE's subsequent uplink transmissions (Msg3) arrive at the gNB within the cyclic prefix of the target symbol.

N_TA = T_A × 16 × 64 / 2^μ

![MSG2 RACH Failure in 5G NR](/images/posts/5g-nr/MSG2 RACH Failure in 5G NR.png) "Common failure scenarios during the Msg2-RAR reception phase."

Further Reading

  • 5G NR RACH Trigger Reasons with Details
  • Common Causes of MSG2 RACH Failure
  • RACH Failure reasons in 5G-NR
  • Scheduling Request in 5G-NR

Interactive Tools

  • 5G NR PRACH Configuration Calculator
  • Timing Advance Calculator
  • Beam Failure Recovery Sandbox

W
Written by

WirelessBrew Team

Technical expert at WirelessBrew, specializing in 5G NR, LTE, and wireless system optimization. Committed to providing accurate, 3GPP-compliant engineering tools.

Up Next

More 5g nr Articles →

Related Technical Articles & Tools

post5g nr

PDCCH order in 5G NR

post5g nr

Contention Resolution Identity (MSG4) in 5G NR RACH

post5g nr

RNTI Values and Usage in 5G NR

post5g nr

2-Step RACH MsgB Reception (Part 2)

post5g nr

2-Step RACH in Release 16 of 5G NR