Section: 6.3.5 AMF discovery and selection
Content: The AMF discovery and selection functionality is applicable to both 3GPP access and non-3GPP access. The AMF selection functionality can be supported by the 5G-AN (e.g. RAN, N3IWF) and is used to select an AMF instance for a given UE. An AMF supports the AMF selection functionality to select an AMF for relocation or because the initially selected AMF was not an appropriate AMF to serve the UE (e.g. due to change of Allowed NSSAI). Other CP NF(s), e.g. SMF, supports the AMF selection functionality to select an AMF from the AMF set when the original AMF serving a UE is unavailable. The TSCTSF shall use the AMF discovery functionality to determine the AMFs serving the TAs in the spatial validity condition provided by the AF. 5G-AN selects an AMF Set and an AMF from the AMF Set under the following circumstances: 1) When the UE provides no 5G-S-TMSI nor the GUAMI to the 5G-AN. 2) When the UE provides 5G-S-TMSI or GUAMI but the routing information (i.e. AMF identified based on AMF Set ID, AMF pointer) present in the 5G-S-TMSI or GUAMI is not sufficient and/or not usable (e.g. UE provides GUAMI with an AMF region ID from a different region). 3) AMF has instructed AN that the AMF (identified by GUAMI(s)) is unavailable and no target AMF is identified and/or AN has detected that the AMF has failed. 4) When the UE attempts to establish a signalling connection, and the following conditions are met: - the 5G-AN knows in what country the UE is located; and - the 5G-AN is connected to AMFs serving different PLMNs of different countries; and - the UE provides a 5G-S-TMSI or GUAMI, which indicates an AMF serving a different country to where the UE is currently located; and - the 5G-AN is configured to enforce selection of the AMF based on the country the UE is currently located. Then the 5G-AN shall select an AMF serving a PLMN corresponding to the UE's current location. How 5G-AN selects the AMF in this case is defined in TS 38.410[ NG-RAN; NG general aspects and principles ]  [125]. NOTE: AMF selection case 4) does not apply if 5G-AN nodes serves one country only. In the case of NF Service Consumer based discovery and selection, the CP NF selects an AMF from the AMF Set under the following circumstances: - When the AMF has instructed CP NF that a certain AMF identified by GUAMI(s) is unavailable and the CP NF was not notified of target AMF; and/or - CP NF has detected that the AMF has failed; and/or - When the selected AMF does not support the UE's Preferred Network Behaviour; and/or - When the selected AMF does not support the High Latency communication for NR RedCap UE. In the case of delegated discovery and associated selection, the SCP selects an AMF from the corresponding AMF Set under the following circumstances: - The SCP gets an indication "select new AMF within SET" from the CP NF; and/or - SCP has detected that the AMF has failed. The AMF selection functionality in the 5G-AN may consider the following factors for selecting the AMF Set: - AMF Region ID and AMF Set ID derived from GUAMI; - Requested NSSAI; - Local operator policies; - 5G CIoT features indicated in RRC signalling by the UE; - IAB-indication; - NB-IoT RAT Type; - Category M Indication; - NR RedCap Indication; - SNPN Onboarding indication as indicated in 5G-AN signalling by the UE. AMF selection functionality in the 5G-AN or CP NFs or SCP considers the following factors for selecting an AMF from AMF Set: - Availability of candidate AMF(s). - Load balancing across candidate AMF(s) (e.g. considering weight factors of candidate AMFs in the AMF Set). - In 5G-AN, 5G CIoT features indicated in RRC signalling by the UE. - In 5G-AN, SNPN Onboarding indication as indicated in 5G-AN signalling by the UE. When the UE accesses the 5G-AN with a 5G-S-TMSI or GUAMI that identifies more than one AMF (as configured during N2 setup procedure), the 5G-AN selects the AMF considering the weight factors. When 5G-S-TMSI or GUAMI provided by the UE to the 5G-AN contains an AMF Set ID that is usable, and the AMF identified by AMF pointer that is not usable (e.g. AN detects that the AMF has failed) or the corresponding AMF indicates it is unavailable (e.g. out of operation) then the 5G-AN uses the AMF Set ID for selecting another AMF from the AMF set considering the factors above. The discovery and selection of AMF in the CP NFs or SCP follows the principle in clause 6.3.1 In the case of NF Service Consumer based discovery and selection, the AMF or other CP NFs shall utilize the NRF to discover the AMF instance(s) unless AMF information is available by other means, e.g. locally configured on AMF or other CP NFs. The NRF provides the NF profile(s) of AMF instance(s) to the AMF or other CP NFs. The AMF selection function in the AMF or other CP NFs selects an AMF instance as described below: When NF Service Consumer performs discovery and selection the following applies: - In the case of AMF discovery and selection functionality in AMF or other CP NFs use GUAMI (in the SNPN case, along with NID of the SNPN that owns the AMF instances to be discovered and selected) or TAI to discover the AMF instance(s), the NRF provides the NF profile of the associated AMF instance(s). If an associated AMF is unavailable due to AMF planned removal, the NF profile of the backup AMF used for planned removal is provided by the NRF. If an associated AMF is unavailable due to AMF failure, the NF profile of the backup AMF used for failure is provided by the NRF. If AMF pointer value in the GUAMI is associated with more than one AMF, the NRF provides all the AMFs associated with this AMF pointer value. If no AMF instances related to the indicated GUAMI can be found, the NRF may provide a list of NF profiles of candidate AMF instances in the same AMF Set. The other CP NF or AMF may select any AMF instance from the list of candidate AMF instances. If no NF profiles of AMF is returned in the discovery result, the other CP NF or AMF may discover an AMF using the AMF Set as below. - In the case of AMF discovery and selection functionality in AMF use AMF Set to discover AMF instance(s), the NRF provides a list of NF profiles of AMF instances in the same AMF Set. - At intra-PLMN mobility, the AMF discovery and selection functionality in AMF may use AMF Set ID, AMF Region ID, the target location information, S-NSSAI(s) of Allowed NSSAI to discover target AMF instance(s). The NRF provides the target NF profiles matching the discovery. - At intra-SNPN mobility, the AMF discovery and selection functionality in AMF may use AMF Set ID, AMF Region ID (along with NID of the SNPN that owns the AMF instances to be discovered and selected), the target location information, S-NSSAI(s) of Allowed NSSAI, AMF support of SNPN Onboarding (if the UE is registered for SNPN Onboarding) to discover target AMF instance(s). The NRF provides the target NF profiles matching the discovery. - At inter PLMN mobility, the source AMF selects an AMF instance(s) in the target PLMN by querying target PLMN level NRF via the source PLMN level NRF with target PLMN ID. The target PLMN level NRF returns an AMF instance address based on the target operator configuration. After the Handover procedure the AMF may select a different AMF instance as specified in clause 4.2.2.2.3 of TS 23.502[ Procedures for the 5G System (5GS) ]  [3]. In the context of Network Slicing, the AMF selection is described in clause 5.15.5.2.1. When delegated discovery and associated selection is used, the following applies: - If the CP NF includes GUAMI or TAI in the request, the SCP selects an AMF instance associated with the GUAMI or TAI and sends the request to a selected AMF service instance if it is available. The following also applies: - If none of the associated AMF service instances are available due to AMF planned removal, an AMF service instance from the backup AMF used for planned removal is selected by the SCP; - If none of the associated AMF service instances are available due to AMF failure, an AMF service instance from the backup AMF used for failure is selected by the SCP; - If no AMF service instances related to the indicated GUAMI (in the SNPN case, along with NID of the SNPN that owns the AMF instances to be discovered and selected) can be found the SCP selects an AMF instance from the AMF Set; or - AMF Pointer value used by more than one AMF, SCP selects one of the AMF instances associated with the AMF Pointer. - If the CP NF includes AMF Set ID in the request, the SCP selects AMF/AMF service instances in the provided AMF Set. - At intra-PLMN mobility, if a target AMF instance needs to be selected, the AMF may provide AMF Set ID, AMF Region ID, and the target location information, S-NSSAI(s) of Allowed NSSAI in the request, optionally NRF to use. The SCP will select a target AMF instance matching the discovery. - At intra-SNPN mobility, if a target AMF instance needs to be selected, the AMF may provide AMF Set ID, AMF Region ID along with NID of the SNPN that owns the AMF instances to be discovered and selected, and the target location information, S-NSSAI(s) of Allowed NSSAI, AMF support of SNPN Onboarding in the request (if the UE is registered for SNPN Onboarding), optionally NRF to use. The SCP will select a target AMF instance matching the discovery. - At inter PLMN mobility, the source AMF selects indicates "roaming" to the SCP. The SCP interacts with the NRF in source PLMN so that the NRF in source PLMN can discover an AMF in the target PLMN via target PLMN NRF.