Section: 6.3.6.3 Combined N3IWF/ePDG Selection
Content: When the UE wants to select a non-3GPP access node (either an N3IWF or an ePDG), the UE shall perform the following procedure: 1) The UE shall attempt to determine the country it is located in. This is determined by implementation-specific methods not defined in this specification. If the UE cannot determine the country it is located in, the UE shall stop the non-3GPP access node selection. 2) If the UE determines to be located in its home country, then: a) The UE shall select the HPLMN. If the UE fails to connect to an ePDG/N3IWF in the HPLMN, then the UE shall stop the non-3GPP access node selection. 3) If the UE determines to be located in a country other than its home country (called the visited country), then: a) If the UE is registered via 3GPP access to a PLMN and this PLMN is included in the Non-3GPP access node selection information, then the UE shall select this PLMN. If the UE fails to connect to an ePDG/N3IWF in this PLMN, the UE shall select another PLMN by performing the DNS procedure specified in bullet 3c) below. b) In all other cases, (e.g. when the UE is not configured with the Non-3GPP access node selection information, or the UE is registered via 3GPP access to a PLMN but this PLMN is not included in the Non-3GPP access node selection information, or the UE is not registered via 3GPP access to any PLMN), the UE shall select a PLMN by performing the DNS procedure specified in bullet 3c) below. c) The UE shall select a PLMN as follows: i) The UE shall determine if the non-3GPP access node selection is required for an IMS service or for a non-IMS service. The means of that determination are implementation specific. ii) If the UE determines that the non-3GPP access node selection is required for a non-IMS service, the UE shall select a PLMN as specified in clause 6.3.6.2. As defined below, if the UE fails to connect to an N3IWF in any PLMN, the UE may attempt to select an ePDG according to the procedure specified in clause 4.5.4.5 of TS 23.402[ Architecture enhancements for non-3GPP accesses ]  [43]. iii) If the UE determines that the non-3GPP access node selection is required for an IMS service, the UE shall select a PLMN as follows: - First, the UE shall perform a DNS query using the Visited Country FQDN for N3IWF, as specified in TS 23.003[ Numbering, addressing and identification ]  [19] to determine if the visited country mandates the selection of N3IWF in this country. The DNS response received by the UE may be empty or may contain the identities of one or more PLMNs in the visited country, which may be used for N3IWF selection, if the UE decides to select an N3IWF, as specified below. For example, the DNS response may contain the identity of PLMN-1 and the identity of PLMN-2. - Then, the UE shall perform a DNS query using the Visited Country FQDN for ePDG, as specified in TS 23.003[ Numbering, addressing and identification ]  [19] to determine if the visited country mandates the selection of ePDG in this country. The DNS response received by the UE may be empty or may contain the identities of one or more PLMNs in the visited country, which may be used for ePDG selection, if the UE decides to select an ePDG, as specified below. For example, the DNS response may contain the identity of PLMN-1 and the identity of PLMN-3. - If the UE does not receive a DNS response in none of the above two DNS queries, then the UE shall stop the non-3GPP access node selection. Otherwise, the next steps are executed. - The UE shall consolidate the PLMN identities received in the above two DNS responses and shall construct a candidate list of PLMNs. For example, the candidate list of PLMNs may contain the identities of PLMN-1, PLMN-2, PLMN-3. - If the candidate list of PLMNs is empty, then: - If the Non-3GPP access node selection information contains one or more PLMNs in the visited country, the UE shall select one of these PLMNs based on their priorities in the Non-3GPP access node selection information. If the UE fails to connect to a non-3GPP access node in any of these PLMNs, the UE shall select the HPLMN. - Otherwise, the UE shall select the HPLMN. - If the candidate list of PLMNs is not empty, then: - If the UE is registered via 3GPP access to a PLMN which is included in the candidate list of PLMNs, then the UE shall select this PLMN. If the UE fails to connect to a non-3GPP access node in this PLMN, then the UE shall select a different PLMN included in the candidate list of PLMNs as specified in the next bullet. - If the UE is registered via 3GPP access to a PLMN which is not included in the candidate list of PLMNs, or the UE is not registered via 3GPP access to any PLMN, or the UE fails to connect to a non-3GPP access node according to the previous bullet, then the UE shall select one of the PLMNs included in the candidate list of PLMNs based on the prioritized list of PLMNs in the Non-3GPP access node selection information (i.e. the UE shall select first the highest priority PLMN in the Non-3GPP access node selection information that is contained in the candidate list of PLMNs). If the Non-3GPP access node selection information does not contain any of the PLMNs in the candidate list of PLMNs, or the UE is not configured with the Non-3GPP access node selection information, or the UE was not able to connect to a non-3GPP access node in any of the PLMNs included in the Non-3GPP access node selection information and in the candidate list of PLMN, then the UE shall select a PLMN included in the candidate list of PLMNs based on its own implementation means. - If the UE cannot select a non-3GPP access node in any of the PLMNs included in the candidate list of PLMNs, then the UE shall stop the non-3GPP access node selection. In the selected PLMN the UE shall attempt to select a non-3GPP access node as follows: 1. The UE shall determine if the non-3GPP access node selection is required for an IMS service or for a non-IMS service. The means of that determination are implementation-specific. 2. When the selection is required for an IMS service, the UE shall choose a non-3GPP access node type (i.e. ePDG or N3IWF) based on the "Preference" parameter specified in clause 6.3.6.1, unless the UE has its 5GS capability disabled in which case it shall choose an ePDG independent of the "Preference" parameter setting. If the "Preference" parameter for the selected PLMN indicates that ePDG is preferred, the UE shall attempt to select an ePDG. If the "Preference" parameter for the selected PLMN indicates that N3IWF is preferred, the UE shall attempt to select an N3IWF. If the selection fails, including the case when, during the registration performed over either 3GPP or non-3GPP access, the UE receives the IMS Voice over PS session Not Supported over Non-3GPP Access indication (specified in clause 5.16.3.2a), the UE shall attempt selecting the other non-3GPP access node type in the selected PLMN, if any. If that selection fails too, or it is not possible, then the UE shall select another PLMN, according to the procedure specified bullet 3c) above. 3. When the selection is required for a non-IMS service, the UE shall perform the selection by giving preference to the N3IWF independent of the "Preference" parameter setting. If the N3IWF selection fails, or it is not possible, the UE should select another PLMN based on the procedure specified in clause 4.5.4.4 of TS 23.402[ Architecture enhancements for non-3GPP accesses ]  [43], and shall attempt to select an N3IWF in this PLMN. If the UE fails to select an N3IWF in any PLMN, the UE may attempt to select an ePDG according to the procedure specified in clause 4.5.4.5 of TS 23.402[ Architecture enhancements for non-3GPP accesses ]  [43]. In the above procedure, when the UE attempts to construct a Tracking/Location Area Identifier FQDN either for ePDG selection or for N3IWF selection, the UE shall use the Tracking Area wherein the UE is located and shall construct either: - an ePDG or N3IWF TAI FQDN based on the 5GS TAI, when the UE is registered to the 5GS; or - an ePDG or N3IWF TAI FQDN based on the EPS TAI, when the UE is registered to EPS. NOTE: A UE performing both a selection for an IMS service and a selection for a non-IMS service could get simultaneously attached to a N3IWF and to an ePDG in the same PLMN or in different PLMNs. If the UE is configured with Slice-specific N3IWF prefix configuration, then the UE shall construct the Prefixed N3IWF OI FQDN or the Prefixed N3IWF TA FQDN as specified in TS 23.003[ Numbering, addressing and identification ]  [19] instead of the N3IWF OI FQDN and the N3IWF TA FQDN, respectively. Further details on constructing the Prefixed N3IWF OI and TA FQDN are described in clause 6.3.6.2.