LTE Initial Attach Call Flow Explained: RRC, S1AP, S6a, GTP and Gx
The complete LTE initial attach with EPS AKA: RRC setup, Attach Request, AIR/AIA, authentication, NAS security, ULR/ULA, Create Session, Gx CCR-I and the default bearer.
Browse all articles
The LTE attach is the first procedure every 4G engineer should be able to draw from memory. In a few hundred milliseconds it authenticates the subscriber, sets up NAS security, registers the UE with the HSS, creates the default EPS bearer and gives the UE an IP address. This Solex Network Solutions guide walks through an initial attach with EPS AKA, for a UE the network has never seen before.
The EPC in one paragraph
The MME handles NAS signalling, authentication and mobility. The SGW anchors the user plane inside the network and the PGW connects it to the PDN (internet, IMS) and allocates the UE IP address. The HSS holds subscription and authentication data (over S6a), the PCRF decides policy and QoS (over Gx), and the EIR can check the device IMEI (S13). The eNB connects to the MME with S1-MME (S1AP) and to the SGW with S1-U (GTP-U).
Step by step
1. Cell selection and random access
When it switches on, the UE reads the MIB and SIBs broadcast in each cell, measures signal strength and selects a cell. It then runs the random access (RACH) procedure to get uplink timing and a temporary identity.
2. RRC connection
The UE sends RRC Connection Request; the eNB answers RRC Connection Setup, which sets up signalling radio bearer SRB1. The UE replies with RRC Connection Setup Complete, and inside it - as NAS dedicated information - sends the Attach Request.
3. Attach Request reaches the MME
The Attach Request carries the IMSI (or an old GUTI), the UE network capability (supported security algorithms) and a PDN Connectivity Request with the PDN type and PCO. The eNB selects an MME and forwards it in an S1AP Initial UE Message, together with the ECGI and TAI of the cell.
4. AIR / AIA - get authentication vectors
The MME sends an S6a Authentication-Information-Request to the HSS with the IMSI and the visited PLMN ID. The AIA returns E-UTRAN vectors: RAND, AUTN, XRES and KASME (the key from which all EPS keys are derived).
5. Authentication
The MME sends Authentication Request (RAND, AUTN) to the UE. The USIM checks AUTN - which proves the network is genuine - and computes RES, returned in Authentication Response. The UE is authenticated when RES equals XRES.
6. NAS security
The MME sends NAS Security Mode Command, choosing integrity and ciphering algorithms from the UE's capabilities. After Security Mode Complete, all further NAS messages are protected. Optionally the MME checks the IMEI with the EIR (ME Identity Check over S13).
7. ULR / ULA - register with the HSS
For a UE not already known to this MME, the MME sends S6a Update-Location-Request with the IMSI, its own identity, the RAT type and ULR-Flags. The HSS stores the MME as the serving node and returns ULA with the Subscription-Data: subscribed APNs and their default QoS (QCI, ARP), APN-AMBR and UE-AMBR, and access restrictions.
8. Create Session - towards the gateways
The MME selects an SGW and a PGW (using the APN and DNS) and sends GTP-C Create Session Request to the SGW with the IMSI, MSISDN, APN, PDN type, RAT type, bearer QoS, PCO and the MME's control-plane TEID. The SGW creates its context and sends Create Session Request to the PGW over S5.
9. CCR-I / CCA-I - policy
If dynamic policy is used, the PGW opens a Gx session with CCR (CC-Request-Type INITIAL_REQUEST) carrying the IMSI, UE IP, APN and RAT type. The PCRF answers CCA-I with the QoS for the default bearer and any PCC rules. At the same time the PGW may open a Gy session with the OCS for online charging.
10. Create Session Response
The PGW allocates the UE IP address and returns Create Session Response with its TEID; the SGW adds its S1-U TEID and responds to the MME.
11. Initial Context Setup - radio bearer and Attach Accept
The MME sends S1AP Initial Context Setup Request to the eNB with the SGW S1-U TEID, bearer QoS and security keys. Inside is the NAS Attach Accept with the GUTI, TAI list and Activate Default EPS Bearer Context Request (UE IP, APN, QoS).
The eNB activates AS security (RRC Security Mode Command / Complete) and sets up the data radio bearer with RRC Connection Reconfiguration. It answers the MME with Initial Context Setup Response carrying its own S1-U TEID.
12. Attach Complete and Modify Bearer
The UE sends Attach Complete with Activate Default EPS Bearer Context Accept. The MME sends GTP-C Modify Bearer Request to the SGW with the eNB TEID. After Modify Bearer Response, the downlink path is complete and the UE has a working default bearer.
The identifiers to check in a trace
- IMSI / GUTI - who the UE is.
- MME UE S1AP ID / eNB UE S1AP ID - match S1AP messages for one UE.
- TEIDs - the GTP tunnel endpoints at eNB, SGW and PGW; a wrong TEID gives a user plane with no traffic.
- EBI - the EPS bearer ID, 5 for the first default bearer.
Common attach failures
- EMM cause #3 Illegal UE / #6 Illegal ME - authentication failure or a blacklisted IMEI.
- EMM cause #7 EPS services not allowed - S6a ULA with DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION (5420) or the user is not provisioned (5001).
- EMM cause #15 No suitable cells in tracking area / #13 Roaming not allowed - access restrictions in the subscription or the roaming agreement.
- ESM cause #27 Missing or unknown APN - the APN is not in the subscription or not resolvable.
- Gx CCA-I failure - the PCRF rejects the session (for example 5140 ERROR_INITIAL_PARAMETERS); the PGW rejects Create Session and the attach fails.
For the Diameter side of S6a and Gx in detail, read our Diameter protocol explained series. The full attach, with live S1AP, S6a, GTP and Gx traces, is the first module of the Solex Network Solutions 4G LTE and EPC course.
Learn this hands-on
4G LTE and EPC
MME, SGW, PGW, HSS and PCRF, the Diameter and GTP between them, and every attach, bearer and handover procedure worth knowing.



Discussion
No comments yet. Start the discussion - questions are welcome.
Leave a comment