百科全书
2026-09-11 16:57:58
5GC核心网中带AMF重分配的初始注册流程
当最初选择的AMF无法服务UE所需网络切片时,5GC会进行AMF重分配。本文解析gNB初始选择、NSSF决策、Target AMF Set、NAS重路由以及注册完成流程。

贝克电信

5GC核心网中带AMF重分配的初始注册流程

Registration Request已经到达某个AMF,为什么注册过程中服务AMF仍然可能发生变化?这是否意味着gNB一开始选错了AMF?如果UE在Registration Request中没有携带Requested NSSAI,网络又是在什么阶段才能判断UE真正需要哪个网络切片?这些问题都指向5GC Initial Registration中的一个特殊分支:AMF重分配。工程讨论中经常将其称为“AMF重选”,但从3GPP流程角度看,更准确的理解是注册期间对AMF进行重新分配。

AMF重分配与普通Initial Registration的关键区别,并不在于增加了一次额外认证,也不是因为负载均衡而更换AMF。真正的过程是:Initial AMF获得更完整的签约与切片信息,发现自己无法服务UE最终需要的S-NSSAI,于是调用NSSF确定合适的AMF服务范围,并将正在进行的注册流程转交给Target AMF。

理解这条信令流程,最有效的方法不是死记AMF在第几步发生变化,而是连续跟踪三个决策点:gNB第一次选择AMF时掌握了哪些信息、Initial AMF在注册过程中又获得了哪些补充信息,以及NSSF最终依据什么条件把UE引导到新的服务AMF。

什么时候会触发AMF重分配?

带AMF重分配的Initial Registration并不是所有5GC注册的默认路径。它的触发条件比较明确:网络已经部署Network Slicing,而且最初接收Registration Request的AMF无法服务UE最终需要的网络切片。

在普通注册场景中,gNB选择的Initial AMF本身就支持所需S-NSSAI,因此身份处理、认证、订阅数据获取以及Registration Accept都可以在同一个AMF上完成。

只有当后续流程获得的新信息表明当前AMF与UE允许使用或默认应使用的切片不匹配时,才需要进行重分配。其逻辑可以概括为:

Registration Request到达Initial AMF
           → Initial AMF执行必要的注册处理
           → 获得完整的UE订阅与切片信息
           → Initial AMF判断自己无法服务目标S-NSSAI
           → 调用NSSF确定合适的服务范围
           → 注册流程转交给Target AMF

这里需要避免一个常见误解:同一条注册信令中出现两个AMF,并不自动意味着原AMF故障,也不代表发生了AMF Pool负载均衡。在这个流程中,真正的触发原因是当前AMF的切片服务能力与UE最终需要的网络切片不匹配

为什么gNB一开始可能选到不合适的AMF?

第一次分析AMF重分配时,很容易认为是gNB做出了错误选择。如果不同AMF分别服务不同切片,为什么RAN不能从一开始就把UE送到正确的AMF?

主要原因是gNB执行第一次AMF选择时,可能还没有足够的信息。假设一辆联网汽车第一次开机,所使用的5G USIM签约了两个网络切片:

  • eMBB切片(S-NSSAI1):用于车载信息娱乐和普通数据业务;

  • V2X切片(S-NSSAI3):用于车联网通信以及自动驾驶相关业务。

假设该用户的Default S-NSSAI是V2X切片,但UE第一次进入5GS,没有有效的5G-GUTI,并且Registration Request中也没有携带Requested NSSAI。此时,gNB没有直接依据判断UE最终应该由与V2X切片关联的AMF提供服务。

正常情况下,gNB在选择AMF时可以利用GUAMI、UE请求的S-NSSAI以及本地AMF配置等信息。但在这个场景中,GUAMI和Requested NSSAI都不可用,因此gNB只能依据当前已知信息以及本地默认选择策略,先选择一个Initial AMF。

如果gNB最初选择了服务eMBB切片的AMF1,Registration Request就会通过NGAP Initial UE Message被送到AMF1。

这个AMF最终与UE的切片需求不匹配,并不一定说明gNB配置错误。更准确的理解是:第一次选择AMF时,RAN尚未掌握足够信息来确定UE最终需要的特定切片AMF。

5GC初始注册中,UE没有5G-GUTI且Registration Request未携带Requested NSSAI,因此gNB只能依据当前可用信息和默认配置选择Initial AMF
5GC初始注册中,UE没有5G-GUTI且Registration Request未携带Requested NSSAI,因此gNB只能依据当前可用信息和默认配置选择Initial AMF

Initial AMF如何发现切片不匹配?

