Add Multi-PLMN and Network Slicing Support#4
Open
kevin8023c wants to merge 5 commits intoOPENAIRINTERFACE:developfrom
Open
Add Multi-PLMN and Network Slicing Support#4kevin8023c wants to merge 5 commits intoOPENAIRINTERFACE:developfrom
kevin8023c wants to merge 5 commits intoOPENAIRINTERFACE:developfrom
Conversation
Extend F1AP protocol to support multiple PLMNs per cell: - Add served_plmn_list array in f1ap_served_cell_info_t - Update F1 Setup Request/Response encoding/decoding - Support per-PLMN slice configuration (S-NSSAI) - Update F1AP unit tests for multi-PLMN scenarios This allows DU to advertise multiple PLMNs to CU during F1 Setup, enabling MOCN (Multi-Operator Core Network) support. Files changed: - openair2/COMMON/f1ap_messages_types.h: Add num_plmn, served_plmn_list - openair2/F1AP/lib/f1ap_interface_management.c: Multi-PLMN encode/decode - openair2/F1AP/lib/f1ap_lib_common.c: Helper functions - openair2/F1AP/tests/f1ap_lib_test.c: Test updates
Add DU-side support for multiple PLMNs: - Read multi-PLMN configuration from config file - Generate SIB1 with multiple PLMN identities - Send multi-PLMN info to CU via F1 Setup Request - Temporarily disable strict PLMN matching in F1 Setup (TODO: implement subset check as suggested by Robert) Changes: - openair2/GNB_APP/gnb_config.c: Read PLMN list and per-PLMN slices - openair2/LAYER2/NR_MAC_gNB/*: Update SIB1 generation (get_SIB1_NR) - openair2/RRC/NR/rrc_gNB_du.c: Accept multi-PLMN in F1 Setup This enables gNB to broadcast multiple operator networks in SIB1.
Update CU to use the PLMN selected by UE instead of hardcoded plmn[0]: - In UE Context Setup Request, use ue_p->serving_plmn - This allows UE to register with its chosen PLMN from SIB1 list - Update NGAP and telnet handlers for PLMN selection Changes: - openair2/RRC/NR/rrc_gNB.c: Use ue_p->serving_plmn in UE Context Setup - openair3/NGAP/ngap_gNB_handlers.c: PLMN handling updates - common/utils/telnetsrv/telnetsrv_o1.c: Telnet PLMN config support This completes the CU-side multi-PLMN support for MOCN.
Add intelligent PLMN selection in UE based on IMSI: - Extract MCC/MNC from UE's IMSI (from UICC) - Match against PLMN list in SIB1 cellAccessRelatedInfo - Set selectedPLMN_Identity to matched PLMN index (1-based) - Fall back to first PLMN if no match found Implementation in nr_rrc_process_sib1(): - Parse IMSI string to get UE's home PLMN - Iterate through SIB1's plmn_IdentityInfoList - Compare MCC (3 digits) and MNC (2 or 3 digits) - Update rrc->selected_plmn_identity accordingly This fixes the PLMN selection bug where UE always used the first PLMN regardless of its IMSI, and enables proper MOCN operation where UE can select its home operator from multiple PLMNs broadcast by gNB. Files changed: - openair2/RRC/NR_UE/rrc_UE.c: Add PLMN matching logic
Add configuration examples and build system updates: - Update .gitignore to exclude build directory - Update build_oai script for telnet library compilation - Add multi-PLMN configuration example in gnb.conf - Update ue.conf with PLMN selection examples - Add ue2.conf for multi-UE testing scenarios Configuration changes demonstrate: - How to configure multiple PLMNs in gNB (e.g., 46011, 20893) - How to configure UE IMSI to match specific PLMN - How to set up multiple UEs with different operators Files changed: - .gitignore: Exclude build artifacts - cmake_targets/build_oai: Build script updates - targets/PROJECTS/GENERIC-NR-5GC/CONF/*.conf: Config examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements multi-PLMN support in OAI 5G NR, which is a prerequisite for MOCN scenarios.
Changes
gNB downlink: Add support for reading multiple PLMNs from gNB configuration file and broadcasting them in SIB1.
Simulated NR UE: Implement PLMN selection logic based on IMSI. UE now extracts MCC/MNC from its IMSI and selects the matching PLMN from the broadcast list.
F1AP data structure refactoring: Modified
f1ap_served_cell_info_tby removing the single slice list and addingserved_plmn_list, where each element contains a PLMN and its associated slices (plmn,num_nssai,nssai[MAX_NUM_SLICES]). Updated related logic including configuration file parsing, DU encoding, CU decoding, and utility functions.Testing: Tested with both single and dual simulated UEs (using namespace isolation and telnet). Successfully tested with dual PLMNs (46011 and 20893). Ping tests (
ping -I oaitun_ue1 10.10.4.2) successful, where 10.10.4.2 is the Data Network IP. Also tested with f1ap_lib_test.c.Bug fixes: Fixed some minor issues.
Test Setup
Setup:
