Random Access Procedure can be initiated by PDCCH order, MAC layer or RRC layer.
MAC will provide the subframe & resources which need to be send for RACH procedure.
PRACH Configuration Index- available set of PRACH resources for the transmission of the Random Access Preamble
ra-PRACH-MaskIndex: Defines in which PRACHs within a system frame the MAC entity can transmit a Random Access Preamble.
Rach will work on Contention-based Random Access Procedure: there is no reserved ra-PreambleIndex and ra-PRACHMaskIndex for the UE. It randomly selects a RA preamble and PRACH resource from a pool defined by the eNB. Contention resolution is needed as multiple UEs in the cell could select the same ra-PreambleIndex and ra-PRACHMaskIndex
Non Contention based Random Access Procedure: UE has already assigned ra-PreambleIndex and ra-PRACHMaskIndex from the network.