# 5. Explanations on the configuration in the `docker-compose.yaml` #
## 5.1. Making the NR-UE connect to the core network ##
The NR-UE **SHALL** be provisioned in the core network, especially in the `SQL` database and in the `AMF`.
* in AMF section of `docker-compose.yaml` --> `OPERATOR_KEY=c42449363bbad02b66d16bc975d77cc1`
* in NR-UE section --> `OPC: 'C42449363BBAD02B66D16BC975D77CC1'
Both values shall match!
This value is also present in the `oai_db.sql` file:
```bash
INSERT INTO `users` VALUES ('208990100001100','1','55000000000000',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0xfec86ba6eb707ed08905757b1bb44b8f,0,0,0x40,'ebd07771ace8677a',0xc42449363bbad02b66d16bc975d77cc1);
```
As you can see, 2 other values shall match in the NR-UE section of `docker-compose.yaml`:
* `FULL_IMSI: '208990100001100'`
* `FULL_KEY: 'fec86ba6eb707ed08905757b1bb44b8f'`
We are also using a dedicated `oai-smf.conf` for the `SMF` container: the `oai` DNN shall match the one in the NR-UE section of `docker-compose.yaml` (`DNN: oai`).
## 5.2. Making the gNB connect to the core network ##
Mainly you need to match the PLMN in `gNB`, `AMF` and `SPGWU` parameters:
- The `-I` option is to install pre-requisites, you only need it the first time you build the softmodem or when some oai dependencies have changed.
- The `-I` option is to install pre-requisites, you only need it the first time you build the softmodem or when some oai dependencies have changed. Note: for Ubuntu 20 use cmake_targets/install_external_packages.ubuntu20 instead!
- The `-w` option is to select the radio head support you want to include in your build. Radio head support is provided via a shared library, which is called the "oai device" The build script creates a soft link from `liboai_device.so` to the true device which will be used at run-time (here the USRP one,`liboai_usrpdevif.so` . USRP is the only hardware tested today in the Continuous Integration process. The RF simulator[RF simulator](../targets/ARCH/rfsimulator/README.md) is implemented as a specific device replacing RF hardware, it can be specifically built using `-w SIMU` option, but is also built during any softmodem build.
-`--eNB` is to build the `lte-softmodem` executable and all required shared libraries
-`--gNB` is to build the `nr-softmodem` executable and all required shared libraries
- Sequence number management, SDU dicard and in-order delivery
- Radio bearer establishment/handling and association with PDCP entities
- Interfaces with RRC, RLC
**UE RRC**
* Integration of RRC messages and procedures supporting UE 5G SA connection according to 38.331 Rel.16
- RRCSetupRequest/RRCSetup/RRCSetupComplete
- RRC Uplink/Downlink Information transfer carrying NAS messages transparently
- RRC Reconfiguration/Reconfiguration complete
- Support for master cell group configuration
* Interface with PDCP: configuration, DCCH and CCCH message handling
* Interface with RLC and MAC for configuration
**UE NAS**
* Transfer of NAS messages between the AMF and the UE supporting the UE registration with the core network and the PDU session establishment according to 24.501 Rel.16
- Identity Request/Response
- Authentication Request/Response
- Security Mode Command/Complete
- Registration Request/Accept/Complete
- PDU Session Establishment Request/Accept
- NAS configuration and basic interfacing with RRC
End-to-end control plane signaling to achieve a 5G SA connection, UE registration and PDU session establishment with the CN, as well as some basic user-plane traffic tests have been validated so far using the Quectel module and Huawei Mate 30 pro and partially validated with SIMCOM module. In terms of interoperability with different 5G Core Networks, so far this setup has been tested with:
End-to-end control plane signaling to achieve a 5G SA connection, UE registration and PDU session establishment with the CN, as well as some basic user-plane traffic tests have been validated so far using SIMCOM/Quectel modules and Huawei Mate 30 pro. In terms of interoperability with different 5G Core Networks, so far this setup has been tested with:
@@ -23,20 +45,57 @@ At the moment of writing this document interoperability with the following COTS
-[Free CN](https://www.free5gc.org/)
## 1.1 gNB build and configuration
At the moment of writing this document, most of the code to support the SA setup is not merged into develop branch yet, but it is accessible through the following branches:
- NR_SA_F1AP_5GRECORDS
- develop-NR_SA_F1AP_5GRECORDS (up-to-date with latest develop branch)
./build_oai -I-w USRP #For OAI first time installation only to install software dependencies
./build_oai --gNB-w USRP
```
A reference configuration file for the gNB is provided [here](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop-NR_SA_F1AP_5GRECORDS/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf).
A reference configuration file for the gNB is provided [here](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf).
In the following, we highlight the fields of the file that have to be configured according to the configuration and interfaces of the Core Network. First, the PLMN section has to be filled with the proper values that match the configuration of the AMF and the UE USIM.
...
...
@@ -63,13 +122,15 @@ Then, the source and destination IP interfaces for the communication with
the Core Network also need to be set as shown below.
```bash
////////// MME parameters:
////////// AMF parameters:
amf_ip_address =({ ipv4 ="192.168.70.132";
ipv6 ="192:168:30::17";
active ="yes";
preference ="ipv4";
}
);
NETWORK_INTERFACES :
{
GNB_INTERFACE_NAME_FOR_NG_AMF ="demo-oai";
...
...
@@ -81,19 +142,44 @@ the Core Network also need to be set as shown below.
```
In the first part (*amf_ip_address*) we specify the IP of the AMF and in the second part (*NETWORK_INTERFACES*) we specify the gNB local interface with AMF (N2 interface) and the UPF (N3 interface).
**CAUTION:** the `192.168.70.132` AMF IF address is the OAI-CN5G `AMF` Container IP address. You certainly will need to do some networking manipulations for the `gNB` server to be able to see this AMF container.
Please read [CN5G tutorial for more details](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/blob/master/README.md).
### **gNB configuration in CU/DU split mode**
For the configuration of the gNB in CU and DU blocks the following sample configuration files are provided for the CU and DU entities respectively.
......
At the point of writing this document the control-plane exchanges between the CU and the DU over *F1-C* interface have been validated. The integration of *F1-U* over gtp-u for the support of data plane traffic is ongoing.
For the configuration of the gNB in CU and DU blocks, the following sample configuration files are provided for the [CU](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF/cu_gnb.conf) and the [DU](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/targets/PROJECTS/GENERIC-NR-5GC/CONF/du_gnb.conf) entities respectively. These configuration files have to be updated with the IP addresses of the CU and the DU over the F1 interface. For example, in the following section from the DU configuration file, *local_n_address* corresponds to the DU address and *remote_n_address* corresponds to the CU address:
```bash
MACRLCs =(
{
num_cc = 1;
tr_s_preference ="local_L1";
tr_n_preference ="f1";
local_n_if_name ="lo";
local_n_address ="127.0.0.3";
remote_n_address ="127.0.0.4";
local_n_portc = 601;
local_n_portd = 2152;
remote_n_portc = 600;
remote_n_portd = 2152;
}
);
```
At the point of writing this document the control-plane exchanges between the CU and the DU over *F1-C* interface, as well as some IP traffic tests over *F1-U* have been validated using the OAI gNB/nrUE in RFSIMULATOR mode.
*These extensions are not yet fully integrated into develop branch, as they are under merge request. Until they get fully integrated, the CU/DU functionalities can be tested in [NR_F1C_F1U_extensions](https://gitlab.eurecom.fr/oai/openairinterface5g/-/tree/NR_F1C_F1U_extensions) branch.*
## 1.2 OAI 5G Core Network installation and configuration
The instructions for the installation of OAI CN components (AMF, SMF, NRF, UPF) using docker compose can be found [here](https://gitlab.eurecom.fr/oai/cn5g). Below are some complementary instructions which can be useful for the deployment.
The instructions for the installation of OAI CN components (AMF, SMF, NRF, UPF) using `docker-compose` can be found [here](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/blob/master/README.md).
## 1.3 Execution of SA scenario
## 1.3 Execution of SA scenario
After having configured the gNB, we can start the individual components in the following sequence:
- Launch Core Network
- Launch 5G Core Network
- Launch gNB
- Launch COTS UE (disable airplane mode)
...
...
@@ -103,60 +189,92 @@ cd cmake_targets/ran_build/build
The SA setup with OAI UE has been validated with RFSIMULATOR for the moment. The control plane for the successful UE registration and PDU Session establishment has been verified with OAI and Nokia SA Box CNs. User-plane traffic validation after the establishment of the 5G connection is still pending for this setup.
# 2. SA Setup with OAI NR UE Softmodem
The SA setup with OAI UE has been validated with **RFSIMULATOR**. Both control plane and user plane for the successful UE registration and PDU Session establishment has been verified with OAI and Nokia SA Box CNs.
In the following, we provide the instructions on how to build, configure and execute this SA setup.
### NAS configuration for the OAI UE
The NAS configuration parameters of the OAI UE can be set as input parameters, configuration file or can be hardcoded. More specifically:
- SUCI (*Subscription Concealed Identifier*)
- USIM_API_K and OPc keys
- NSSAI (*Network Slice Assistance Information*)
- DNN (*Data Network Name*)
Below is a sample configuration file that can be parsed through the execution command ([section 2.3](#23-execution-of-sa-scenario)).
```bash
uicc0 ={
imsi ="208990000007487";
key ="fec86ba6eb707ed08905757b1bb44b8f";
opc="C42449363BBAD02B66D16BC975D77CC1";
dnn="oai";
nssai_sst=1;
nssai_sd=1;
}
```
Alternatively, the values can be hardcoded/edited in source file ***openair3/UICC/usim_interface.c*** through the following lines:
For interoperability with OAI or other CNs, it should be ensured that the configuration of the aforementioned parameters match the configuration of the corresponding subscribed user at the core network.
## 2.1 Build and configuration
To build the gNB and OAI UE executables:
```bash
cd cmake_targets
./build_oai -I#For OAI first time installation only to install software dependencies
# Note: For OAI first time installation please install software dependencies as described in 1.1.
./build_oai --gNB--nrUE-w SIMU
```
The gNB configuration can be performed according to what is described in section 1.1, using the same reference configuration file as with the RF scenario.
The gNB configuration can be performed according to what is described in [section 1.1](#11--gnb-build-and-configuration), using the same reference configuration file as with the RF scenario.
### NAS configuration for the OAI UE
At the moment, the NAS configuration parameters of the OAI UE are hardcoded in ***openair3/NAS/NR_UE/nr_nas_msg_sim.c***. More specifically:
## 2.2 OAI 5G Core Network installation and configuration
The instructions for the installation of OAI CN components (AMF, SMF, NRF, UPF) using `docker-compose` can be found [here](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed/-/blob/master/README.md).
- The SUCI (*Subscription Concealed Identifier*) corresponding to default IMSI 2089900007487 is hardcoded in functions *generateRegistrationRequest()* and *generateIdentityResponse()* through the following lines:
- The NSSAI (*Network Slice Assistance Information*) and DNN (*Data Network Name*) are hardcoded in function *generatePduSessionEstablishRequest()*
```bash
uint8_t nssai[]={1,0,0,1}; //Corresponding to SST:1, SD:1
uint8_t dnn[4]={0x4,0x6f,0x61,0x69}; //Corresponding to dnn:"oai"
```
For interoperability with OAI or other CNs, it should be ensured that the configuration of the aforementioned parameters match the configuration of the corresponding subscribed user at the core network.
Hardcoding of the USIM information will soon be substituted with parsing those parameters from a configuration file.
In addition, if you do not want to build anything, please have a look at [this tutorial](https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/develop/ci-scripts/yaml_files/5g_rfsimulator/README.md).
## 2.3 Execution of SA scenario
The order of starting the different components should be the same as the one described in [section 1.3](#13--execution-of-sa-scenario).
## 2.2 Execution of SA scenario
the gNB can be launched in 2 modes:
The order of starting the different components should be the same as the one described in section 1.3.
The IP address at the execution command of the OAI UE corresponds to the target IP of the gNB host that the RFSIMULATOR at the UE will connect to. In the above example, we assume that the gNB and UE are running on the same host so the specified address (127.0.0.1) is the one of the loopback interface.
#define CONFIG_HLP_IF_FREQ "IF frequency for RF, if needed"
#define CONFIG_HLP_IF_FREQ_OFF "UL IF frequency offset for RF, if needed"
#define CONFIG_HLP_DLSCH_PARA "number of threads for dlsch processing 0 for no parallelization\n"
#define CONFIG_HLP_OFFSET_DIV "Divisor for computing OFDM symbol offset in Rx chain (num samples in CP/<the value>). Default value is 8. To set the sample offset to 0, set this value ~ 10e6\n"