N21 — SMSF ⇔ UDM (SMS subscription data / SMSF registration)¶
Learning objectives¶
After reading this page, you will be able to:
- Explain that N21 is an SBI (Service Based Interface) and that its substance is the SMS-related part of the service Nudm (TS 29.503) provided by the UDM.
- Explain the flow in which the SMSF obtains SMS subscription data (SMS availability · SMS management data) from the UDM.
- Explain that the SMSF registers itself as the serving SMSF with the UDM, and that this becomes the foundation for downlink SMS routing.
- Explain the relationship in which it, paired with N20 (AMF⇔SMSF), supports SMS over NAS.
- Explain the correspondence with 4G (EPC) S6a/S6c (HSS ⇔ SMS-related systems).
Prerequisites¶
The following are helpful to understand first:
- The positioning of SBA / SBI and HTTP/2 · TLS → Protocol dictionary
- The NFs at both ends of N21 → SMSF / UDM
- How SMS over NAS · SMSF collaboration is used → N20
- The concept of interfaces and reference points → Interface dictionary
Why — why it is needed¶
To deliver SMS (short messages) in 5G, the SMSF needs to know "can this UE use SMS at all?" and "what SMS management data (settings) are associated with it?" However, the SMSF does not hold this information itself; the UDM, the authority on subscriber data, holds it.
Therefore, a route by which the SMSF queries the UDM "please give me this UE's SMS subscription information" is needed. This is N21. Furthermore, because the network needs to know "which SMSF is in charge of this UE" when downlink SMS (network→UE) arrives, the SMSF registers itself as the serving SMSF with the UDM. Without N21, the SMSF could not confirm SMS availability, and the UDM could not judge which SMSF to pass downlink SMS to.
Analogy: N21 is the counter where the post office (SMSF) confirms with and reports to the government office (UDM). The post office confirms at the office "is this person a resident who can receive mail (SMS subscription)?" and at the same time reports "the post office in charge of this person is us (SMSF registration)." Thereafter, the office can route arriving mail (downlink SMS) to the reported post office.
Overview¶
N21 is a reference point connecting SMSF ⇔ UDM. N21 is an SBI (Service Based Interface), and an SBI is a mechanism by which NFs call each other's services via Web APIs (HTTP), using HTTP/2 + JSON (RESTful) over TLS as the common transport.
The substance of N21 is the SMS-related part of the service Nudm (TS 29.503) provided by the UDM. Specifically, the SMSF obtains SMS subscription data (SMS availability · SMS management data) via SDM (Subscriber Data Management) and registers itself as the serving SMSF with the UDM via UECM (UE Context Management).
Reference point N21 and service Nudm are two views of the same thing
In 3GPP architecture diagrams, N21 (SMSF⇔UDM) is shown as a reference point, but in the SBA (service-based) view this is implemented in substance as the UDM service Nudm. In other words, "N21" and "Nudm (its SMS-related part)" are the same SMSF⇔UDM collaboration seen from the reference-point view and the service view. Both point to the same thing; only the name (viewpoint) differs.
N8/N10/N13/N21 are all Nudm (TS 29.503) but use different operations
The UDM provides the same Nudm (TS 29.503) to many NFs, but the operations used differ by reference point. Be careful not to confuse them.
- N8 (AMF⇔UDM): UECM/SDM (access & mobility subscription data, AMF registration)
- N10 (SMF⇔UDM): SDM (session management [SM] subscription data)
- N13 (AUSF⇔UDM): UEAuthentication (obtaining authentication information)
- N21 (SMSF⇔UDM): SDM (SMS subscription data) / UECM (SMSF registration)
Rather than "same Nudm, therefore same," distinguish them by which operation is used for what purpose.
Basic Concept — explanation for beginners¶
Let us compare N21 to an exchange between the post office (SMSF) and the government office (UDM).
To make your smartphone able to use SMS, the SMS-in-charge SMSF acts. Because the SMSF does not itself hold "does this person have a contract that can use SMS? what SMS settings are there?", it queries the UDM, which holds the subscriber roster (obtaining SMS subscription data = SDM). The UDM cross-references the roster and returns "SMS usable, with such management data attached."
Furthermore, the SMSF reports to the UDM "I am in charge of this UE" (SMSF registration = UECM). By doing so, when SMS later arrives from the network side to that UE, the UDM knows "the SMSF in charge is here" and can route the SMS to the correct SMSF (the foundation for downlink SMS routing).
This querying/reporting to the UDM is not a dedicated telephone line (a dedicated protocol like N2 or N4); it is more like throwing a request and getting a reply over an internal web system (HTTP). This is SBI (Service Based Interface) = the mechanism by which NFs converse via Web APIs (HTTP/2). Both request and response are exchanged in JSON, a format that is easy for humans to read.
Protocol / Transport¶
| Item | Content |
|---|---|
| Protocol | HTTP/2 + JSON (RESTful) — the common stack of SBI (Service Based Interface) |
| Service | Nudm (provided by UDM) — TS 29.503 (SMS-related part: SDM / UECM) |
| SBI framework | TS 29.500 / TS 29.501 family (common SBI conventions · OpenAPI definitions) |
| Lower transport | TCP, protected by TLS (confidentiality · integrity · authentication) — TS 33.501 |
| Port | The SBI listening port is implementation-dependent (resolved via the endpoint of NRF registration). No specific number is asserted |
| Characteristics | Not a dedicated L4 protocol but Web-technology based. Operated with HTTP methods (GET/PUT/POST/DELETE) + resource URIs. RESTful |
Not a dedicated L4, but Web-technology based
N2 has NGAP over SCTP:38412 and N4 has PFCP over UDP as dedicated lower protocols, but none of these apply to N21 at all. Because N21 is an SBI, like the other SBIs (N8/N10/N11/N20, etc.) it uses HTTP/2 over TLS as the common foundation. Therefore you must not repurpose SCTP-specific filters or port numbers for analyzing N21.
Architecture¶
This shows the context in which N21 connects SMSF and UDM, the SMSF collaborates with the AMF over N20, and the UDM stores subscription data in the UDR (N35).
flowchart LR
AMF["AMF"]
SMSF["SMSF"]
UDM["UDM (subscription data)"]
UDR[("UDR (N35)")]
AMF -. "N20 (Namf / Nsmsf)" .- SMSF
SMSF == "N21 (Nudm: SDM / UECM)" ==> UDM
UDM -. "store" .- UDR
classDef ctrl fill:#efe,stroke:#3a3,stroke-width:2px;
class SMSF,UDM ctrl;
How to read the diagram: The thick line (==>) N21 is the SMSF⇔UDM collaboration (SBI/HTTP2); here the SMSF obtains SMS subscription data (SDM) from the UDM and registers itself as the serving SMSF (UECM). The left N20 (dashed) is the AMF⇔SMSF collaboration, the route that carries the uplink/downlink of SMS over NAS. The substance of the subscription data held by the UDM is stored in the UDR (N35). Note the division of roles: N21 is "the confirmation and registration that prepares the SMS prerequisites," and N20 is "the actual handover of SMS."
Procedures used¶
N21 is used when the SMSF activates the SMS service (brings up the UE's SMS usage).
- Obtaining SMS subscription data (SDM Get / Subscribe): The SMSF queries the UDM for the target UE's SMS subscription data (SMS availability · SMS management data). It may also Subscribe in order to receive subsequent change notifications.
- SMSF registration (UECM Registration): The SMSF registers itself as the serving SMSF with the UDM. This lets the UDM know "which SMSF handles this UE's SMS" and enables it to direct downlink SMS to that SMSF.
As a result, the UDM becomes able to route downlink SMS and confirm SMS subscription, and, paired with N20 (AMF⇔SMSF), supports SMS over NAS.
The exact message sequence, conditions, and IEs of each operation, and the details of the SMS registration procedure, follow the 3GPP specification (the SMS registration procedure of TS 23.502; clause numbers are to be confirmed). The details of the procedure are to be confirmed.
Main Messages¶
Because N21 is an SBI, messages take the form of HTTP method + resource operation (RESTful operations, not a procedureCode like NGAP). The representative service operations are as follows.
| Service operation | HTTP operation (conceptual example) | Purpose |
|---|---|---|
| Nudm_SDM_Get | GET (resource retrieval) | Obtain SMS subscription data (SMS availability · SMS management data) |
| Nudm_SDM_Subscribe | POST (subscription resource creation) | Subscribe to SMS subscription data change notifications |
| Nudm_UECM_Registration | PUT (registration resource creation/update) | Register itself as the serving SMSF with the UDM |
The HTTP operation mapping is a conceptual arrangement: The "HTTP operation" in the table above is a mapping for understanding; the exact method, resource URI, and invocation direction of each operation follow the OpenAPI definition of TS 29.503. The strict method assignment is to be confirmed. For details of each message, refer to the Message dictionary.
Packet Analysis (Wireshark)¶
Because N21 is an SBI, it is observed on capture as HTTP/2 (an L4-dedicated protocol like NGAP/SCTP does not appear).
| Purpose | Display Filter |
|---|---|
| Extract HTTP/2 messages | http2 |
| Narrow by header path (conceptual) | http2.headers.path (the :path includes nudm-sdm / nudm-uecm) |
| View the JSON body | json (after decryption) |
Decode highlights:
- N21 is encrypted with TLS. To see the contents (HTTP/2 headers and JSON body), a decryption key (TLS session keys, etc.) is required. Without the key, it is only visible as the encrypted payload of
tls. - If you can decrypt, you can identify the operation from the HTTP/2 headers (
:method= GET/PUT, etc., the:pathincludes a resource path containing.../nudm-sdm/...or.../nudm-uecm/...) (the exact path is to be confirmed). - The body is JSON (SMS subscription data, SMSF registration information, etc.), stored in a human-readable structure.
- Unlike N2's NGAP (binary, over SCTP), the point of observation for N21 is that it is Web-like (HTTP/JSON). Do not use SCTP-specific filters (
sctp.port, etc.).
Comparison with EPC¶
- In 4G: Management of SMS subscription information and location information (which node is in charge of the UE) was handled by the HSS (Home Subscriber Server), which collaborated with surrounding nodes over Diameter/MAP-based interfaces such as S6a (MME⇔HSS) and S6c (HSS⇔SMS-related systems).
- In 5G: The HSS's SMS subscription and registration functions were inherited by the UDM, and SMSF collaboration was turned into an SBI as N21 (Nudm). It has been replaced from Diameter/MAP to HTTP/2 + JSON (SBI) (TS 29.503).
| 4G (EPC) | 5G (5GC) |
|---|---|
| S6c / S6a (HSS ⇔ SMS-related systems) | N21 (SMSF ⇔ UDM) |
| Diameter / MAP (over dedicated L4) | SBI: HTTP/2 + JSON over TLS |
| — (respective Diameter/MAP specifications) | TS 29.503 (Nudm) |
| HSS (embeds SMS subscription · location management) | UDM (provides SMS subscription data · accepts SMSF registration) |
The SMS subscription management and serving-node registration functions that 4G's HSS was responsible for correspond, in 5G, to UDM + N21 (the strict correspondence to 4G interfaces is to be confirmed). The main change in 5G is that the Diameter/MAP-based dedicated IF was turned into an SBI (HTTP/2+JSON).
3GPP Specification¶
- 3GPP TS 29.503 — Nudm service (SMS-related part: SDM [obtaining SMS subscription data] · UECM [SMSF registration], N21). Individual clause numbers are to be confirmed
- 3GPP TS 29.500 / TS 29.501 — SBI framework (technical conventions / design principles · OpenAPI). Individual clause numbers are to be confirmed
- 3GPP TS 23.501 §6.2.13 — Definition of the SMSF / §6.2.7 — Definition of the UDM
- 3GPP TS 23.502 — SMS registration procedure (flow of SMSF registration · obtaining SMS subscription data). Individual clause numbers are to be confirmed
- 3GPP TS 33.501 — SBI security (TLS, etc.). Individual clause numbers are to be confirmed
Note (to be confirmed): That the substance of N21 is the SMS-related part of Nudm (TS 29.503), and that the common SBI framework is the TS 29.500/29.501 family, are general arrangements of the 3GPP architecture. The exact methods, resource URIs, and detailed procedure clause numbers of each service operation differ by Release, so they are individually to be confirmed. Note that N8/N10/N13 are also the same Nudm (TS 29.503), but the operations used differ.
Summary¶
- N21 is a reference point connecting SMSF ⇔ UDM and is an SBI (Service Based Interface) (HTTP/2 + JSON over TLS).
- Over N21, the SMSF obtains SMS subscription data (SMS availability · SMS management data) from the UDM (SDM) and registers itself as the serving SMSF (UECM).
- Its substance is the SMS-related part of the UDM service Nudm (TS 29.503). Through SMSF registration, the UDM can direct downlink SMS to the correct SMSF, becoming the foundation for downlink SMS routing.
- Paired with N20 (AMF⇔SMSF), it supports SMS over NAS (N21 = preparing the SMS prerequisites, N20 = the handover of SMS).
- It corresponds to 4G's S6a/S6c (HSS⇔SMS-related systems, Diameter/MAP); in 5G it was turned into an SBI (TS 29.503) (the correspondence is to be confirmed).
Next Step¶
- SMSF — one end of N21. The NF responsible for SMS over NAS
- UDM — the other side of N21. The NF that provides SMS subscription data and accepts SMSF registration
- N20 — AMF⇔SMSF. Paired with N21, supports SMS over NAS
- N8 — an example that is the same Nudm but differs in purpose with UECM/SDM (access & mobility)
- Interface dictionary — check reference points