AccessD Service [1]

Accessd is one of the main magma service that plays the role of the MME and AMF of the 4G and 5G System respectively. It supports registration, mobility, access authentication and authorization, lawful inspect and transporting session management messages between the UE(CPE) and Sessiond.

Alternative text

Protocols

NAS [2]

The 5G NAS(Non-Access Stratum) is a control plane protocol that is present at the Radio Interface(N1 Interface) between UE and AMF. This manages the mobility and session-related context within 5GS(5G System).

NGAP [3]

The Next-Generation Application Protocol(NGAP) is a Control Plane(CP) protocol signaling between gNB and the AMF. It handles the UE-associated and non-UE-associated services.

Call Flow

Registration with SUCI as Mobile Identity

  • When UE is powered on, it first undergoes the registration process. UE sends the registration request to the gNB. gNB then sends the initial UE message carrying the registration request to Accessd. Since the UE identity(SUCI/IMSI) was included in the registration request, Accessd initiates the authentication procedure. It retrieves the authentication vectors and algorithm information from the SUBSDB. Accessd then sends the authentication parameters to the UE to setup a mutual authentication between the user and the network. On successful validation by the network, the UE is considered authenticated and secure communication is set up between the UE and the network.

  • After authentication, the SMC procedure is initiated, and after that Accessd creates a new UE Context and allocates an AMF NGAP UE ID to the UE. Accessd then initiates an Initial UE context setup procedure with the gNB. After this, the registration procedure is completed.

Alternative text
  • [14] [25] Handle Registration Request from UE

  • [14] Handle Registration Type Request

  • [1] Handle Initial UE message

  • [23] Decode plain NAS message

  • [55] Decode Registration Request

  • [92] Decode Registration Type Message

  • [54] Encode Registration Reject

  • [25] Handler to trigger registration reject

  • [7] Send Registration Reject

  • [25] Abort Registration procedure for timer failure

  • [25] Notify AS-SAP about the Registration Reject message

  • [90] Decode SUCI Mobile Identity Message

  • [90] Decode TMSI Mobile Identity Message

  • [90] Decode Mobile Identity Message

  • [9] [28] Decrypt IMSI Info

  • [11] Set IMSI as valid

  • [6] Upsert IMSI in AMF Context

  • [1] Insert IMSI into the IMSI UE table

  • [6] Checks if UE context exists for IMSI or not

  • [6] Get AMF UE ID from IMSI

  • [6] Register the UE Context

  • [13] Generate GUTI based on SUPI/IMSI received

  • [25] Create Registration Request Procedure

  • [25] Allocate and initialize AMF procedures

  • [8] [25] Validate AMF Context and invokes authentication procedure

  • [26] Create Subscriber Authentication Request(SNN)

  • [8] [14] Handle Authentication Failure

  • [8] Abort Authentication Procedure

  • [25] Callback for Authentication Failure

  • [31] [65] Decode Authentication Failure Message

  • [22] Authentication Response received from SUBSDB

  • [9] Get Subscriber Authentication Information

  • [10] Receive Security Vector from SUBSDB

  • [22] [26] Create an Authentication answer from SUBSDB

  • [70] Decode EAP Message

  • [76] Decode NAS Key Set identifier

  • [36] Encode DL NAS Transport Message

  • [71] Encode Extended Protocol Discriminator

  • [33] Encode Authentication Request Message

  • [64] Encode ABBA Message

  • [66] Encode Authentication Parameter AUTN

  • [67] Encode Authentication Parameter RAND

  • [68] Encode Authentication Response Parameter

  • [8] Handle NAS Authentication Procedure

  • [7] Builds DL NAS Transport message

  • [8] Send Authentication Request

  • [11] Set Security ngKSI

  • [14] Handle Authentication Response

  • [1] [2] Handle UL NAS message

  • [62] Decode UL NAS Transport Message

  • [34] Decode Authentication Response Message

  • [32] Encode Authentication Reject Message

  • [7] Send authentication Reject

  • [35] Encode Authentication Result Message

  • [8] Authentication Completion Response

  • [25] Callback for successful Authentication

  • [6] Create new UE Context

  • [7] Send Initial Context Setup Request

  • [6] Send AMF NGAP UE ID

  • [52] Encode Registration Accept

  • [7] [25] Builds Registration Accept message and sent it to UE

  • [1] Handle Initial Context Setup Response

  • [25] Handle Registration Complete Response

  • [91] Decode Registration Result

  • [25] Store Registration information is received and processed once old UE gets deregistered

