Your reference for GPRS Attach Procedure

GPRS Attach procedure is the procedure in which the MS registers to the network. In other words, the network knows about the existence of the MS.

After completing the process of GPRS attach, this means the following,

  • An 'MM context' will exist on the MS, and the SGSN. This 'MM context' stores the information of the MS.
  • The network identified the user (knew its IMSI), and authenticated it.
  • The SGSN knew the subscription information, and the serving location of the MS.
  • The network provided 'P-TMSI' and 'P-TMSI signature' to the MS.

Information

'MM context' is the Mobility Management context. It is where the node stores Mobility Management information for a certain MS. 

Advice

Before proceeding in reading this procedure, you have to be aware with MS identifiers (IMSI, MSISDN, IMEI, P-TMSI), and network identifiers (PLMN, LAI, RAI).

P-TMSI and P-TMSI signature

For security reasons, the MS shouldn't send its IMSI over the air interface between the MS and the network. Therefore, as a result for the attach procedure, the network provides a temporary identifier for the MS, which is the 'P-TMSI'. And the MS uses this 'P-TMSI' in future communications with the network instead of its IMSI.

During the attach procedure, the network provides the 'P-TMSI signature' along with the P-TMSI to the MS. In future transactions, the network will use this 'P-TMSI signature'  in order to authenticate the MS.

The following points will help understanding the attach procedure

  • If the SGSN is having the MM context of the MS exist from the last attach, then the SGSN will be able to authenticate the MS using the 'P-TMSI' and the 'P-TMSI signature' exist in the MM context.
  • If no MM context exist in the network for this MS, then the SGSN will initiate the authentication procedure for this MS with the HLR.
  • The 'new SGSN' is the SGSN currently serving the MS.
  • The 'old SGSN' is the SGSN that was serving the MS in the last attach.
  • The new SGSN can derive the old SGSN address from the 'P-TMSI' and 'old RAI' provided from the MS in the attach request.

GPRS Attach signaling

First, the SGSN identifies and authenticates the MS

GPRS attach procedure
GPRS attach procedure - part 1

1. Attach Request (MS --> SGSN)

Attach request’ is including the 'P-TMSI' and 'old RAI', the new SGSN will identify the old SGSN from the 'P-TMSI' and the' old-RAI'.

2. The new SGSN tries to identify and authenticate the MS using the old SGSN

  • The new SGSN will ask the old SGSN about the identification information of this MS.
  • If the old SGSN is having this info, it will authenticate the MS using 'P-TMSI' and 'P-TMSI signature' exist in the MM context.
  • Then, the old SGSN will send the IMSI and the authentication info of the MS to the new SGSN.
  • If the old SGSN didn’t find information for this MS, or wasn’t able to authenticate the MS using the P-TMSI signature, it will reply with error to the new SGSN.

3. The new SGSN ask the MS to provide its identity

  • If the old SGSN doesn’t have the MM context of the MS. Or, if the old SGSN is having the MM context, but failed to authenticate the MS using the P-TMST and P-TMSI signature exist in the MM context. In this case, the old SGSN will reply with error to the new SGSN.
  • Then, the new SGSN will ask the MS to send its identity, including its IMSI. Now, the SGSN knows the IMSI of the MS.

4. The SGSN authenticate the MS with the HLR

  • If the old SGSN wasn’t able to authenticate the MS using the MM context. Then, the new SGSN will authenticate the MS by sending the IMSI of the MS to the HLR, asking the HLR to provide authentication info for this user.
  • Then the SGSN will send the authentication info in a 'authentication and ciphering request' to the MS. Then, the MS will reply with 'authentication and ciphering response'. Now, the MS is authenticated.

Second, the SGSN gets the subscription information and updates the location

GPRS attach procedure
GPRS attach procedure - part 2

5.The SGSN update the MS location and get the MS subscription info from the HLR

a. The HLR must know and store the address of the SGSN currently serving the MS .

  • Therefore, if the new SGSN, that is currently serving the MS, is different than the old SGSN. In this case, the new SGSN should inform the HLR with its own address. This is done in the 'Update Location' message sent from the new SGSN to the HLR.
  • In addition, the new SGSN must know the subscription information of the MS. Therefore, the SGSN will send  'Update Location' to the HLR, asking it to provide the subscription data for this MS.

b. The HLR will send 'cancel location' message to the old SGSN, instructing it to delete the MM context of this MS. Then, the old SGSN will Acknowlege the HLR

c. The HLR will send 'Insert subscriber data' message to the new SGSN informing it with the subscription information for this MS.

d. The New SGSN will confirm the receiving of 'Insert subscriber data' from the HLR. This is done by sending 'Insert subscriber data Ack' to the HLR.

e. The HLR will confirm the receiving of 'Update Location' from the new SGSN by sending 'Update Location Ack' .

6. 'Attach Accept' (SGSN --> MS)

The new SGSN sends 'Attach accept' to the MS, including the new P-TMSI and the new P-TMSI signature assigned to the MS.

7. 'Attach complete' (MS --> SGSN)

The MS will send 'Attach Complete' to the new SGSN confirming the receive of the new 'P-TMSI' and 'P-TMSI signature' .

Now, the MS is GPRS attached to the network.

Notes

In case the SGSN didn't change from the last attach,

  • No new 'P-TMSI' and 'P-TMSI signature' will be assigned to the MS in the 'attach accept'. The MS will remain using the same 'P-TMSI' and 'P-TMSI signature'.
  • If the MM context of the MS still exist on the SGSN, and the SGSN succeeded to authenticate the MS with P-TMSI signature provided. In this case, no need to make 'update location' with the HLR to inform it with the new SGSN address, and to receive the subscription information of the user.