百科全書
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 .