Source : 3GPP TS 23.401 & 3GPP TS 29.274 [LTE Bibles :) ]
Lots of people asked me about UE initial attach. So I thought of blogging about it. Initially I was confused about how UE attaches to the network. With specs talking of default bearer and dedicated bearer every thing went over head. I must also say that both specs which I mentioned above are not referring to each other very well. It will definitely take some time figure out how things are working in LTE. I remember attending a webinar conducted by Light reading where the presenter asked a question regarding the clarity and completion of specs. No wonder more that 60% of attendees voted to option saying specs are still not clear. Well understanding UE initial attach proves the point. Lets move ahead.
Now the LTE is all IP, there has to be always a bearer established. That means when the UE comes up it has to get an IP address. When you switch on the UE, UE sends out a attach request to eNB with bunch of IE's attached. Kindly refer to 3GPP TS 23.401 for IE's that UE send out. Note that this is encapsulated in RRC and and send to eNB. eNB forwards the request to MME. Here is where GTPv2 starts. So you should be having 3GPP TS 29.274 open. When MME receives attach request for the first time it puts in few more IE's and forwards the request to SGW, which forward the request to PGW. Now to understand initial attach better lets restrict ourselves to communication between MME, SGW and PGW. The communication between them takes place using GTPv2 protocol.
If you open 29.274 spec you will find create session request. This is used in UE initial attach to create default bearer. Confusion!! The message type is "Create Session Request" and it is creating "Default bearer". Yes, it is like that. This message is also used for other things like " UE requested PDN connectivity", "Tracking area update" etc etc. Spec clearly gives where this message is to be used. Ok! So we have Create session request being sent asking for establishment of default bearer. MME reads the APN and forwards the request to proper SGW, which again forwards it to PGW. Now PGW responds to the request with a response. This is "Create session response". The response contains Ip address to be assigned to the UE, default bearer ID etc. PGW sends the response to SGW which in turn forwards to MME.MME forwards the response to eNB which in turn sends it to UE. With this response we have a default bearer established. This how a create session request look like.
Refer to spec for detailed IEs. Now that you have default bearer established traffic from UE can start. Note that this bearer is always established. It gets torn down only when the UE is powered down or goes out of network area or something. After the default bearer is established traffic has to flow. Since we have direct tunneling, which means the user plane traffic flows from eNB to SGW without the intervention of MME. This is S1-U interface. To indicate this interface to PDN GW, MME sends out a modify bearer request immediately after the default bearer is created. So modify bearer request modifies the default bearer user plan. PGW responds to modify bearer request with modify bearer response. If the response is success then we have user plane setup for traffic flow. This completes the default bearer establishment from my perspective. You can sends other messages based on your implementation. But I think these two requests are must. So how does the call flow look like?