Tuesday, March 1, 2011

GPRS AttachRequest

This procedure is initiated when MS is powered on.
On powering on, MS receives location information (RAI, LAC, RAC) from the radio channel.
MS contructs NAS AttachRequest and send it to SGSN.Main parameters of AttReq are IMSI/P-TMSI, DRX, Ciphering key sequence, RAI, Network capabilities.


If SGSN does not have authentication vector for the given UE then it initiates SendAuthenticationInfo towards HLR, which responds with authentication parameters ( triplets, quintlets) in SendAuthenticationResponse. SGSN then sends the AuthenticationAndCiphering request to UE. UE computes the authentication vector and send back in AuthenticationAndCiphering response. SGSN then validates these vectors.
Once validation is through, SGSN sends Update location to HLR over Gr (MAP) interface. HLR sends cancel location(imsi) to previous SGSN/MSC/VLR. old vlr responds with cancel location Ack.


HLR then sends insertSubscriberData(ISD) to SGSN. SGSN does basic validation (for MS’s presence, allowed sevices, roaming allowed etc etc) using data received in ISD. If validated, SGSN creates MM context for MS and responds with ISDAck to the HLR.
SGSN then sends AttachAccept( with p-tmsi, signature, and other parameters) to the MS. If SGSN’s assigned P-TMSI is different than MS’s orinigal p-tmsi, then MS replaces it with new p-tmsi allocated by SGSN and sends AttachComplete message to SGSN.


RANAP and SCCP’s involvement
The above mentioned NAS procedure happens over IU Signalling protocol called RANAP. AttachReq from UE is carried forward by RNC over RANAP’s InitialUE message.
Initial UE inturn initiates creation of dedicated transport using SCCP’s CR towards SGSN for this particular UE. Once dedicated signalling connection is established for the UE, all subsequent NAS messages are carried on RANAP’s Direct transfer messages. So in above call flow AttachReq goes on RANAP’s Initial UE piggy backed on SCCP’s CR. All other NAS transactions happens over RANAP’s Direct transfer over SCCP’s DT1 messages.


Cell States
  • Before Attach Req MS is in detached state. At this point SGSN doesn’t have information about MS in other words MS is not reachable.
  • After Attach complete MS moves into PMM-Connected state and SGSN has correct location information of the MS till RNC level.MM context is created at both MS and SGSN. MS periodically checks the RAI in its MM context with the RAI receveid in radio signal and if there is any change MS initiates NAS-RoutingAreaUpdate procedure towards SGSN.
  • Once MS is inactive for certain amount of time, radio resources are relesed by RNC and IU connection by SGSN(thus SCCP connection is released ). At this moment MS moves in PMM-Idle state. SGSN knows the presence of MS is in its boundaries and can trace it till last RAI received ( stored in MM context that it created during attach/RAU procedure).Paging is needed in order to wake up the MS.
Following diagram shows AttachReq with some sample StateMachine and few important parameters

No comments:

Post a Comment