[PFCP] Fixed incorrect TLV names (#2887)

Fixed standards documentation that described incorrect TLV names.
This commit is contained in:
Sukchan Lee 2024-01-19 23:38:20 +09:00
parent 60691b02d2
commit 97e1b1bd30
7 changed files with 196 additions and 24 deletions

View File

@ -335,10 +335,29 @@ $ sudo systemctl restart open5gs-sgwud
#### Setup a 5G Core
You will need to modify your 5G AMF config to support your PLMN and TAC. The international test PLMN is 001/01, and the international private network PLMN is 999/99. You should stick to using either of these PLMNs unless you have been issued a PLMN by your national regulator. (This PLMN will need to be configured in your gNB).
You will need to modify the PLMN in your NRF and AMF config, and in case of AMF, further modify the TAC information. The international test PLMN is 001/01, and the international private network PLMN is 999/99. You should stick to using either of these PLMNs unless you have been issued a PLMN by your national regulator. (This PLMN will need to be configured in your gNB).
If you are aiming to connect an external gNB to your core, you will also need to change the NGAP bind address of the AMF **and** the GTPU bind address of the UPF. If you are running an gNB stack locally, you will not need to make these changes.
Modify [/etc/open5gs/nrf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/nrf.yaml.in) to set the Serving PLMN ID.
```diff
$ diff --git a/configs/open5gs/nrf.yaml.in b/configs/open5gs/nrf.yaml.in
index cd9e45feb..58e8cbbce 100644
--- a/configs/open5gs/nrf.yaml.in
+++ b/configs/open5gs/nrf.yaml.in
@@ -10,8 +10,8 @@ global:
nrf:
serving: # 5G roaming requires PLMN in NRF
- plmn_id:
- mcc: 999
- mnc: 70
+ mcc: 001
+ mnc: 01
sbi:
server:
- address: 127.0.0.10
```
Modify [/etc/open5gs/amf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/amf.yaml.in) to set the NGAP IP address, PLMN ID, TAC and NSSAI.
@ -404,6 +423,7 @@ index e78b018f1..35a54419e 100644
After changing config files, please restart Open5GS daemons.
```bash
$ sudo systemctl restart open5gs-nrfd
$ sudo systemctl restart open5gs-amfd
$ sudo systemctl restart open5gs-upfd
```

View File

@ -110,6 +110,26 @@ $ cd ../
##### 5G Core
Modify [install/etc/open5gs/nrf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/nrf.yaml.in) to set the NGAP IP address, PLMN ID, TAC and NSSAI.
```diff
$ diff --git a/configs/open5gs/nrf.yaml.in b/configs/open5gs/nrf.yaml.in
index cd9e45feb..58e8cbbce 100644
--- a/configs/open5gs/nrf.yaml.in
+++ b/configs/open5gs/nrf.yaml.in
@@ -10,8 +10,8 @@ global:
nrf:
serving: # 5G roaming requires PLMN in NRF
- plmn_id:
- mcc: 999
- mnc: 70
+ mcc: 001
+ mnc: 01
sbi:
server:
- address: 127.0.0.10
```
Modify [install/etc/open5gs/amf.yaml](https://github.com/{{ site.github_username }}/open5gs/blob/main/configs/open5gs/amf.yaml.in) to set the NGAP IP address, PLMN ID, TAC and NSSAI.
```diff

View File

@ -10,6 +10,119 @@ head_inline: "<style> .blue { color: blue; } </style>"
}
</style>
#### What to do if a FATAL occurs?
You may occasionally encounter a FATAL like the one below.
```
FATAL: s1ap_build_initial_context_setup_request: Assertion `E_RABToBeSetupListCtxtSUReq->list.count' failed. (../src/mme/s1ap-build.c:577)
01/19 22:01:49.169: [core] FATAL: backtrace() returned 10 addresses (../lib/core/ogs-abort.c:37)
./src/mme/open5gs-mmed(+0x8ef5e) [0x55f6f8a78f5e]
./src/mme/open5gs-mmed(+0x5910b) [0x55f6f8a4310b]
./src/mme/open5gs-mmed(+0xa4ea5) [0x55f6f8a8eea5]
./src/mme/open5gs-mmed(+0x88b65) [0x55f6f8a72b65]
/home/acetcom/Documents/git/open5gs/build/src/mme/../../lib/core/libogscore.so.2(ogs_fsm_dispatch+0x119) [0x7fc2362f4c2f]
./src/mme/open5gs-mmed(+0x9e99) [0x55f6f89f3e99]
/home/acetcom/Documents/git/open5gs/build/src/mme/../../lib/core/libogscore.so.2(+0x1199d) [0x7fc2362e599d]
/lib/x86_64-linux-gnu/libc.so.6(+0x94ac3) [0x7fc235a94ac3]
/lib/x86_64-linux-gnu/libc.so.6(+0x126850) [0x7fc235b26850]
[1] 41823 IOT instruction (core dumped) ./src/mme/open5gs-mmed
```
When a FATAL occurs, Open5GS automatically calls backtrace(), and from the address information it outputs, we can see in which source code this happened. Note the addresses 0x8ef5e, 0x5910b, 0xa4ea5, 0x88b65 in the output below. You can find those addresses in the following places.
```
./src/mme/open5gs-mmed(+0x8ef5e)
./src/mme/open5gs-mmed(+0x5910b)
./src/mme/open5gs-mmed(+0xa4ea5)
./src/mme/open5gs-mmed(+0x88b65)
```
And you can use the GDB tool to provide additional information. If you are in a Ubuntu environment, you can install GDB as shown below.
```
$ sudo apt install gdb
```
Then run gdb like below.
```
$ gdb ./src/mme/open5gs-mmed
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./src/mme/open5gs-mmed...
(gdb)
```
With the address 0x8ef5e, 0x5910b, 0xa4ea5, 0x88b65 that you remembered from above and the `list` command within the GDB prompt, you can find out in which source code the problem is occurring.
```
(gdb) list *0x8ef5e
0x8ef5e is in s1ap_build_initial_context_setup_request (../src/mme/s1ap-build.c:579).
574 emmbuf = NULL;
575 }
576
577 ogs_assert(E_RABToBeSetupListCtxtSUReq->list.count);
578
579 ie = CALLOC(1, sizeof(S1AP_InitialContextSetupRequestIEs_t));
580 ASN_SEQUENCE_ADD(&InitialContextSetupRequest->protocolIEs, ie);
581
582 ie->id = S1AP_ProtocolIE_ID_id_UESecurityCapabilities;
583 ie->criticality = S1AP_Criticality_reject;
(gdb) list *0x5910b
0x5910b is in nas_eps_send_attach_accept (../src/mme/nas-path.c:171).
166 * the MME shall delete the stored UE radio capability information
167 * or the UE radio capability ID, if any.
168 */
169 OGS_ASN_CLEAR_DATA(&mme_ue->ueRadioCapability);
170
171 s1apbuf = s1ap_build_initial_context_setup_request(mme_ue, emmbuf);
172 if (!s1apbuf) {
173 ogs_error("s1ap_build_initial_context_setup_request() failed");
174 return OGS_ERROR;
175 }
(gdb) list *0xa4ea5
0xa4ea5 is in mme_s11_handle_create_session_response (../src/mme/mme-s11-handler.c:436).
431 ogs_assert(OGS_OK ==
432 sgsap_send_location_update_request(mme_ue));
433 } else {
434 ogs_assert(OGS_PDU_SESSION_TYPE_IS_VALID(
435 session->paa.session_type));
436 r = nas_eps_send_attach_accept(mme_ue);
437 ogs_expect(r == OGS_OK);
438 ogs_assert(r != OGS_ERROR);
439 }
440
(gdb) list *0x88b65
0x88b65 is in mme_state_operational (../src/mme/mme-sm.c:552).
547 break;
548 case OGS_GTP2_CREATE_SESSION_RESPONSE_TYPE:
549 if (!gtp_message.h.teid_presence) ogs_error("No TEID");
550 mme_s11_handle_create_session_response(
551 xact, mme_ue, &gtp_message.create_session_response);
552 break;
553 case OGS_GTP2_MODIFY_BEARER_RESPONSE_TYPE:
554 if (!gtp_message.h.teid_presence) ogs_error("No TEID");
555 mme_s11_handle_modify_bearer_response(
556 xact, mme_ue, &gtp_message.modify_bearer_response);
(gdb)
```
Reporting this information to a github issue or discussion will help others troubleshoot the issue.
#### MME sends Attach reject(EMM-Cause:15) with Diameter error(Result-Code:3002)
If you see the Attach reject(EMM-Cause:15] with Diameter error(Result-Code:3002), it means that HSS is not running.

View File

@ -20,7 +20,7 @@
/*******************************************************************************
* This file had been created by pfcp-tlv.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2023-08-18 22:15:59.596820 by acetcom
* Created on: 2024-01-19 23:36:01.346970 by acetcom
* from 29244-h71-modified.docx
******************************************************************************/
@ -2369,17 +2369,6 @@ ogs_tlv_desc_t ogs_pfcp_tlv_desc_predefined_rules_name =
{ NULL }
};
ogs_tlv_desc_t ogs_pfcp_tlv_desc_mbs_session_n4mb_information =
{
OGS_TLV_VAR_STR,
"MBS Session N4mb Information",
OGS_PFCP_MBS_SESSION_N4MB_INFORMATION_TYPE,
0,
0,
sizeof(ogs_pfcp_tlv_mbs_session_n4mb_information_t),
{ NULL }
};
ogs_tlv_desc_t ogs_pfcp_tlv_desc_remove_mbs_unicast_parameters =
{
OGS_TLV_VAR_STR,
@ -4188,14 +4177,14 @@ ogs_tlv_desc_t ogs_pfcp_tlv_desc_mbs_session_n4mb_control_information =
}
};
ogs_tlv_desc_t ogs_pfcp_tlv_desc_mbs_session_n4_information =
ogs_tlv_desc_t ogs_pfcp_tlv_desc_mbs_session_n4mb_information =
{
OGS_TLV_COMPOUND,
"MBS Session N4 Information",
OGS_PFCP_MBS_SESSION_N4_INFORMATION_TYPE,
"MBS Session N4mb Information",
OGS_PFCP_MBS_SESSION_N4MB_INFORMATION_TYPE,
0,
0,
sizeof(ogs_pfcp_tlv_mbs_session_n4_information_t),
sizeof(ogs_pfcp_tlv_mbs_session_n4mb_information_t),
{
&ogs_pfcp_tlv_desc_multicast_transport_information,
NULL,
@ -4218,6 +4207,23 @@ ogs_tlv_desc_t ogs_pfcp_tlv_desc_mbs_session_n4_control_information =
}
};
ogs_tlv_desc_t ogs_pfcp_tlv_desc_mbs_session_n4_information =
{
OGS_TLV_COMPOUND,
"MBS Session N4 Information",
OGS_PFCP_MBS_SESSION_N4_INFORMATION_TYPE,
0,
0,
sizeof(ogs_pfcp_tlv_mbs_session_n4_information_t),
{
&ogs_pfcp_tlv_desc_mbs_session_identifier,
&ogs_pfcp_tlv_desc_area_session_id,
&ogs_pfcp_tlv_desc_f_teid,
&ogs_pfcp_tlv_desc_mbsn4resp_flags,
NULL,
}
};
ogs_tlv_desc_t ogs_pfcp_tlv_desc_dscp_to_ppi_control_information =
{
OGS_TLV_COMPOUND,

View File

@ -20,7 +20,7 @@
/*******************************************************************************
* This file had been created by pfcp-tlv.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2023-08-18 22:15:59.578047 by acetcom
* Created on: 2024-01-19 23:36:01.327925 by acetcom
* from 29244-h71-modified.docx
******************************************************************************/
@ -626,7 +626,6 @@ extern ogs_tlv_desc_t ogs_pfcp_tlv_desc_event_notification_uri;
extern ogs_tlv_desc_t ogs_pfcp_tlv_desc_notification_correlation_id;
extern ogs_tlv_desc_t ogs_pfcp_tlv_desc_reporting_flags;
extern ogs_tlv_desc_t ogs_pfcp_tlv_desc_predefined_rules_name;
extern ogs_tlv_desc_t ogs_pfcp_tlv_desc_mbs_session_n4mb_information;
extern ogs_tlv_desc_t ogs_pfcp_tlv_desc_remove_mbs_unicast_parameters;
extern ogs_tlv_desc_t ogs_pfcp_tlv_desc_mbs_session_identifier;
extern ogs_tlv_desc_t ogs_pfcp_tlv_desc_multicast_transport_information;
@ -733,8 +732,9 @@ extern ogs_tlv_desc_t ogs_pfcp_tlv_desc_l2tp_session_information;
extern ogs_tlv_desc_t ogs_pfcp_tlv_desc_created_l2tp_session;
extern ogs_tlv_desc_t ogs_pfcp_tlv_desc_pfcp_session_change_info;
extern ogs_tlv_desc_t ogs_pfcp_tlv_desc_mbs_session_n4mb_control_information;
extern ogs_tlv_desc_t ogs_pfcp_tlv_desc_mbs_session_n4_information;
extern ogs_tlv_desc_t ogs_pfcp_tlv_desc_mbs_session_n4mb_information;
extern ogs_tlv_desc_t ogs_pfcp_tlv_desc_mbs_session_n4_control_information;
extern ogs_tlv_desc_t ogs_pfcp_tlv_desc_mbs_session_n4_information;
extern ogs_tlv_desc_t ogs_pfcp_tlv_desc_dscp_to_ppi_control_information;
/* Message Descriptor */
@ -978,7 +978,6 @@ typedef ogs_tlv_octet_t ogs_pfcp_tlv_event_notification_uri_t;
typedef ogs_tlv_octet_t ogs_pfcp_tlv_notification_correlation_id_t;
typedef ogs_tlv_octet_t ogs_pfcp_tlv_reporting_flags_t;
typedef ogs_tlv_octet_t ogs_pfcp_tlv_predefined_rules_name_t;
typedef ogs_tlv_octet_t ogs_pfcp_tlv_mbs_session_n4mb_information_t;
typedef ogs_tlv_octet_t ogs_pfcp_tlv_remove_mbs_unicast_parameters_t;
typedef ogs_tlv_octet_t ogs_pfcp_tlv_mbs_session_identifier_t;
typedef ogs_tlv_octet_t ogs_pfcp_tlv_multicast_transport_information_t;
@ -1827,10 +1826,10 @@ typedef struct ogs_pfcp_tlv_mbs_session_n4mb_control_information_s {
ogs_pfcp_tlv_multicast_transport_information_t multicast_transport_information_for_n3mb_and_or_n19mb;
} ogs_pfcp_tlv_mbs_session_n4mb_control_information_t;
typedef struct ogs_pfcp_tlv_mbs_session_n4_information_s {
typedef struct ogs_pfcp_tlv_mbs_session_n4mb_information_s {
ogs_tlv_presence_t presence;
ogs_pfcp_tlv_multicast_transport_information_t multicast_transport_information;
} ogs_pfcp_tlv_mbs_session_n4_information_t;
} ogs_pfcp_tlv_mbs_session_n4mb_information_t;
typedef struct ogs_pfcp_tlv_mbs_session_n4_control_information_s {
ogs_tlv_presence_t presence;
@ -1839,6 +1838,14 @@ typedef struct ogs_pfcp_tlv_mbs_session_n4_control_information_s {
ogs_pfcp_tlv_multicast_transport_information_t multicast_transport_information;
} ogs_pfcp_tlv_mbs_session_n4_control_information_t;
typedef struct ogs_pfcp_tlv_mbs_session_n4_information_s {
ogs_tlv_presence_t presence;
ogs_pfcp_tlv_mbs_session_identifier_t mbs_session_identifier;
ogs_pfcp_tlv_area_session_id_t area_session_id;
ogs_pfcp_tlv_f_teid_t n19mb_dl_tunnel_id;
ogs_pfcp_tlv_mbsn4resp_flags_t mbsn4resp_flags;
} ogs_pfcp_tlv_mbs_session_n4_information_t;
typedef struct ogs_pfcp_tlv_dscp_to_ppi_control_information_s {
ogs_tlv_presence_t presence;
ogs_pfcp_tlv_dscp_to_ppi_mapping_information_t dscp_to_ppi_mapping_information;

View File

@ -327,7 +327,13 @@ ies.append({ "ie_type" : "LNS Address", "ie_value" : "LNS Address", "presence" :
group_list["Created L2TP Session"] = { "index" : "379", "type" : "279", "ies" : ies }
ies = []
ies.append({ "ie_type" : "Multicast Transport Information", "ie_value" : "Multicast Transport Information", "presence" : "C", "tlv_more" : "0", "comment" : "This IE shall be present to include a low layer source specific multicast address information (i.e. multicast destination address and related source IP address) and a GTP-U Common Tunnel EndPoint Identifier (C-TEID) if the CP function has requested to allocate such information for multicast transport over N3mb and/or N19mb."})
group_list["MBS Session N4 Information"] = { "index" : "403", "type" : "303", "ies" : ies }
group_list["MBS Session N4mb Information"] = { "index" : "403", "type" : "303", "ies" : ies }
ies = []
ies.append({ "ie_type" : "MBS Session Identifier", "ie_value" : "MBS Session Identifier", "presence" : "M", "tlv_more" : "0", "comment" : ""})
ies.append({ "ie_type" : "Area Session ID", "ie_value" : "Area Session ID", "presence" : "C", "tlv_more" : "0", "comment" : "This IE shall be present for a location dependent MBS service. When present, it shall contain the Area Session ID, which together with the MBS Session Identifier, uniquely identify the service area part of the content data of the MBS service. "})
ies.append({ "ie_type" : "F-TEID", "ie_value" : "N19mb DL Tunnel ID", "presence" : "C", "tlv_more" : "0", "comment" : "This IE shall be present when the SMF has requested the UPF to allocate a Local F-TEID in the PDI or in the Create Traffic Endpoint IE. (NOTE1)"})
ies.append({ "ie_type" : "MBSN4Resp-Flags", "ie_value" : "MBSN4Resp-Flags", "presence" : "C", "tlv_more" : "0", "comment" : "This IE shall be included if at least one of the flags is set to 1. NOTE2.- NN19DT (New N19mb Downlink Tunnel): the UPF shall set this flag if it has allocated a new N19mb DL TEID for the MBS session;- JMTI (Joined N19mb Multicast Tree Indication): the UPF shall set this flag if it has joined the multicast tree from the MB-UPF;- N19DTR (N19mb Downlink Tunnel Removal): the UPF shall set this flag if it is about to remove the N19mb DL Tunnel for receiving the MBS session data. "})
group_list["MBS Session N4 Information"] = { "index" : "411", "type" : "311", "ies" : ies }
ies = []
ies.append({ "ie_type" : "PDR ID", "ie_value" : "PDR ID", "presence" : "M", "tlv_more" : "0", "comment" : ""})
ies.append({ "ie_type" : "F-TEID", "ie_value" : "Local F-TEID", "presence" : "C", "tlv_more" : "0", "comment" : "If the UP function allocates the F-TEID, this IE shall be present and shall contain the local F-TEID to be used for this PDR."})