Skip to content

GUAMI / AMF Region / AMF Set / AMF Pointer — How AMFs Are Identified and Selected

Difficulty: Advanced (deep dive) / Estimated study time: 35 min / Prerequisites: SUPI / SUCI / 5G-GUTI, Registration / Main actors: gNB, AMF, NRF / Main interfaces: N2, N14

Learning objectives

After reading this chapter, you will be able to:

  • Break the GUAMI down into MCC / MNC / AMF Region ID / AMF Set ID / AMF Pointer and explain each field's bit length and role
  • Explain the AMF Region → AMF Set → AMF hierarchy and the nuance that "an AMF Pointer may point to one or more AMFs"
  • Explain how NG-RAN selects an AMF using the GUAMI / 5G-S-TMSI / Relative AMF Capacity
  • Check the Served GUAMI List / Relative AMF Capacity of the NG Setup Response in Wireshark and compare them with the network design
  • Isolate an "extremely uneven UE distribution between AMFs" by checking RAN, NGAP, GUAMI, AMF Set and AMF in order

Prerequisites

The focus of this chapter (Level ∞ Deep Dive)

We break down the first half of the 5G-GUTI (the GUAMI) seen in the previous chapter. The GUAMI is not just an ID; it is the entry point to understanding AMF selection, load distribution, switchover on AMF failure and context retrieval from the old AMF. A full IE walkthrough of the NG Setup procedure itself is out of scope here; we focus on the parts related to the GUAMI.


Why — why does an AMF need an "address"?

With only one AMF, the gNB can send everything there without thinking. In commercial networks, however, many AMFs are deployed for scale, redundancy and load distribution. This raises the following problems.

  • When a UE comes back from idle, we want to deliver it to the AMF that holds its context
  • When an AMF fails or is removed, we want to switch to an AMF that can take over the same role
  • We want to distribute new UEs in proportion to each AMF's capacity
  • For a UE that has moved to another AMF, we want the new AMF to identify the old AMF and retrieve the context

To achieve this, we need an "address" that identifies AMFs hierarchically. That is the GUAMI (Globally Unique AMF Identifier).

Analogy: The GUAMI is an address of the form "country (PLMN) → prefecture (AMF Region) → branch (AMF Set) → counter number (AMF Pointer)." Because the counter's address is printed on the numbered ticket (5G-GUTI), the usher (gNB) can guide a returning customer (UE) to the same counter. Even if that counter is closed, another counter in the same branch (AMF Set) can help, because they share the paperwork (UE context).


What — the structure of the GUAMI

Definition and bit lengths

The GUAMI is defined in TS 23.501 §5.9.4 and TS 23.003 §2.10.1 as follows.

<GUAMI>          = <MCC><MNC><AMF Identifier>
<AMF Identifier> = <AMF Region ID><AMF Set ID><AMF Pointer>
Element Length What it identifies
MCC + MNC 3 digits + 2–3 digits PLMN
AMF Region ID 8 bits AMF Region within the PLMN
AMF Set ID 10 bits AMF Set, unique within the AMF Region
AMF Pointer 6 bits One or more AMFs within the AMF Set

The AMF Identifier is 24 bits in total (TS 23.003 §2.10.1).

A GUAMI does not necessarily mean one AMF

TS 23.501 §5.9.4 defines the AMF Pointer as identifying one or more AMFs within the AMF Set. A GUAMI can therefore also point to one or more AMFs. "Pointer = one physical AMF" is a typical configuration, not a requirement of the specification. Conversely, one AMF can have multiple GUAMIs, which is why the NG Setup Response carries a Served GUAMI List.

The Region → Set → AMF hierarchy

