Section: 6.3.2 SMF discovery and selection
Content: The SMF selection functionality is supported by the AMF and SCP and is used to allocate an SMF that shall manage the PDU Session. The SMF selection procedures are described in clause 4.3.2.2.3 of TS 23.502[ Procedures for the 5G System (5GS) ]  [3]. The SMF discovery and selection functionality follows the principles stated in clause 6.3.1. If the AMF does discovery, the AMF shall utilize the NRF to discover SMF instance(s) unless SMF information is available by other means, e.g. locally configured on AMF. The AMF provides UE location information to the NRF when trying to discover SMF instance(s). The NRF provides NF profile(s) of SMF instance(s) to the AMF. In addition, the NRF also provides the SMF service area of SMF instance(s) to the AMF. The SMF selection functionality in the AMF selects an SMF instance and an SMF service instance based on the available SMF instances obtained from NRF or on the configured SMF information in the AMF. NOTE 1: Protocol aspects of the access to NRF are specified in TS 29.510[ 5G System; Network function repository services; Stage 3 ]  [58]. The SMF selection functionality is applicable to both 3GPP access and non-3GPP access. The SMF selection for Emergency services is described in clause 5.16.4.5. The following factors may be considered during the SMF selection: a) Selected Data Network Name (DNN). In the case of the home routed roaming, the DNN is not applied for the V-SMF selection. b) S-NSSAI of the HPLMN (for non-roaming and home-routed roaming scenarios), and S-NSSAI of the VPLMN (for roaming with local breakout and home-routed roaming scenarios). c) NSI-ID. NOTE 2: The use of NSI -ID in the network is optional and depends on the deployment choices of the operator. If used, the NSI ID is associated with S-NSSAI. d) Access technology being used by the UE. e) Support for Control Plane CIoT 5GS Optimisation. f) Subscription information from UDM, e.g. - per DNN: whether LBO roaming is allowed. - per DNN: whether HR-SBO roaming is allowed. - per S-NSSAI: the subscribed DNN(s). - per (S-NSSAI, subscribed DNN): whether LBO roaming is allowed. - per (S-NSSAI, subscribed DNN): whether HR-SBO roaming is allowed. - per (S-NSSAI, subscribed DNN): whether EPC interworking is supported. - per (S-NSSAI, subscribed DNN): whether selecting the same SMF for all PDU sessions to the same S-NSSAI and DNN is required. - per (S-NSSAI, DNN) associated with 5G VN group: Service Area (LADN service area) for the 5G VN group. In the case of SMF selection for a PDU Session targeting 5G VN group, the AMF may prefer candidate SMF(s) that have an intersection with the LADN service area of the 5G VN group. g) Void. h) Local operator policies. NOTE 3: These policies can take into account whether the SMF to be selected is an I-SMF or a V-SMF or a SMF. i) Load conditions of the candidate SMFs. j) Analytics (i.e. statistics or predictions) for candidate SMFs' load as received from NWDAF (see TS 23.288[ Architecture enhancements for 5G System (5GS) to support network data analytics services ]  [86]), if NWDAF is deployed. k) UE location (i.e. TA). l) Service Area of the candidate SMFs. m) Capability of the SMF to support a MA PDU Session. n) If interworking with EPS is required. o) Preference of V-SMF support. This is applicable only for V-SMF selection in the case of home routed roaming. p) Target DNAI. q) Capability of the SMF to support User Plane Remote Provisioning (see clause 5.30.2.10.4.3). r) Supported DNAI list. s) HR-SBO support (according to clause 6.7 of TS 23.548[ 5G System Enhancements for Edge Computing; Stage 2 ]  [130]). t) Capability of the SMF (V-SMF and H-SMF) to support non-3GPP access path switching. To support the allocation of a static IPv4 address and/or a static IPv6 prefix as specified in clause 5.8.2.2.1, a dedicated SMF may be deployed for the indicated combination of DNN and S-NSSAI and registered to the NRF, or provided by the UDM as part of the subscription data. In the case of delegated discovery, the AMF, shall send all the available factors a)-d), k) and n) to the SCP. In addition, the AMF may indicate to the SCP which NRF to use (in the case of NRF dedicated to the target slice). If there is an existing PDU Session and the UE requests to establish another PDU Session to the same DNN and S-NSSAI of the HPLMN, and the UE subscription data indicates the support for interworking with EPS for this DNN and S-NSSAI of the HPLMN or UE subscription data indicates the same SMF shall be selected for all PDU sessions to the same S-NSSAI, DNN, the same SMF in non roaming and LBO case or the same H-SMF in home routed roaming case, shall be selected. In addition, if the UE Context in the AMF provides a SMF ID for an existing PDU session to the same DNN, S-NSSAI, the AMF uses the stored SMF ID for the additional PDU Session. In any such a case where the AMF can determine which SMF should be selected, if delegated discovery is used, the AMF shall indicate a desired NF Instance ID so that the SCP is able to route the message to the relevant SMF. Otherwise, if UE subscription data does not indicate the support for interworking with EPS for this DNN and S-NSSAI, a different SMF in non roaming and LBO case or a different H-SMF in home routed roaming case, may be selected. For example, to support a SMF load balancing or to support a graceful SMF shutdown (e.g. a SMF starts to no more take new PDU Sessions). In the home-routed roaming case, the SMF selection functionality selects an SMF in VPLMN based on the S-NSSAI of the VPLMN, as well as an SMF in HPLMN based on the S-NSSAI of the HPLMN. This is specified in clause 4.3.2.2.3.3 of TS 23.502[ Procedures for the 5G System (5GS) ]  [3]. If the HR-SBO roaming is allowed for the PDU Session, the DNN is also considered for V-SMF selection. When the UE requests to establish a PDU Session to a DNN and an S-NSSAI of the HPLMN, if the UE MM Core Network Capability indicates the UE supports EPC NAS and optionally, if the UE subscription indicates the support for interworking with EPS for this DNN and S-NSSAI of the HPLMN, the selection functionality (in AMF or SCP) selects a combined SMF+PGW-C. Otherwise, a standalone SMF may be selected. If the UDM provides a subscription context that allows for handling the PDU Session in the VPLMN (i.e. using LBO) for this DNN and S-NSSAI of the HPLMN and, optionally, the AMF is configured to know that the VPLMN has a suitable roaming agreement with the HPLMN of the UE, the following applies: - If the AMF does discovery, the SMF selection functionality in AMF selects an SMF from the VPLMN. - If delegated discovery is used, the SCP selects an SMF from the VPLMN. If an SMF in the VPLMN cannot be derived for the DNN and S-NSSAI of the VPLMN, or if the subscription does not allow for handling the PDU Session in the VPLMN using LBO, then the following applies: - If the AMF does discovery, both an SMF in VPLMN and an SMF in HPLMN are selected, and the DNN and S-NSSAI of the HPLMN is used to derive an SMF identifier from the HPLMN. - If delegated discovery is used: - The AMF performs discovery and selection of H-SMF from NRF. The AMF may indicate the maximum number of H-SMF instances to be returned from NRF, i.e. SMF selection at NRF. - The AMF sends Nsmf_PDUSession_CreateSMContext Request to SCP, which includes the endpoint (e.g. URI) of the selected H-SMF, and the discovery and selection parameters as defined in this clause, i.e. parameter for V-SMF selection. The SCP performs discovery and selection of the V-SMF and forwards the request to the selected V-SMF. - The V-SMF sends the Nsmf_PDUSession_Create Request towards the H-SMF via the SCP; the V-SMF uses the received endpoint (e.g. URI) of the selected H-SMF to construct the target destination to be addressed. The SCP forwards the request to the H-SMF. - Upon reception of a response from V-SMF, based on the received V-SMF ID the AMF obtains the Service Area of the V-SMF from NRF. The AMF uses the Service Area of the V-SMF to determine the need for V-SMF relocation upon subsequent UE mobility. If the initially selected SMF in VPLMN (for roaming with LBO) detects it does not understand information in the UE request, it may reject the N11 message (related with a PDU Session Establishment Request message) with a proper N11 cause triggering the AMF to select both a new SMF in the VPLMN and a SMF in the HPLMN (for home routed roaming). The AMF selects SMF(s) considering support for CIoT 5GS optimisations (e.g. Control Plane CIoT 5GS Optimisation). In the case of onboarding of UEs for SNPNs, when the UE is registered for SNPN onboarding the AMF selects SMF(s) of Onboarding Network considering the Capability of SMF to support User Plane Remote Provisioning. Additional details of AMF selection of an I-SMF are described in clause 5.34. In the case of home routed scenario, the AMF selects a new V-SMF if it determines that the current V-SMF cannot serve the UE location. The selection/relocation is same as an I-SMF selection/relocation as described in clause 5.34.