Alternative text Alternative text

Registration with GUTI as Mobile Identity

  • When the registration request contains GUTI as a mobile identity, then Accessd initiates an identification procedure with the UE to get a permanent UE ID(SUCI). After the identity process, Accessd setup a mutual authentication with the UE and initiates the SMC procedure.

  • NAS SMC procedure is designed to protect the registration process from alteration by a middleman. It also set up AS security, and selects the integrity and ciphering algorithm for the NAS protection. After the SMC procedure, the initial UE context is setup in gNB and registration completes.

Alternative text
  • [22] Invoke Identification Procedure

  • [7] Builds DL NAS Transport message

  • [7] [22] Send Identity Request to UE

  • [39] Encode Identity Request

  • [88] Encode Identity Type Message

  • [1] Handle UL NAS message

  • [14] Handle Identity Response

  • [40] Decode Identity Response

  • [25] Callback for Identification Failure

  • [13] Identification Completion

  • [25] Callback for successful Identification

  • [90] Decode GUTI Mobile Identity Message

  • [6] Checks if UE context exists for GUTI or not

  • [6] Fetch the GUTI based on UE Id

  • [6] Get the AMF Context based on UE Identity

  • [1] Insert GUTI into UE Context Table

  • [16] [25] Create and initiates SMC Procedure

  • [56] Encode Security Mode Command

  • [16] Send SMC(Security Mode Command) Message

  • [23] Encode plain NAS message

  • [7] Setup the security header of the given NAS message

  • [93] Encode Security Header Type Message

  • [74] Encode NAS Security Algorithm

  • [90] Encode IMEI Mobile Identity Message

  • [72] Encode IMEISV Request

  • [96] Encode UE Security Capability

  • [11] Set Security ngKSI

  • [11] Set Security Type

  • [16] Set Security algorithms(Integrity and Security Algorithm based on Security Capabilities)

  • [7] Send AS Security Request

  • [15] Set AS Security Data

  • [58] Encode Security Mode Reject

  • [14] [16] Handle Security Mode Reject

  • [25] Callback for Security Mode Command Failure

  • [7] AS Security Reject

  • [17] Handle Security Mode Complete

  • [25] Callback for successful Security Mode Complete

  • [57] Decode Security Mode Complete

  • [23] Decode header of a Security protected NAS message

  • [8] Fetch New Security Context

  • [5] Handle NAS Encoded message

Alternative text Alternative text

PDU Session Establishment

  • UE sends a PDU Session Establishment request to Accessd for the first time to establish a user plane. Accessd sends the IP address of the UE to the mobilityd to keep track of the location of the UE and update the location in the SUBSDB. It then sets SM context with the sessiond and setup PDU Session Resource at the UE and gNB.

Alternative text
  • [18] Handle PDU Session Establishment Request from UE

  • [43] Decode PDU Session Establishment Request Message

  • [81] Decode PDU Session Type

  • [42] Encode PDU Session Establishment Reject Message

  • [18] Send PDU Session Establishment Reject

  • [9] [27] Allocate IPv4/IPv6/IPv4v6 Address Async

  • [27] Handle allocate IPv4/IPv6/IPv4v6 Address Status

  • [9] [18] Update Location Request

  • [7] [24] Send Session Request to SMF

  • [1] [18] Handle PDU Session Failure

  • [9] [18] Set SMF Session Context

  • [20] Get QoS Rules and Default QoS Info from SMF Context

  • [63] Decode SMF Message

  • [4] Calculate PDU Session AMBR

  • [1] Convert AMBR format one defined in create PDU Session Response to one defined in PDU Session Establishment Accept message

  • [17] [18] Copy DNN and AMBR info in SMF Context

  • [6] Insert SM Context in the map

  • [95] Encode Session AMBR

  • [69] Encode DNN

  • [78] Encode PDU Session Identity Message

  • [77] Encode PDU Session Address Message

  • [84] Encode QoS Rules

  • [85] Encode QoS Flow Descriptor

  • [86] Encode QoS Flow Parameter

  • [4] Send PDU Session Resource Setup Request to RAN

  • [41] Encode PDU Session Establishment Accept Message

  • [83] Encode Protocol Configuration Options

  • [1] Send the PDU Establishment Accept

  • [19] Send Slice Information in PDU Session Establishment Accept Message

  • [1] [24] Handle PDU Resource Setup Response containing gNB IP and TEID