flowchart TD
    PLMN["PLMN 001-01"] --> R1["AMF Region ID = 0x01"]
    PLMN --> R2["AMF Region ID = 0x02"]
    R1 --> S1["AMF Set ID = 1
(unique within Region 0x01)"] R1 --> S2["AMF Set ID = 2"] R2 --> S3["AMF Set ID = 1
(unique within Region 0x02;
different from Set 1 of Region 0x01)"] S1 --> P1["AMF Pointer = 1"] S1 --> P2["AMF Pointer = 2"] S2 --> P3["AMF Pointer = 1"] S3 --> P4["AMF Pointer = 1"]

The values in the figure are a fictitious example using the test PLMN (001-01). Because an AMF Set ID is unique only within its Region, identifying an AMF Set globally requires the combination PLMN + Region ID + Set ID.

What are the AMF Region and the AMF Set?

  • An AMF Region consists of one or more AMF Sets. Despite the name "Region," it need not be a physical geographic division; it is decided logically by the operator's network design (how Regions are carved out is operation dependent. The specification states that "an AMF Region consists of one or more AMF Sets" and does not require it to be a geographic division. TS 23.501 §5.21.2.1 / §5.9.4, to be confirmed).
  • An AMF Set is a group of AMFs that serve the same area (group of TAs) and the same network slices (TS 23.501 §5.21.2.1, to be confirmed). The AMF Set is designed as a unit in which another AMF in the Set can take over a UE (by sharing UE context via a UDSF, or by transferring context between AMFs). Whether and how context is shared is configuration dependent (under TS 23.501 §5.21.2; sub-clause to be confirmed).

AMF Set ≠ Kubernetes cluster / load balancer / data center

An AMF Set is a logical grouping in 3GPP. Mappings such as "AMF Set = one Kubernetes cluster," "AMF Set = one LB VIP" or "AMF Set = one DC" are vendor/operator deployment design (implementation dependent), not definitions in the specification.

The GUAMI inside the 5G-GUTI

5G-GUTI
┌──────────────────────────────────────────┬──────────────┐
│                  GUAMI                   │   5G-TMSI    │
│  MCC │ MNC │ Region(8) │ Set(10) │ Ptr(6) │    (32)      │
│            points to the AMF             │ UE in the AMF│
└──────────────────────────────────────────┴──────────────┘

As long as the UE holds a 5G-GUTI, the network can look up "the AMF(s) that last served this UE" from the identifier. This is the starting point for AMF selection and context transfer.


How — how the GUAMI is used

1. NG Setup — the AMF announces its "address" to the gNB

In the NG Setup procedure (TS 38.413 §8.7.1), in which the gNB and the AMF establish N2, the AMF notifies the gNB of the GUAMIs it serves.

sequenceDiagram
    participant gNB
    participant AMF
    gNB->>AMF: NG Setup Request (Global RAN Node ID, Supported TA List, Default Paging DRX, etc.)
    AMF-->>gNB: NG Setup Response (AMF Name, Served GUAMI List, Relative AMF Capacity, PLMN Support List)
    Note over gNB: keeps a GUAMI ⇔ AMF (TNL association) table
and each AMF's relative capacity AMF-->>gNB: AMF Configuration Update (changes to Served GUAMI List / Relative AMF Capacity) gNB-->>AMF: AMF Configuration Update Acknowledge
IE (NG Setup Response) Relation to the GUAMI
AMF Name Name of the AMF
Served GUAMI List List of GUAMIs served by this AMF. Each item contains a GUAMI and, optionally, a Backup AMF Name
Relative AMF Capacity Relative capacity of the AMF (0–255; IE defined under TS 38.413 §9.3.1, sub-clause to be confirmed). Used for the distribution ratio of new UEs
PLMN Support List Supported PLMNs and S-NSSAIs

The messages are defined in TS 38.413 §9.2.6.1 (NG Setup Request) / §9.2.6.2 (NG Setup Response), and changes are notified with AMF Configuration Update (§8.7.3).

2. AMF selection by the gNB

When a UE connects, the gNB (NG-RAN) selects an AMF along the following lines (TS 23.501 §6.3.5).

flowchart TD
    Start["RRC connection from the UE
(RRCSetupRequest / RRCSetupComplete)"] --> Q1{"Does the UE present a 5G-S-TMSI
or GUAMI (registeredAMF)?"} Q1 -- "Yes" --> Q2{"Is the AMF for that GUAMI
connected and available?"} Q2 -- "Yes" --> A1["Select that AMF
(return to the AMF holding the context)"] Q2 -- "No" --> A2["Select another AMF in the same AMF Set
(or the backup AMF)"] Q1 -- "No (new UE)" --> A3["Narrow candidates by Requested NSSAI, etc.,
select in proportion to Relative AMF Capacity"]
  • When the UE has an existing identifier — The gNB identifies the previous AMF from the 5G-S-TMSI, assembled from the ng-5G-S-TMSI-Part1 in the RRCSetupRequest and the ng-5G-S-TMSI-Part2 in the RRCSetupComplete (Part2 = the upper 9 bits [the upper 9 bits of the AMF Set ID]; Part1 = the lower 39 bits [the least significant bit of the AMF Set ID, the AMF Pointer, and the 5G-TMSI]; TS 23.003 §2.10.1, TS 38.331 §6.2.2), or from the registeredAMF (the AMF Identifier and, where needed, the PLMN) in the RRCSetupComplete (TS 38.331 §6.2.2). Because the 5G-S-TMSI contains the AMF Set ID and the AMF Pointer, the short form alone is enough to identify the AMF (this assumes a configuration in which Set ID + Pointer is unique among the AMFs the gNB connects to; operation dependent).
  • For a new UE — The UE is distributed with a probability proportional to each AMF's Relative AMF Capacity (weight factor) (TS 23.501 §5.19.3 AMF Load Balancing; clause number to be confirmed).

The UE does not select the AMF

The UE only presents identifiers. It is NG-RAN that decides which AMF (which TNL association) to send to. The UE never learns the AMF's pod or IP address.

3. AMF failure and removal — GUAMI switchover

When an AMF is removed in a planned way, that AMF can notify the gNB of an Unavailable GUAMI List with AMF Status Indication (TS 38.413 §8.7.6). On a sudden failure the AMF itself may be unable to send it; how NG-RAN detects the failure and how other AMFs in the same Set handle it depend on TS 23.501 AMF Management (under §5.21.2; sub-clause to be confirmed) and on the implementation. For subsequent signaling of UEs with that GUAMI, the gNB is expected to select the AMF indicated by the Backup AMF Name notified in the NG Setup Response / AMF Configuration Update (or in the Unavailable GUAMI Item of the AMF Status Indication), or another AMF in the same AMF Set (TS 38.413 §8.7.6; TS 23.501 §5.21.2.2 / §5.21.2.3, sub-clauses to be confirmed. The exact selection method is NG-RAN implementation dependent).

sequenceDiagram
    participant UE
    participant gNB
    participant AMF1 as AMF-1 (to be removed)
    participant AMF2 as AMF-2 (same Set / backup)
    AMF1->>gNB: AMF Status Indication (Unavailable GUAMI List = GUAMI-1)
    Note over gNB: records GUAMI-1 as unavailable
    UE->>gNB: RRC connection (5G-S-TMSI → indicates GUAMI-1)
    gNB->>AMF2: Initial UE Message (to the backup AMF / an AMF in the same Set)
    Note over AMF2: can continue serving the UE if context
is shared within the Set (configuration dependent)

This is why the AMF Set matters as the unit of redundancy.

4. AMF re-allocation — when the first AMF was not appropriate

If the initial AMF selected by the gNB turns out not to support the UE's requested slices, etc., AMF re-allocation moves the UE to another AMF (or AMF Set) (TS 23.502 §4.2.2.2.3). There are two ways: the initial AMF forwards directly to the target AMF, or the NGAP Reroute NAS Request (TS 38.413 §8.6.5) tells the gNB where to resend the NAS message by specifying an AMF Set ID. In the latter, the AMF Set is the unit of forwarding.

5. The AMF Set in the SBI world

The AMF Set is not only an N2 concept. In the SBA (Service Based Architecture), the AMF publishes its AMF Set ID / AMF Region ID / GUAMI list in the NF profile it registers with the NRF (TS 29.510, AmfInfo type; clause number to be confirmed). Other NFs use this to search the NRF for "the AMF with this GUAMI" or "the AMFs of this AMF Set."

An AMF Set is also represented as an NF Set identifier in the following format (TS 23.003 §28.12).

set<AMF Set ID>.region<AMF Region ID>.amfset.5gc.mnc<MNC>.mcc<MCC>
flowchart LR
    subgraph RAN["RAN / NAS world"]
        G["GUAMI
Region / Set / Pointer"] end subgraph SBA["SBI world"] N["NF Profile (AmfInfo)
amfSetId / amfRegionId / guamiList"] F["NF Set ID
set..region..amfset.5gc..."] end G <-- "the same AMF Set in different notations" --> N N --- F

Watch out for notation differences in the Set ID

How the AMF Set ID (10 bits) is written as a string on the SBI (decimal/hexadecimal, number of digits) may follow different rules depending on the Release. Whether the notation matches across logs, configuration and NRF registrations is to be confirmed against the original text of TS 23.003 §28.12 and TS 29.571 for the target Release.


Packet Analysis (Wireshark)

Display filters

Filter Purpose
ngap All of N2. Check NG Setup Response / AMF Configuration Update / AMF Status Indication
nas-5gs Check the GUAMI inside the 5GS mobile identity (5G-GUTI) of the Registration Request
http2 SBI. Check the NF profile registration (AmfInfo) with the NRF

The numeric NGAP procedureCode values may be displayed differently depending on the dissector and version, so this page does not assert them. Checking message names in the GUI's protocol hierarchy is the reliable approach.

Decode example (conceptual)

The following is a conceptual representation of the display structure (capture needed). The values are a fictitious example with the test PLMN.

NGAP NGSetupResponse
 ├─ AMFName: amf-1.example
 ├─ ServedGUAMIList
 │   └─ ServedGUAMIItem
 │       ├─ GUAMI
 │       │   ├─ PLMN Identity: 001-01
 │       │   ├─ AMFRegionID: 0x01
 │       │   ├─ AMFSetID: 1
 │       │   └─ AMFPointer: 1
 │       └─ BackupAMFName: amf-2.example   (optional)
 ├─ RelativeAMFCapacity: 100
 └─ PLMNSupportList

What to look at

  1. Served GUAMI List — whether the Region / Set / Pointer match the design document, and whether there are duplicate announcements not in the design (unintended duplicates of the same GUAMI)
  2. Relative AMF Capacity — whether it has an unintended value (0 or extreme differences)
  3. Whether there is an AMF Status Indication — whether a GUAMI has been made unavailable due to removal or failure
  4. The GUAMI inside the UE's 5G-GUTI — "which AMF the UE is trying to return to." If the GUAMI does not exist, a 5G-GUTI from an old configuration may remain

Trouble Shooting — uneven load between AMFs

Suppose you see an extreme imbalance like this.

AMF-1 : UE 9000
AMF-2 : UE  100

Do not jump to "an AMF bug"; check from the outside in.

flowchart LR
    A["① N2 (SCTP) connection
gNB⇔each AMF"] --> B["② Is NG Setup
successful?"] B --> C["③ What the Served
GUAMI List announces"] C --> D["④ AMF Set / Region
configuration"] D --> E["⑤ Relative AMF
Capacity"] E --> F["⑥ UEs' existing
5G-GUTIs"] F --> G["⑦ RAN-side AMF
selection implementation"]
Symptom Likely cause Check point Logs Packets Resolution
New AMF added, but UEs don't come Existing UEs keep returning to the old AMF via the GUAMI in their 5G-GUTI. The new AMF mainly gets new UEs without an existing identifier Distribution of GUAMIs in UEs' 5G-GUTIs gNB AMF-selection logs nas-5gs (5GS mobile identity) Wait for time to pass, or use AMF load re-balancing (TS 23.501 §5.19.4 AMF Load re-balancing, to be confirmed; application is implementation dependent)
Imbalance only under some gNBs Some gNBs have N2 only to specific AMFs / NG Setup failure N2 connection state per gNB gNB/AMF SCTP/NGAP logs ngap (NG Setup) Restore N2 connections / NG Setup
Always skewed toward a specific AMF Different Relative AMF Capacity settings Values in NG Setup Response / AMF Configuration Update AMF configuration ngap Review the capacity settings
UEs still head to the removed AMF and fail Unavailable GUAMI not notified / backup AMF not configured AMF Status Indication, Backup AMF Name AMF/gNB logs ngap Review the removal procedure (to be verified)
Every 5G-GUTI registration results in an Identity Request GUAMI announcement does not match the actual AMF (misconfiguration), so the old AMF cannot be found, UE context retrieval fails, and the AMF falls back to Identity Request (TS 23.502 §4.2.2.2.2) Consistency between the Served GUAMI List and the NRF guamiList AMF/NRF logs ngap / http2 / nas-5gs (Identity Request) Align the GUAMI configuration

AMF Set ≠ load balancer

Configuring an AMF Set does not necessarily mean the gNB will distribute UEs evenly. The actual distribution is determined by the combination of the RAN's AMF selection logic, Relative AMF Capacity, the UEs' existing 5G-GUTIs, the gNB's N2 connection configuration and vendor-specific selection logic (implementation dependent).


Boundary between 3GPP specifications and vendor implementations

Defined by 3GPP Decided by vendors / operations
Formats and bit lengths of GUAMI / AMF Region ID / AMF Set ID / AMF Pointer Numbering policy for Region / Set / Pointer
Principles of AMF selection by NG-RAN; Relative AMF Capacity The concrete selection algorithm in the gNB
Served GUAMI List / Backup AMF Name / AMF Status Indication AMF pods, Kubernetes Services, LB VIPs, active/standby configuration
The idea of AMF Sets and UE context sharing (UDSF, etc.) How context sharing is implemented (DB, replication)
NF Set ID / AmfInfo in the NRF CLI configuration items and names

Comparison with EPC (4G)

Item 4G EPC 5GC
Identifier of the core control node GUMMEI = MCC + MNC + MMEGI + MMEC GUAMI = MCC + MNC + AMF Region ID + AMF Set ID + AMF Pointer
Node group MME pool (MME Group ID) AMF Region / AMF Set
Temporary UE ID GUTI = GUMMEI + M-TMSI 5G-GUTI = GUAMI + 5G-TMSI
Short ID on the radio interface S-TMSI = MMEC + M-TMSI 5G-S-TMSI = AMF Set ID + AMF Pointer + 5G-TMSI
Capacity-based distribution Relative MME Capacity (S1 Setup) Relative AMF Capacity (NG Setup)
Unit of redundancy MME pool AMF Set (designed for takeover by another AMF in the Set; how context is shared or transferred is configuration dependent)

Mapping between the 5G-GUTI and the 4G GUTI (interworking)

In 4G⇔5G interworking, the 5G-GUTI and the 4G GUTI are mapped to each other (TS 23.003 §2.10.2, sub-clause to be confirmed). The bit lengths are designed to match.

4G GUTI Bit length 5G-GUTI side
MME Group ID 16 bits AMF Region ID (8 bits) + upper 8 bits of the AMF Set ID
MME Code 8 bits Lower 2 bits of the AMF Set ID + AMF Pointer (6 bits)
M-TMSI 32 bits 5G-TMSI (32 bits)

When the UE presents a value mapped from a 4G GUTI, RRC distinguishes it with guami-Type (native / mapped) (TS 38.331 §6.2.2). For details, see 4G-5G Interworking.


3GPP Specification

Spec Clause Content
TS 23.003 §2.10.1 Structure and bit lengths of the 5G-GUTI / GUAMI / AMF Identifier
TS 23.003 §2.10.2 Mapping between the 5G-GUTI and the GUTI (sub-clause to be confirmed)
TS 23.003 §28.12 NF Set Identifier (notation of AMF Sets)
TS 23.501 §5.9.4 Definition of the 5G-GUTI / GUAMI
TS 23.501 §5.19.3 AMF Load Balancing (weight factor; clause number to be confirmed)
TS 23.501 §5.19.4 AMF Load re-balancing (clause number to be confirmed)
TS 23.501 §5.21.2.1 / §5.21.2.2 / §5.21.2.3 AMF Region / AMF Set definitions, planned removal, automatic recovery from failure (clause numbers to be confirmed)
TS 23.501 §6.3.5 AMF Discovery and Selection
TS 23.502 §4.2.2.2.3 Registration with AMF re-allocation
TS 38.413 §8.7.1 / §8.7.3 / §8.7.6 NG Setup / AMF Configuration Update / AMF Status Indication
TS 38.413 §8.6.5 Reroute NAS Request
TS 38.331 §6.2.2 RRCSetupRequest / RRCSetupComplete (ng-5G-S-TMSI-Part1 / Part2, registeredAMF, guami-Type)
TS 29.510 §to be confirmed AmfInfo in the NRF NF profile

Summary

  • GUAMI = MCC + MNC + AMF Region ID (8) + AMF Set ID (10) + AMF Pointer (6). It represents "which AMF(s), in which Set, in which Region, of which PLMN"
  • The AMF Set ID is unique within the Region, and the AMF Pointer points to one or more AMFs within the Set. One AMF may also have multiple GUAMIs
  • The AMF announces its address and capacity to the gNB with the Served GUAMI List / Relative AMF Capacity in the NG Setup Response
  • The gNB returns UEs to their previous AMF using the UE's 5G-S-TMSI / GUAMI, and distributes new UEs in proportion to Relative AMF Capacity
  • On AMF failure or removal, UEs are taken over via the Unavailable GUAMI List / backup AMF / same AMF Set. The AMF Set is the unit of redundancy, designed for takeover by another AMF in the Set (how context is shared or transferred is configuration dependent)
  • The AMF Set is a logical grouping in 3GPP and a different concept from a Kubernetes cluster, LB or DC

Comprehension check

Q1. Which field in the GUAMI individually identifies multiple AMFs belonging to the same PLMN, the same AMF Region and the same AMF Set? A. AMF Region ID / B. AMF Set ID / C. AMF Pointer / D. 5G-TMSI

Answer: C. AMF Pointer. The AMF Region ID identifies the Region, and the AMF Set ID identifies the Set within the Region. The 5G-TMSI is a UE-side temporary number outside the GUAMI (the second half of the 5G-GUTI). Note that, per the specification, the AMF Pointer may point to "one or more AMFs within the Set" (TS 23.501 §5.9.4).

Q2. Is it a contradiction for an AMF Set with AMF Set ID = 1 to exist in both Region 0x01 and Region 0x02?

No. Because the AMF Set ID is defined as unique within the AMF Region, the same Set ID may be used in different Regions. To identify an AMF Set globally, use the combination PLMN + AMF Region ID + AMF Set ID.

Q3. You added a new AMF to an AMF Set, but hardly any UEs are assigned to it. What should you suspect first?

Already registered UEs are returned to their previous AMF by the GUAMI contained in their 5G-GUTI / 5G-S-TMSI. Proportional distribution by Relative AMF Capacity mainly applies to new UEs without an existing identifier. Correcting the imbalance requires AMF load re-balancing mechanisms or time (how they are applied is implementation dependent).

Q4. When an AMF is removed in a planned way, what does the AMF notify over NGAP so that the gNB stops sending UEs to it?

It notifies an Unavailable GUAMI List with AMF Status Indication (TS 38.413 §8.7.6). For UEs with that GUAMI, the gNB is expected to select the AMF indicated by the Backup AMF Name notified in the NG Setup Response / AMF Configuration Update or the Unavailable GUAMI Item, or another AMF in the same AMF Set (the exact selection method is implementation dependent).


Next Step