5G/6G Academy

5G/6G Academy

Telecom certifications · since 2009

5G Random Access Simulator

Walk through the 4-step contention-based Random Access procedure on 5G NR, message by message, with RA-RNTI computation, TA command, TC-RNTI and contention resolution identity — per 3GPP TS 38.321 §5.1 and TS 38.213 §8.

L=139, SCS=15 kHz — Short format, small cells (FR1/FR2)

MSG1
MSG2
MSG3
MSG4
UE→gNBgNB→UEUE→gNBgNB→UE
Step 1 / 4
UE
gNB
MSG1
MSG2
MSG3
MSG4
MSG1UE gNBPreamble (PRACH)
ChannelPRACH (physical random access channel)
Preamble index (ra-PreambleIndex)23 / 63
Preamble formatFormat A1
Sequence length (L_RA)139
PRACH SCS15 kHz
Max cell radius~0.94 km
RA-RNTI formula1 + s_id + 14·t_id + 14·80·f_id + 14·80·8·ul_carrier_id
RA-RNTI (with s_id=t_id=f_id=0)1 (0x1)

About 5G Random Access

Random Access (RACH) is how a UE establishes uplink synchronization with a gNB. It happens at initial access, after long DRX, on handover, after radio-link failure, or when the UE has uplink data but no PUCCH resources. 5G NR defines a 4-step contention-based procedure (MSG1–MSG4) and also an optional 2-step procedure (MSGA / MSGB) introduced in Rel-16.

MSG1 is a Zadoff–Chu sequence preamble on PRACH. The gNB detects the preamble and replies with MSG2 (the RAR) scheduled with a DCI 1_0 scrambled by RA-RNTI. The RAR carries the Timing Advance command, an UL grant, and a temporary C-RNTI (TC-RNTI). The UE then sends MSG3 on the granted PUSCH — typically carrying an RRC Setup Request with a 39-bit 5G-S-TMSI or a random identity. Finally MSG4 echoes back the 48-bit UE Contention Resolution Identity MAC CE and carries RRCSetup, promoting TC-RNTI to C-RNTI and moving the UE into RRC_CONNECTED.

Who uses this simulator?

Protocol engineers use it to trace failure points (preamble collision, RAR miss, MSG3 loss, contention resolution timeout). Trainers use it in 5G certification courses. Test engineers use the RA-RNTI formula and RAPID matching to correlate log captures with over-the-air preambles.

Related tools

7-Day Free Trial

Calculator gave you the answer? Learn the theory in 7 days, free.

$19.99/mo (global) · ₹999/mo (India). Full Pro access — 150+ hands-on exercises, 20+ troubleshooting Scenarios, 17 certifications, TelcoMentor AI coach. No credit card.

  • No credit card
  • Cancel anytime
  • Full Pro access
  • TELCOMA since 2009
Start My 7-Day Trial