当Registration Request到达Initial AMF后,AMF并不会立即查询NSSF。此时它仍缺少足够的用户信息,无法判断自己是否就是最终正确的服务AMF。

AMF首先按照正常Initial Registration逻辑执行所需流程,包括UE身份处理、AUSF选择、5G-AKA Authentication以及相关NAS安全过程。

这一阶段的关键结果之一,是AMF确认UE身份并获得SUPI。有了SUPI之后,Initial AMF即可定位合适的UDM,并获取UE的Access and Mobility Subscription Data。

到这个阶段,网络掌握的信息已经远多于Registration Request刚到达时。UDM返回的订阅数据可以包含用户的Subscribed NSSAI和Default S-NSSAI。

继续使用联网汽车的场景:Initial AMF属于eMBB服务域,但订阅数据表明UE同时订阅了eMBB和V2X,而Default S-NSSAI指向V2X,也就是S-NSSAI3。

此时Initial AMF终于能够得出gNB先前无法得出的结论:虽然它可以接收并开始处理Initial Registration,但并不适合作为UE默认V2X切片的长期服务AMF。这个判断就是触发AMF重分配的关键点。

gNB阶段:只有有限的接入信息
           → Initial AMF阶段:UE身份得到确认
           → UDM阶段:获得实际签约的NSSAI信息
           → 发现当前AMF与目标切片不兼容

因此,AMF重分配并不是注册进行到一半时随意改变决定,而是核心网在用户身份和切片信息逐步完整后,能够做出更准确的服务AMF选择。

NSSF如何确定新的服务AMF?

当Initial AMF确认自己无法服务目标切片后,并不会自行随便选择另一个AMF,而是调用Network Slice Selection Function,也就是NSSF。

Initial AMF通过Nnssf_NSSelection服务发起Network Slice Selection请求。输入信息可以包括UE订阅的S-NSSAI、当前AMF信息以及UE当前TAI。目的在于确定当前注册区域允许使用哪些切片,以及应该由哪个AMF集合提供服务。

NSSF返回的Authorized Network Slice Information可能包括:

  • Allowed NSSAI:UE在当前条件下获准使用的网络切片;

  • Configured NSSAI:在需要时可以提供给UE的切片配置;

  • Target AMF Set:能够服务相关网络切片的AMF集合;

  • Rejected NSSAI:在当前TA或相关条件下无法接受的切片。

需要区分Target AMF Set和Target AMF。NSSF首先要做的是确定哪个AMF集合合适,也就是根据切片与位置条件缩小候选范围,而不是直接返回某一个具体AMF的地址。

获得Target AMF Set后,Initial AMF可以利用NRF中注册的NF实例信息,查询该集合中各AMF的地址、能力、权重和运行状态,再决定由哪个具体Target AMF接管Registration。

这几个网络功能之间的关系可以概括为:

UDM:提供UE的切片订阅信息
           → Initial AMF:判断自身服务能力不匹配
           → NSSF:确定授权切片和Target AMF Set
           → NRF:提供集合内可用AMF实例信息
           → Initial AMF:选择Target AMF

在这个流程中,NSSF的作用并不是传统意义上的负载均衡,而是把切片需求映射到能够满足该需求的AMF服务范围

5GC中的Initial AMF使用UE订阅的S-NSSAI和TAI调用NSSF,获取Allowed NSSAI与Target AMF Set,再结合NRF信息确定Target AMF
5GC中的Initial AMF使用UE订阅的S-NSSAI和TAI调用NSSF,获取Allowed NSSAI与Target AMF Set,再结合NRF信息确定Target AMF

Registration Request如何转交给Target AMF?

确定Target AMF之后,UE不需要重新发送一份全新的Registration Request。网络只需要把已经进行中的注册流程以及必要上下文转移过去,让新的AMF继续处理即可。

可使用两种转发机制:通过gNB间接转发,或者由Initial AMF与Target AMF之间直接转发。

通过gNB间接转发

在间接转发方式下,Initial AMF向gNB发送NGAP Reroute NAS Request。该消息携带与原始Initial UE Message相关的信息以及Target AMF Set ID,指示NG-RAN对当前NAS Registration消息进行重路由。

随后,gNB向Target AMF发送新的Initial UE Message,其中包含原始Registration Request NAS-PDU。控制面路径可以表示为:

UE → gNB → Initial AMF → Reroute NAS Request → gNB → Target AMF

UE不需要重新进行RRC接入。NG-RAN只是将现有的Registration NAS消息重新路由到合适的AMF。

AMF之间直接转发

