{%hackmd @ninoagus/rkG8Y3Mfp %} # OAI 5G end-to-end Build and Deployment (Simulator RU & UE) ## 1. Introduction  This guide will walk you through the process of build the OAI 5G component and deploy them to form an end-to-end to 5G network. ### 1.1 Resources The necessary resources for this build are listed below. | Author | Context | Link | | --------- | -------------------------- | -------------------------------------------------------------------- | | Open5Gs | How to Deploy Open5Gs | [Quick Start](https://open5gs.org/open5gs/docs/guide/01-quickstart/) | | @ninoagus | How to Deploy this Project | [Github Repo](https://github.com/motangpuar/osc_task_01) | ## 2. Build ### 2.1 Setup Environment #### 2.1.1 Operating System ```=console (09:36:38) ± [infidel@ma-oai] ~/.../etc/nr-sa-split6 (main U:3 ?:3 ✗) neofetch .-/+oossssoo+/-. infidel@ma-oai `:+ssssssssssssssssss+:` -------------- -+ssssssssssssssssssyyssss+- OS: Ubuntu 22.04.2 LTS x86_64 .ossssssssssssssssssdMMMNysssso. Host: VMware20,1 None /ssssssssssshdmmNNmmyNMMMMhssssss/ Kernel: 5.15.0-88-generic +ssssssssshmydMMMMMMMNddddyssssssss+ Uptime: 10 days, 1 hour, 5 mins /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Packages: 838 (dpkg), 4 (snap) .ssssssssdMMMNhsssssssssshNMMMdssssssss. Shell: bash 5.1.16 +sssshhhyNMMNyssssssssssssyNMMMysssssss+ Resolution: 1024x768 ossyNMMMNyMMhsssssssssssssshmmmhssssssso Terminal: /dev/pts/0 ossyNMMMNyMMhsssssssssssssshmmmhssssssso CPU: Intel Xeon Gold 5218 (8) @ 2.294GHz +sssshhhyNMMNyssssssssssssyNMMMysssssss+ GPU: 00:0f.0 VMware SVGA II Adapter .ssssssssdMMMNhsssssssssshNMMMdssssssss. Memory: 2363MiB / 7936MiB /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/ +sssssssssdmydMMMMMMMMddddyssssssss+ /ssssssssssshdmNNNNmyNMMMMhssssss/ .ossssssssssssssssssdMMMNysssso. -+sssssssssssssssssyyyssss+- `:+ssssssssssssssssss+:` .-/+oossssoo+/-. ``` #### 2.1.2 5G Core Network I use `open5Gs` core network for this end-to-end setup, with the neccessary parameters are as the following: - AMF Controplane listened on IP `10.30.1.110/24` port `38412` - UPF Userplane listened on IP `10.30.1.110/24` port `2152` - UPF subscribe subnet of `10.45.0.0/16` - Registered PLMN **20899** - The UE simulator IMSI, KI, and OPC registered on the HSS  ### 2.2 Build OAI from Source Code 1. Clone Openairinterface5g ```bash= sudo apt install git cmake build-essentials # Fetch the OpenAirInterface source code git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git ``` 2. Build the source code ```bash= cd openairinterface5g # Initialize the necessary environment variables source oaienv cd cmake_targets/ ./build_oai -I --gNB --nrUE -w SIMU ```  3. Check the compiled binary ```bash= # Make sure the binaries are exist at ran_build ls ran_build/build/ ```  ## 3. Deployment Deploy and integrate the RAN components to form an end-to-end 5G. ### 3.1 Deployment Plan #### 3.1.1 CU | Purpose | Interface | IP | Port | |:------- | ---------- | ---------------- | ----- | | N1 & N2 | ens33 | 10.30.1.109 | 38472 | | N3 | tun_cu-upf | 192.168.34.12/24 | 2152 | | F1 | tun_cu-du | 192.168.35.12/24 | --- | #### 3.1.2 DU & RFsim | Purpose | Interface | IP | Port | |:------- | --------- | ---------------- | ---- | | F1 | tun_du-cu | 192.168.35.13/24 | --- | | RFSIM | tun_rf-ue | 192.168.36.13/24 | | #### 3.1.3 UE | Purpose | Interface | IP | Port | |:------- | --------- | ---------------- | ---- | | F1 | tun_du-cu | 192.168.35.13/24 | --- | | RFSIM | tun_rf-ue | 192.168.36.13/24 | | ### 3.2 Configuration The configuration files used by **CU**, **DU**, and **UE** are contained on this project's [Github Repo](https://github.com/motangpuar/osc_task_01) #### 3.2.1 CU ```diff --- gnb.cu.conf 2023-11-14 05:32:00.762401494 +0000 +++ /home/infidel/openairinterface5g/ci-scripts/conf_files/gnb-cu.sa.band78.106prb.conf 2023-10-16 15:28:56.391959216 +0000 @@ -1,30 +1,30 @@ -Active_gNBs = ("gnb-cu-01"); +Active_gNBs = ( "cu-rfsim"); # Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "info"; +Asn1_verbosity = "none"; Num_Threads_PUSCH = 8; gNBs = ( { ////////// Identification parameters: - gNB_ID = 0xe01; + gNB_ID = 0xe00; # cell_type = "CELL_MACRO_GNB"; - gNB_name = "gnb-cu-01"; + gNB_name = "cu-rfsim"; // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 0xa000; - plmn_list = ({ mcc = 208; mnc = 95; mnc_length = 2; snssaiList = ({ sst = 222, sd = 0x7b }) }); + tracking_area_code = 1; + plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1, sd = 0xffffff }) }); nr_cellid = 12345678L; tr_s_preference = "f1"; - local_s_if_name = "tun_cu-du"; - local_s_address = "192.168.35.12"; - remote_s_address = "192.168.35.13"; + local_s_if_name = "eth0"; + local_s_address = "192.168.71.140"; + remote_s_address = "192.168.71.142"; local_s_portc = 501; local_s_portd = 2153; remote_s_portc = 500; @@ -40,7 +40,7 @@ (09:02:52) ± [infidel@ma-oai] ~/.../etc/nr-sa-split6 (main U:3 ?:3 ✗) colordiff -u ~/openairinterface5g/ci-scripts/conf_files/gnb-cu.sa.band78.106prb.conf gn gnb.cu.conf gnb.du.conf (09:02:52) ± [infidel@ma-oai] ~/.../etc/nr-sa-split6 (main U:3 ?:3 ✗) colordiff -u ~/openairinterface5g/ci-scripts/conf_files/gnb-cu.sa.band78.106prb.conf gnb. gnb.cu.conf gnb.du.conf (09:02:52) ± [infidel@ma-oai] ~/.../etc/nr-sa-split6 (main U:3 ?:3 ✗) colordiff -u ~/openairinterface5g/ci-scripts/conf_files/gnb-cu.sa.band78.106prb.conf gnb.cu.conf --- /home/infidel/openairinterface5g/ci-scripts/conf_files/gnb-cu.sa.band78.106prb.conf 2023-10-16 15:28:56.391959216 +0000 +++ gnb.cu.conf 2023-11-14 05:32:00.762401494 +0000 @@ -1,30 +1,30 @@ -Active_gNBs = ( "cu-rfsim"); +Active_gNBs = ("gnb-cu-01"); # Asn1_verbosity, choice in: none, info, annoying -Asn1_verbosity = "none"; +Asn1_verbosity = "info"; Num_Threads_PUSCH = 8; gNBs = ( { ////////// Identification parameters: - gNB_ID = 0xe00; + gNB_ID = 0xe01; # cell_type = "CELL_MACRO_GNB"; - gNB_name = "cu-rfsim"; + gNB_name = "gnb-cu-01"; // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1, sd = 0xffffff }) }); + tracking_area_code = 0xa000; + plmn_list = ({ mcc = 208; mnc = 95; mnc_length = 2; snssaiList = ({ sst = 222, sd = 0x7b }) }); nr_cellid = 12345678L; tr_s_preference = "f1"; - local_s_if_name = "eth0"; - local_s_address = "192.168.71.140"; - remote_s_address = "192.168.71.142"; + local_s_if_name = "tun_cu-du"; + local_s_address = "192.168.35.12"; + remote_s_address = "192.168.35.13"; local_s_portc = 501; local_s_portd = 2153; remote_s_portc = 500; @@ -40,7 +40,7 @@ ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.71.132"; + amf_ip_address = ( { ipv4 = "192.168.70.132"; ipv6 = "192:168:30::17"; active = "yes"; preference = "ipv4"; @@ -49,11 +49,10 @@ NETWORK_INTERFACES : { - - GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; - GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.71.140"; - GNB_INTERFACE_NAME_FOR_NGU = "eth0"; - GNB_IPV4_ADDRESS_FOR_NGU = "192.168.71.140"; + GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; + GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.1"; + GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; + GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.1"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; } @@ -77,13 +76,14 @@ }; log_config : { - global_log_level ="info"; - hw_log_level ="info"; - phy_log_level ="info"; - mac_log_level ="info"; + global_log_level ="debug"; + hw_log_level ="debug"; + phy_log_level ="debug"; + mac_log_level ="debug"; rlc_log_level ="debug"; - pdcp_log_level ="info"; - rrc_log_level ="info"; - f1ap_log_level ="debug"; - ngap_log_level ="debug"; + pdcp_log_level ="debug"; + rrc_log_level ="debug"; + f1ap_log_level ="debug"; + ngap_log_level ="debug"; }; + ``` #### 3.2.2 DU Configuration ```diff --- /home/infidel/openairinterface5g/ci-scripts/conf_files/gnb-du.sa.band78.106prb.rfsim.conf 2023-10-16 15:28:56.391959216 +0000 +++ gnb.du.conf 2023-11-09 17:04:11.063005118 +0000 @@ -1,4 +1,4 @@ -Active_gNBs = ( "du-rfsim"); +Active_gNBs = ( "gnb-du-02"); # Asn1_verbosity, choice in: none, info, annoying Asn1_verbosity = "none"; @@ -6,15 +6,15 @@ ( { ////////// Identification parameters: - gNB_ID = 0xe00; + gNB_ID = 0xe02; # cell_type = "CELL_MACRO_GNB"; - gNB_name = "du-rfsim"; + gNB_name = "gnb-du-02"; // Tracking area code, 0x0000 and 0xfffe are reserved values - tracking_area_code = 1; - plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1, sd = 0xffffff }) }); + tracking_area_code = 0xa000; + plmn_list = ({ mcc = 208; mnc = 95; mnc_length = 2; snssaiList = ({ sst = 222, sd = 0x7b }) }); nr_cellid = 12345678L; @@ -168,15 +168,16 @@ num_cc = 1; tr_s_preference = "local_L1"; tr_n_preference = "f1"; - local_n_if_name = "eth0"; - local_n_address = "192.168.71.142"; - remote_n_address = "192.168.71.140"; + local_n_if_name = "tun_du-cu"; + local_n_address = "192.168.35.13"; + remote_n_address = "192.168.35.12"; local_n_portc = 500; local_n_portd = 2153; remote_n_portc = 501; remote_n_portd = 2153; pusch_TargetSNRx10 = 200; pucch_TargetSNRx10 = 200; + ulsch_max_frame_inactivity = 1; } ); @@ -191,7 +192,7 @@ ); RUs = ( - { + { local_rf = "yes" nb_tx = 1 nb_rx = 1 @@ -223,7 +224,7 @@ IQfile = "/tmp/rfsimulator.iqs" } - log_config : +log_config : { global_log_level ="info"; hw_log_level ="info"; @@ -231,7 +232,8 @@ mac_log_level ="info"; rlc_log_level ="info"; pdcp_log_level ="info"; - rrc_log_level ="info"; + rrc_log_level ="debug"; f1ap_log_level ="debug"; ngap_log_level ="debug"; }; + ``` ## 4. Testing & Validation 1. **RUN Open5Gs** The whole service of Open5Gs is managed through Linux's service so you can use `systemd` or `service` command to bring up your 5GC. ```bash= sudo systemctl start open5gs-smfd # SMF sudo systemctl start open5gs-amfd # AMF sudo systemctl start open5gs-upfd # UPF sudo systemctl start open5gs-hssd # HSS sudo systemctl start open5gs-pcrfd sudo systemctl start open5gs-nrfd sudo systemctl start open5gs-scpd sudo systemctl start open5gs-seppd sudo systemctl start open5gs-ausfd sudo systemctl start open5gs-udmd sudo systemctl start open5gs-pcfd sudo systemctl start open5gs-nssfd sudo systemctl start open5gs-bsfd sudo systemctl start open5gs-udrd sudo systemctl start open5gs-webui # WEB UI ``` 1. **RUN gNB-CU** ```bash= sudo {...your_build_path}/nr-softmodem -O etc/gnb.cu.conf --sa --rfsim --log_config.global_log_options level,nocolor,time ``` Flags used | Arguments | Remarks | |:--------------:|:--------------------------- | | `--rfsim` | Use simulated RF Logic | | `--sa` | Run as Standalone mode | | `--log_config` | Control the log shown by CU | 2. **RUN gNB-DU & rfSIM** ```bash= sudo {...your_build_path}/nr-softmodem -O etc/gnb.du.conf --sa --rfsim --log_config.global_log_options level,nocolor,time ``` | Arguments | Remarks | |:--------------:|:--------------------------- | | `--rfsim` | Use simulated RF Logic | | `--sa` | Run as Standalone mode | | `--log_config` | Control the log shown by DU | 2. **RUN gNB-UE** ```bash= sudo {...your_build_path}/nr-uesoftmodem -O etc/nr-ue.conf --sa --rfsim -r 106 --numerology 1 -C 3619200000 --nokrnmod --log_config.global_log_options level nocolor time ``` | Arguments | Remarks | |:--------------:|:--------------------------- | | `--rfsim` | Use simulated RF Logic | | `--sa` | Run as Standalone mode | | `--log_config` | Control the log shown by DU | Testing the RAN connection of signaling and userplane.  ### 4.1 Control Plane This part is where I validate the end-to-end controlplane connection between the OAI RAN components. #### 4.1.1 Backhaul (NGAP) 1. SCTP Socket  3. Wireshark  #### 4.1.2 Midhaul (F1AP) 1. SCTP socket  2. Wireshark  #### 4.1.3 Fronthaul This build use simulator mode of the `oai/openairinterface5g` so one way to make sure that the fronthaul setup is correct is to check the port 4043 is on the `LISTEN` state and will be used by UE to connect into the gNB.  This parameter is configured under the follwing section on `gNB.du.conf`. ```bash= #... rfsimulator: { serveraddr = "server"; serverport = "4043"; options = (); #("saviq"); or/and "chanmod" modelname = "AWGN"; IQfile = "/tmp/rfsimulator.iqs" } #... ``` #### 4.1.4 Air Interface (Simulator) 1. `nr-softmodem`  2. TCP socket  The air interface connection between UE and RFsim is emulated through tcp socket, that's why you will have an established tcp connection between the `nr-softmodem` and `nr-uesoftmodem` if your RFsim is connected properly with the UEsim. 3. UE Attach Request & Response  ### 4.2 Dataplane An end-to-end connection of 5G setup should shows a successfull PDU and GTP tunnel traffic. 1. RFsim  2. PDU Session  A success attach procedure should shows that the core network successfully finished the `UEContextSetupRequest` from UE and give UE dataplane IP. 3. GTP Tunnel  Ping test from UE simulator to UPF node through GTP Tunnel.  Captured gtp traffic ## 5. Conclusion :::info **Test Finished** - [x] Backhaul (NGAP) Connection - [x] Midhaul (F1AP) Connection - [x] Fronthaul (Simulator) - [x] Air Interface (Simulator) - [x] UE Dataplane :::
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up