百科
2026-08-06 17:35:43

5GC如何发现并选择网络功能?

本文介绍5GC如何以NRF驱动的注册、服务发现、配置文件管理和基于参数的匹配机制,取代以DNS为主的网元选择方式,并覆盖服务化核心网中的主要网络功能。

贝克电信

5GC如何发现并选择网络功能?

在5G核心网中,AMF在发起流程之前不需要预先保存每一个AUSF或UDM实例的静态列表。它可以查询NRF,提交所需的选择上下文,并获得合适目标网络功能的配置文件。从表面上看,这只是流程上的变化,但其背后反映了更深层的架构转变:5GC从静态节点查找转向动态、基于服务的发现机制。

5GC网络功能发现与选择封面图,展示平静水面上方的5G设备
在5GC中,网络功能发现通过基于NRF的服务发现完成,而不再仅依赖传统的DNS查找逻辑。

架构转变:从DNS查找到NRF服务发现

在4G EPC中,网元发现与选择主要围绕MME相关流程展开。不同信令场景通过DNS采用不同形式的FQDN解析。例如,在附着或TAU过程中,新MME可以使用GUMMEI-FQDN查找旧MME;在切换过程中,源MME可以通过TAI-FQDN定位目标MME。同样,MME可以基于TAI-FQDN选择SGW,并基于APN-FQDN选择PGW。

这种模式在EPC中能够正常工作,但高度依赖静态配置。DNS记录需要提前准备,网络功能的地址、能力或部署状态发生变化时,必须人工更新。节点下线后,相关DNS数据也要同步清理。换言之,生命周期变化与发现数据相互关联,但主要依靠预配置的运维操作来维持。

对比项目4G EPC5GC
发现方式DNS查询NRF查询
接口协议DNSHTTP/2
注册方式静态预配置NF自主注册
信息更新修改DNS记录NF向NRF发送配置文件更新
注销方式删除DNS记录NF主动注销
服务范围主要用于MME相关选择适用于AMF、SMF、AUSF、UDM等主要核心网NF

随着5GC引入服务化架构,网络功能不再仅被视为拓扑中的固定节点,而是成为通过SBI开放能力的服务提供者。NRF充当可用NF实例及其支持服务的存储库和发现入口。因此,网络功能选择不再只依赖静态DNS规划,而是由当前注册在核心网中的NF配置文件动态驱动。

NF注册与发现:核心运行机制

5GC发现机制的运行逻辑可以理解为注册、配置文件维护和发现三个连续环节。新NF实例创建后,首先向NRF注册,NRF保存其实例配置文件。之后,当其他NF需要某项服务时,会查询NRF并获取合适的目标实例。

注册通常在新的虚拟化或云原生NF实例上线时触发。该实例调用Nnrf_NFManagement服务,并发送包含NF Profile的HTTP PUT请求。NRF接受后返回成功响应,并将该实例记录为可发现状态。保存的配置文件可以包括NF类型、IP地址、FQDN、支持的服务、PLMN信息、优先级、容量以及与切片相关的属性。

发现由实际信令流程触发。常见示例是AMF在注册与鉴权流程中选择AUSF。此时,AMF调用Nnrf_Discovery服务,并携带相关选择条件发送HTTP GET请求。NRF随后在已注册的NF配置文件中搜索,返回一个或多个匹配候选。请求方NF可利用返回的配置文件数据,与选定目标建立直接服务交互。

通过HTTP/2进行的5GC NF注册、发现与配置文件存储流程
新的网络功能通过Nnrf_NFManagement完成注册,请求方网络功能则通过Nnrf_Discovery查找合适的目标实例。

该模式的重要优势之一,是能够覆盖NF实例的完整生命周期。如果网络功能更改地址、扩充容量或更新支持能力,可通过HTTP PATCH发送配置文件更新;如果实例因维护、扩缩容调整或退役而退出,可通过HTTP DELETE主动注销。这样,发现数据库能够与网络实时状态保持一致,而无需依赖滞后的人工记录维护。

NF选择逻辑:关键参数与匹配规则

NRF不会随机返回目标实例。结果取决于请求方NF提供的选择输入。这些参数反映了相关流程中的服务上下文、用户上下文和网络部署逻辑。不同目标网络功能使用的关键条件也不相同。

目标NF主要选择输入
SMFDNN、S-NSSAI、PLMN ID及相关上下文
AUSF来自SUCI的MCC、MNC和路由指示符
AMFGUAMI和TAI
PCFDNN、SUPI范围及与会话相关的S-NSSAI
UDMSUPI及来自SUCI的路由指示符

这些输入并非随意设定,而是由不同网络功能的职责决定。选择SMF时,网络需要考虑访问的是哪个数据网络、会话属于哪个切片以及适用的PLMN上下文;选择AUSF或UDM时,用户身份及路由相关信息更为重要;而AMF选择则与GUAMI、TAI等移动性和区域标识紧密相关。

5GC网络功能选择输入与NRF匹配原则示意图
请求方NF提供发现输入,NRF根据NF类型、服务能力和上下文参数返回匹配候选。

这种基于参数的机制,是5GC比早期静态模型更容易扩展的重要原因之一。NRF维护可用服务提供者的结构化视图,请求方则表达自己实际需要哪类网络功能。发现过程由此从简单的名称解析,转变为具备上下文感知能力的匹配过程。

架构价值与关键结论

从EPC中的DNS节点选择转向5GC中的NRF服务发现,不只是协议变化,而是对核心网功能如何上线、更新、定位和使用的重新设计。注册、发现、更新和注销被纳入统一的运行模型。

从工程角度看,NRF不会代替其他网络功能执行具体服务。它的职责是维护可发现的NF配置文件,并在收到查询时返回合适的候选。实际服务交互仍然直接发生在请求方NF和所选目标NF之间。

这种角色分离十分关键。它使5GC能够支持动态部署、弹性扩缩容和更自动化的生命周期管理,同时保持服务调用高效并符合标准。从实际运行角度看,NRF是把服务化架构从概念转化为可落地机制的协调中心。

常见问题

NRF只保存地址,还是会保存更丰富的信息?

NRF保存的信息远不止地址。典型的NF Profile可包括NF类型、FQDN、支持的服务、容量、优先级、PLMN数据、切片相关信息,以及用于发现和策略感知匹配的其他属性。

发现过程中可以返回多个候选吗?

可以。根据请求内容和部署策略,NRF可以返回多个匹配的NF实例。随后由请求方网络功能或本地策略逻辑选择最合适的候选。

为什么HTTP/2在这一机制中很重要?

HTTP/2支持5GC采用的服务化接口模型,使网络功能之间能够进行标准化服务调用,并让发现流程与更广泛的SBA通信框架保持一致。

基于NRF的发现只适用于大型云原生核心网吗?

不是。集中式发现同样适用于较小规模部署,因为它能够提高一致性、减少静态配置工作,并简化后续扩容或架构演进。

推荐产品
目录
客服 电话
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 .