在直接转发方式下,Initial AMF不会再把消息送回gNB,而是通过5GC服务化接口,将N1消息和Registration Context直接传给Target AMF。

Initial AMF调用Namf_Communication_N1MessageNotify,并把完整的Registration Request连同Registration Context Container一起发送给Target AMF。

被转移的信息并不只是一条NAS消息。Registration Context还可以包含UE Context、Access Type、gNB信息、User Location、Allowed NSSAI、Configured NSSAI、Rejected NSSAI以及继续处理注册所需的其他信息。

UE → gNB → Initial AMF → Namf_Communication_N1MessageNotify → Target AMF

两种信令路径不同,但目标相同:让Target AMF拿到继续Registration所需的NAS消息和上下文,而无需从头重新执行整个Initial Registration流程。

Target AMF接管后,会完成剩余的注册处理,并向UE返回Registration Accept。该响应反映切片选择和AMF重分配结果,可能包含Allowed NSSAI、Configured NSSAI、Rejected NSSAI以及新分配的5G-GUTI。

从UE角度看,最重要的结果是注册成功,网络返回当前区域可用的切片以及新的5GS移动性上下文。内部服务AMF的变化对UE基本透明。

5GC AMF重分配过程中,Initial AMF可通过NGAP Reroute NAS Request经gNB间接转发,也可通过Namf Communication N1MessageNotify把Registration Request直接传给Target AMF
5GC AMF重分配过程中,Initial AMF可通过NGAP Reroute NAS Request经gNB间接转发,也可通过Namf Communication N1MessageNotify把Registration Request直接传给Target AMF

如何在信令跟踪中确认AMF重分配?

带AMF重分配的Initial Registration很容易被误判为异常注册路由,或者被认为第一次AMF选择失败。更有效的排障方式不是逐条比较消息编号,而是沿着两条主线分析:切片如何确定,以及上下文如何转移。

一条正常的信令序列应该能够帮助工程师回答以下问题:

为什么Registration Request最先到达这个Initial AMF?
           → Initial AMF从哪里获得UE的Subscribed / Default NSSAI?
           → 什么原因使AMF判断自己无法继续服务UE?
           → NSSF返回的是哪个Target AMF Set?
           → 最终选择了哪个具体Target AMF?
           → Registration Context通过哪条路径转移?

如果Initial AMF已经获得切片订阅信息,也确认自己无法服务UE,但随后没有出现NSSF选择流程,排查重点应放在NSSF发现、Nnssf_NSSelection请求以及相关Slice配置上。

如果NSSF已经返回Target AMF Set,却无法确定具体Target AMF,接下来应检查AMF Set配置、NRF中的NF Profiles、AMF实例状态以及能力信息。

如果已经出现NGAP Reroute NAS Request,但Target AMF始终没有收到新的Initial UE Message,排障重点就应从切片选择转向gNB上的NAS重路由,以及到Target AMF的N2可达性。

如果使用直接转发,则应在跟踪中检查Namf_Communication_N1MessageNotify和Registration Context,而不是等待这条路径中本来就不会出现的Reroute NAS Request。

从完整流程来看,AMF重分配解决的是一个非常具体的问题:第一次选择AMF时可用信息不完整,而核心网在获得完整用户身份和切片订阅信息后,会重新修正服务AMF的选择结果。

UE刚进入网络时,gNB可能只掌握有限的GUAMI信息、Requested NSSAI信息或本地默认AMF配置。完成认证和订阅数据获取后,5GC才最终能够判断用户获准使用哪些切片。随后NSSF把Slice Requirement转换成Target AMF Set,NRF则帮助识别能够继续Registration的实际AMF实例。

因此,分析这条信令流程时,最有价值的问题不是“为什么注册进行到一半AMF突然变了?”,而是:网络是在什么阶段终于获得了足够的信息,可以确定究竟应该由哪个AMF继续为UE提供服务?

常见问题

AMF重分配与AMF Pool中的负载均衡相同吗?

不相同。AMF Pool负载均衡通常关注多个AMF实例之间的容量、权重和高可用分布;而这个流程中的AMF重分配,是因为Initial AMF无法服务UE最终需要的网络切片。两种机制最终都可能让UE使用不同的服务AMF,但触发条件和信令逻辑有本质区别。

部署Network Slicing后,每次都需要NSSF选择和AMF重分配吗?

不需要。即使网络已经部署Network Slicing,只要gNB最初选择的AMF已经能够服务UE最终需要的切片,就无需进行AMF重分配。重分配只是注册流程中的条件分支,并不是所有切片网络都必须执行的步骤。

UE能直接发现注册过程中AMF发生了变化吗?

