Wednesday, January 20, 2010

GTP session establishment.

In this post I will try to touch briefly in every aspects of GTPv1 session setup.


I am not going to alot deep in the Radio network side, But covering the MS attach.
When a MS or UE(mobile station or User equipment) first comes up/powered on it has to go through the GPRS initial attach.
In this procedure
1. The UE first send the GMM attach message to the nearest SGSN. This message contains the following stuffs
TMSI - Temporary Mobile subscriber Identity, MNC - Mobile Network Code  , MCC - Mobile Country code, LAC - Location Area Code and RAC -Router area code.
2. The Nearest SGSN search for the Temporary Mobile subscriber ID in its database which may or may not be the old SGSN serving UE. If it was not found then the older SGSN ID is being used for the next message.
Here SGSN send the Identity request to the older SGSN with TMSI.
3. The Older SGSN resolve the TMSI and send back the GPRS IMSI (international mobile subscriber Id) to the nearest SGSN.
4. The SGSN send the Identity request to the UE.
5. The UE has to respond back with Identity response message.
6. SGSN then authenticate to UE with some random number.
7. UE uses this number and some GSM algorithm to generate a few other keys for the sesion and send back in Authentication response.
8. Till now the The mobile identity is not been checked so SGSN ask for mobile Identity to the UE,
9. UE reply back with the self IMEI number (International Mobile equipment Identity), One can see their IMEI in Nokia handsets by dialing *#06#
10. The SGSN then check for the supplied IMEI is valid and unique from the GSM EIR Database (Equipment Identity Register).
11. On successful IMEI check the SGSN get reply from the GSM database.
12. The SGSN then try to locate the UE and the same is done using Location update request and response, all the GSM data bases are updated with the newer location of the UE.
13. On successful update of UE location, SGSN sends the "UE attach accept" message to UE.
14. UE sends the "Attach complete" message. same is also updated with the visitor location register (VLR).
This completes the Radio side initial attah of the UE.


Now Lets begin with the Packet data Network communication!
PDP: Packet data protocol is designed for the Packet switched external networks in the GPRS core network. 
Both of our Serving and Gateway nodes contain the PDP data structure for activation, updation and deactivation of the GPRS sessions!
PDP context is the message format for the understanding of GPRS support nodes for GTPv1 session establishment, updation, termination, quality of services and other specific requirements.
The Session activation goes on with the following set of messages.
1. Create PDP context request from the SGSN to GGSN

2. Create PDP context response from GGSN to SGSN. 
























                                                                                                         The UDP port number 3386 mentioned here was used for all the GTP traffics in GTPv0, from GTPv1 this port is used only for charging (GTP').
While GTP-c uses UDP port 2123 and GTP-u uses UDP port 2152. 



























                                                                                                             


1. Create PDP context request( Packet data protocol context).
Below here is detailed information elements of the GTPv1 header with the wireshark!
I will touch upon QoS separately when we deal with the topic Secondary PDP context! Rest all fields are clearly visible! 






































                                                                                                            2. Create PDP context response. 





























                                                                                                       Feeling really sleepy,
I will show the modify and delete pdp context messages with elaborations of few of the mandatory IEs used here in the next post. 
Then we will see GTPv1 configurations on Cisco 7200 router! 


All your comments and suggestions are highly appreciated! 

























6 comments:

  1. are u using cisco 7200 for simulation gtp. if yes please post the IOS name.

    regards
    Shivlu Jain
    http://www.mplsvpn.info

    ReplyDelete
  2. I was using the version
    c7200-g8is-mz.124-9.T3.bin
    for this.
    on Cisco 7206VXR (NPE-G1).

    ReplyDelete
  3. Hi Rakesh,

    I am interesting in knowing how these c7200's can be connected and configured to emulate this GPRS traffic for which you have the decodes shown.

    Thank you in advance.

    ReplyDelete
  4. Hi!!! I found interesting your article above. I would like to know about the topology you used and the configuration. Hope you´ll post it on your blog. My case, I'm trying to generate a GTP packet, hopefully.

    Thank u in advance.

    ReplyDelete
  5. Hi Harold, below is the topology diagram for this.

    http://4.bp.blogspot.com/_rt4cPxzLkDY/S3MnEuXEphI/AAAAAAAABqU/f6LSee5Y3Io/s1600-h/GTP_session_setup.JPG

    sorry last year was quite busy and could not contribute much here.

    ReplyDelete
  6. @ Anish, this might help you.

    http://3gpp-n-lte.blogspot.com/2010/02/gtpv1-7200-router-config-and-detailed.html

    ReplyDelete

Search Engine Spider Simulator

Enter URL to Spider