Alternative text

PDU Session Modification

  • Accessd sends the session modification request inside the session context update message. After getting the response from the sessiond, it initiates the session resource modification request with the RAN and UE.

Alternative text
  • [44] [48] Decode PDU Session Modification Request

  • [45] [47] Encode PDU Session Modification Command Reject

  • [24] Handle PDU Session Modification Command Reject Message

  • [1] Update SMF Session PTI Procedure

  • [18] Update IP Address information in SMF Context

  • [80] Decode PDU Session Status

  • [82] Decode PTI Message

  • [73] Decode Maximum Number of Supported Packet Filters

  • [18] Check if maximum PDU Sessions are not reached

  • [1] Send PDU Session Modification Request

  • [4] Send PDU Session Resource Modify Request

  • [1] [24] Handle PDU Session Resource Modify Response

  • [18] Handle PDU Session Resource Modify Completion

  • [24] Handle PDU Session Modification Complete Message

  • [46] Decode PDU Session Modification Complete

Service Request

  • The service request message is sent by the UE to the network to request the establishment of a NAS signaling connection and of the radio and signaling bearers. The UE sends the service request message when it is in IDLE mode and has pending user data to be sent. Accessd updates this information in the SM Context and sends it to the sessiond to modify the session. After the successful service procedure, accessd initiates the initial UE context setup message with the gNB.

Alternative text
  • [14] Handle Service Request

  • [61] Decode Service Request

  • [94] Decode Service Type Message

  • [60] Encode Service Reject

  • [7] Builds Service reject message

  • [18] [29] Set SMF Notification

  • [7] Send Initial Context Setup Request

  • [59] Encode Service Accept

  • [7] Service Request Accept to UE

  • [1] Handle Initial Context Setup Response from gNB

Alternative text

UE-Initiated Session Release

  • UE initiates the release of PDU Session by sending a release request to the accessd. Accessd sends release requests to the sessiond. On receiving the release response from sessiond, it forwards the PDU session release command to the RAN and UE. Accessd then sends the release of the IPv4/IPv6/IPv4v6 address of the UE from the mobilityd service.

Alternative text
  • [18] Handle PDU Session Release Request

  • [49] [51] Decode PDU Session Release Request

  • [50] Encode PDU Session Release Reject

  • [18] [29] Set SMF Notification

  • [18] Clear SMF Context

  • [4] PDU Session Resource Release Request

  • [1] Handle PDU Session Release Response

  • [9] [27] Release IPv4/IPv6/IPv4v6 Address

UE-Initiated Deregistration

  • When UE does not want to access the 5GS any longer, it sends a deregistration request to the network. Accessd requests for the release of SM context along with resource release messages to the sessiond. After the successful deregistration procedure, it sends the UE context release command to the RAN to delete the UE-related information at gNB.

Alternative text
  • [21] Handle Deregistration Request

  • [38] Decode De-registration Request Message

  • [87] Decode Deregistration Type Message

  • [21] [24] Set SMF Session(release)

  • [37] Encode De-registration Accept Message

  • [7] Builds De-Registration Accept message by Network

  • [1] [3] [6] Send UE Context Release Command

  • [1] Handle UE Context Release Complete

  • [1] Handle gNB deregister Indication

  • [6] [21] Delete the UE Context

  • [11] Clear AMF Security Context

  • [22] Clear AMF Context

Alternative text

IDLE Mode and Paging

Alternative text
  • [6] Get UE Context Release Cause

  • [6] [21] Delete the UE Context

  • [18] [29] Set SMF Notification

  • [1] Handle AMF Notification

  • [6] Transition to IDLE State