top of page
Search

Contention Resolution in Msg4 during RACH procedure

  • Writer: Venkateshu
    Venkateshu
  • Jun 3
  • 4 min read

In LTE and 5G NR Random Access Channel (RACH) procedure, the gNB extracts specific UE identities from Msg3 to construct Msg4 (Contention Resolution). The purpose is to allow the successful UE to confirm its identity and proceed, while other UEs involved in a contention understand they need to re-attempt RACH.


The types of UE identities the gNB can extract from Msg3 are:


  1. S-TMSI (Serving-Temporary Mobile Subscriber Identity):

    • What it is: This is the most common and preferred identity used by a UE that has previously attached to the network and is known to the Mobility Management Entity (MME in LTE) or Access and Mobility Management Function (AMF in 5G NR). The S-TMSI is a globally unique temporary identifier assigned to a UE. It's composed of a M-TMSI (MME/AMF-TMSI) and a MMEI/AMF pointer (MME/AMF Identifier).

    • When used: It's typically included in the RRCConnectionRequest (LTE) or RRCSetupRequest (5G NR) message when the UE has an S-TMSI assigned from a previous connection or attachment.

    • Why it's preferred: Using S-TMSI provides a known, unique identifier for the UE, allowing the network to quickly identify it and retrieve its context.


  2. Random ID (or RAN-based Temporary Identity):

    • What it is: If the UE does not have a valid S-TMSI (e.g., it's attaching to the network for the very first time, or its previous S-TMSI has become invalid due to a prolonged disconnection or restart), it will generate a random 40-bit temporary identity for use during the initial RACH procedure.

    • When used: This is primarily used by UEs performing their first attachment to a new PLMN (Public Land Mobile Network) or when a previously assigned S-TMSI is no longer valid.

    • Why it's used: It provides some level of temporary differentiation between UEs in the RACH process, even though it's not globally unique and collisions are possible among random IDs themselves (though less likely than preamble collisions). The network will eventually assign an S-TMSI during the RRC connection setup or NAS (Non-Access Stratum) registration procedure.


Details of Extraction and Construction of Msg4:


When the gNB successfully decodes a Msg3, it parses the RRC Connection Request/Setup Request message contained within. It looks for the UE's identity field.

  • If the identity is an S-TMSI, the gNB will store this S-TMSI. When constructing Msg4, it will place this exact S-TMSI into the Contention Resolution Identity MAC Control Element (CE).

  • If the identity is a Random ID, the gNB will store this Random ID. When constructing Msg4, it will place this Random ID into the Contention Resolution Identity MAC CE.


Upon receiving Msg4, the UE that sent Msg3 will read the Contention Resolution Identity MAC CE. If the identity within Msg4 matches the identity it sent in its own Msg3, it knows it has won the contention. Otherwise, it re-attempts RACH.

 

UE Log Examples (Simplified)

UE logs provide detailed insights into the RACH procedure. Here are highly simplified conceptual examples illustrating the identity types.


Scenario 1: UE using S-TMSI (Common for subsequent accesses)


UE Side Log Snippet:

[TIME] [UE_MAC] Initiating Contention-Based RACH (Msg1).
[TIME] [UE_MAC] Selected Preamble ID: 50.
[TIME] [UE_RRC] RRCConnectionRequest:
    EstablishmentCause: mo-Signalling
    ue-Identity: S-TMSI: 0x123456789ABCDEF (This is the S-TMSI sent in Msg3)
[TIME] [UE_MAC] Received Random Access Response (Msg2) for Preamble ID: 50.
[TIME] [UE_MAC] Granted UL resources for Msg3. TC-RNTI: 0x1A2B.
[TIME] [UE_MAC] Transmitting Msg3 (RRCConnectionRequest) on PUSCH.
[TIME] [UE_MAC] Monitoring PDCCH for Msg4 addressed with TC-RNTI: 0x1A2B.
[TIME] [UE_MAC] Received Msg4 (Contention Resolution) on PDCCH with TC-RNTI: 0x1A2B.
[TIME] [UE_MAC] Decoded Contention Resolution Identity: S-TMSI: 0x123456789ABCDEF.
[TIME] [UE_MAC] Contention Resolution Successful! Identity matched.
[TIME] [UE_RRC] RRC connection setup proceeds.

gNB Side Log Snippet (Conceptual, showing internal logic):

[TIME] [gNB_PHY] Detected Preamble ID: 50.
[TIME] [gNB_MAC] Sent Msg2 (RAR) with UL Grant and TC-RNTI: 0x1A2B for Preamble ID: 50.
[TIME] [gNB_PHY] Received potential Msg3 on granted resources.
[TIME] [gNB_MAC] Successfully decoded Msg3.
[TIME] [gNB_RRC] Extracted UE Identity from RRCConnectionRequest: S-TMSI: 0x123456789ABCDEF.
[TIME] [gNB_MAC] Prepared Msg4 with Contention Resolution Identity: S-TMSI: 0x123456789ABCDEF.
[TIME] [gNB_MAC] Sent Msg4 on PDCCH addressed with TC-RNTI: 0x1A2B.
[TIME] [gNB_RRC] RRC Connection Setup procedure initiated for UE with S-TMSI: 0x123456789ABCDEF.

 

Scenario 2: UE using Random ID (e.g., First Attachment)


UE Side Log Snippet:

[TIME] [UE_MAC] Initiating Contention-Based RACH (Msg1).
[TIME] [UE_MAC] Selected Preamble ID: 35.
[TIME] [UE_RRC] RRCConnectionRequest:
    EstablishmentCause: mo-Signalling
    ue-Identity: randomValue: 0xABCDEF1234 (This is the Random ID sent in Msg3)
[TIME] [UE_MAC] Received Random Access Response (Msg2) for Preamble ID: 35.
[TIME] [UE_MAC] Granted UL resources for Msg3. TC-RNTI: 0x3C4D.
[TIME] [UE_MAC] Transmitting Msg3 (RRCConnectionRequest) on PUSCH.
[TIME] [UE_MAC] Monitoring PDCCH for Msg4 addressed with TC-RNTI: 0x3C4D.
[TIME] [UE_MAC] Received Msg4 (Contention Resolution) on PDCCH with TC-RNTI: 0x3C4D.
[TIME] [UE_MAC] Decoded Contention Resolution Identity: randomValue: 0xABCDEF1234.
[TIME] [UE_MAC] Contention Resolution Successful! Identity matched.
[TIME] [UE_RRC] RRC connection setup proceeds.

gNB Side Log Snippet (Conceptual):

[TIME] [gNB_PHY] Detected Preamble ID: 35.
[TIME] [gNB_MAC] Sent Msg2 (RAR) with UL Grant and TC-RNTI: 0x3C4D for Preamble ID: 35.
[TIME] [gNB_PHY] Received potential Msg3 on granted resources.
[TIME] [gNB_MAC] Successfully decoded Msg3.
[TIME] [gNB_RRC] Extracted UE Identity from RRCConnectionRequest: randomValue: 0xABCDEF1234.
[TIME] [gNB_MAC] Prepared Msg4 with Contention Resolution Identity: randomValue: 0xABCDEF1234.
[TIME] [gNB_MAC] Sent Msg4 on PDCCH addressed with TC-RNTI: 0x3C4D.
[TIME] [gNB_RRC] RRC Connection Setup procedure initiated for UE with random ID: 0xABCDEF1234.

These log examples are simplified for clarity. Real UE and gNB logs are much more verbose and contain many more parameters and message types, but they would show the exchange of these key identifiers during the RACH procedure's contention resolution phase.

Comments


 

bottom of page