从UE角度看,它主要关注Registration是否成功,以及网络返回哪些Allowed NSSAI、Configured NSSAI、Rejected NSSAI和5G-GUTI。AMF重分配和Registration Context转移属于5GC内部控制流程,对UE基本透明。

间接转发和直接转发哪一种一定更常见?

仅依据流程定义无法得出统一结论。实际采用哪种机制取决于5GC部署架构、厂商实现、AMF之间的服务化通信能力,以及RAN和核心网配置。实际排障应以现网中观察到的信令路径为准。

推荐产品
目录
客服 电话
We use cookie to improve your online experience. By continuing to browse this website, you agree to our use of cookie.

Cookies

This Cookie Policy explains how we use cookies and similar technologies when you access or use our website and related services. Please read this Policy together with our Terms and Conditions and Privacy Policy so that you understand how we collect, use, and protect information.

By continuing to access or use our Services, you acknowledge that cookies and similar technologies may be used as described in this Policy, subject to applicable law and your available choices.

Updates to This Cookie Policy

We may revise this Cookie Policy from time to time to reflect changes in legal requirements, technology, or our business practices. When we make updates, the revised version will be posted on this page and will become effective from the date of publication unless otherwise required by law.

Where required, we will provide additional notice or request your consent before applying material changes that affect your rights or choices.

What Are Cookies?

Cookies are small text files placed on your device when you visit a website or interact with certain online content. They help websites recognize your browser or device, remember your preferences, support essential functionality, and improve the overall user experience.

In this Cookie Policy, the term “cookies” also includes similar technologies such as pixels, tags, web beacons, and other tracking tools that perform comparable functions.

Why We Use Cookies

We use cookies to help our website function properly, remember user preferences, enhance website performance, understand how visitors interact with our pages, and support security, analytics, and marketing activities where permitted by law.

We use cookies to keep our website functional, secure, efficient, and more relevant to your browsing experience.

Categories of Cookies We Use

Strictly Necessary Cookies

These cookies are essential for the operation of the website and cannot be disabled in our systems where they are required to provide the service you request. They are typically set in response to actions such as setting privacy preferences, signing in, or submitting forms.

Without these cookies, certain parts of the website may not function correctly.

Functional Cookies

Functional cookies enable enhanced features and personalization, such as remembering your preferences, language settings, or previously selected options. These cookies may be set by us or by third-party providers whose services are integrated into our website.

If you disable these cookies, some services or features may not work as intended.

Performance and Analytics Cookies

These cookies help us understand how visitors use our website by collecting information such as traffic sources, page visits, navigation behavior, and general interaction patterns. In many cases, this information is aggregated and does not directly identify individual users.

We use this information to improve website performance, usability, and content relevance.

Targeting and Advertising Cookies

These cookies may be placed by our advertising or marketing partners to help deliver more relevant ads and measure the effectiveness of campaigns. They may use information about your browsing activity across different websites and services to build a profile of your interests.

These cookies generally do not store directly identifying personal information, but they may identify your browser or device.

First-Party and Third-Party Cookies

Some cookies are set directly by our website and are referred to as first-party cookies. Other cookies are set by third-party services, such as analytics providers, embedded content providers, or advertising partners, and are referred to as third-party cookies.

Third-party providers may use their own cookies in accordance with their own privacy and cookie policies.

Information Collected Through Cookies

Depending on the type of cookie used, the information collected may include browser type, device type, IP address, referring website, pages viewed, time spent on pages, clickstream behavior, and general usage patterns.

This information helps us maintain the website, improve performance, enhance security, and provide a better user experience.

Your Cookie Choices

You can control or disable cookies through your browser settings and, where available, through our cookie consent or preference management tools. Depending on your location, you may also have the right to accept or reject certain categories of cookies, especially those used for analytics, personalization, or advertising purposes.

Please note that blocking or deleting certain cookies may affect the availability, functionality, or performance of some parts of the website.

Restricting cookies may limit certain features and reduce the quality of your experience on the website.

Cookies in Mobile Applications

Where our mobile applications use cookie-like technologies, they are generally limited to those required for core functionality, security, and service delivery. Disabling these essential technologies may affect the normal operation of the application.

We do not use essential mobile application cookies to store unnecessary personal information.

How to Manage Cookies

Most web browsers allow you to manage cookies through browser settings. You can usually choose to block, delete, or receive alerts before cookies are stored. Because browser controls vary, please refer to your browser provider’s support documentation for details on how to manage cookie settings.

Contact Us

If you have any questions about this Cookie Policy or our use of cookies and similar technologies, please contact us at support@becke.cc .