Difference between revisions of "Open5gs: docker"

From OnnoWiki
Jump to navigation Jump to search
(Created page with "Sumber: https://github.com/herlesupreeth/docker_open5gs Quite contrary to the name of the repository, this repository contains docker files to deploy an Over-The-Air (OTA) o...")
 
 
(25 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Sumber: https://github.com/herlesupreeth/docker_open5gs
 
Sumber: https://github.com/herlesupreeth/docker_open5gs
  
 
+
Berbeda dengan nama repositorinya, repositori ini berisi file buruh docker untuk deploy jaringan 4G/5G simulasi Over-The-Air (OTA) atau RF menggunakan proyek berikut:
Quite contrary to the name of the repository, this repository contains docker files to deploy an Over-The-Air (OTA) or RF simulated 4G/5G network using following projects:
 
  
 
* Core Network (4G/5G) - open5gs - https://github.com/open5gs/open5gs
 
* Core Network (4G/5G) - open5gs - https://github.com/open5gs/open5gs
Line 12: Line 11:
 
* UERANSIM (5G) - https://github.com/aligungr/UERANSIM
 
* UERANSIM (5G) - https://github.com/aligungr/UERANSIM
  
==Tested Setup==
+
==Test Setup==
 +
 
 
Docker host machine
 
Docker host machine
 
* Ubuntu 20.04 or 22.04
 
* Ubuntu 20.04 or 22.04
  
Over-The-Air setups:
+
Over-The-Air (OTA) setup:
* srsRAN (eNB/gNB) using Ettus USRP B210
+
* srsRAN (eNB/gNB) menggunakan Ettus USRP B210
* srsRAN eNB using LimeSDR Mini v1.3
+
* srsRAN eNB menggunakan LimeSDR Mini v1.3
* srsRAN eNB using LimeSDR-USB
+
* srsRAN eNB menggunakan LimeSDR-USB
  
RF simulated setups:
+
RF simulasi setup:
* srsRAN (gNB + UE) simulation over ZMQ
+
* srsRAN (gNB + UE) simulasi menggunakan ZMQ
 
* UERANSIM (gNB + UE) simulator
 
* UERANSIM (gNB + UE) simulator
Build and Execution Instructions
 
Mandatory requirements:
 
docker-ce - Version 22.0.5 or above
 
docker-compose - Version 2.14 or above
 
  
Clone repository and build base docker image of open5gs, kamailio, ueransim
 
  
 +
Persyaratan wajib:
 +
docker-ce - Version 22.0.5 atau yang lebih tinggi
 +
docker-compose - Version 2.14 atau yang lebih tinggi
 +
 +
 +
==Setup IP Statik==
 +
 +
Edit
 +
 +
sudo su
 +
apt update
 +
apt -y install net-tools
 +
 +
 +
vi /etc/netplan/00-installer-config.yaml
 +
 +
Pastikan,
 +
 +
# This is the network config written by 'subiquity'
 +
# network:
 +
#  ethernets:
 +
#    enp0s31f6:
 +
#      dhcp4: true
 +
#  version: 2
 +
#
 +
 +
network:
 +
    version: 2
 +
    renderer: networkd
 +
    ethernets:
 +
        enp0s31f6:
 +
            addresses:
 +
                - 192.168.0.5/24
 +
            nameservers:
 +
                addresses: [8.8.8.8, 8.8.4.4]
 +
            routes:
 +
                - to: default
 +
                  via: 192.168.0.222
 +
 +
==Install docker==
 +
 +
Install pendukung
 +
 +
sudo apt update
 +
sudo apt upgrade
 +
sudo apt -y install apt-transport-https ca-certificates curl software-properties-common
 +
 +
Add GPG Key Docker Repo & Sources List
 +
 +
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
 +
 +
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
 +
 +
sudo apt update
 +
 +
Install
 +
 +
sudo apt -y install docker-ce docker-compose
 +
 +
 +
 +
 +
==Install==
 +
 +
Clone repositori dan buat image docker dari open5gs, kamailio, ueransim
 +
 +
sudo su
 +
cd /usr/local/src/
 
  git clone https://github.com/herlesupreeth/docker_open5gs
 
  git clone https://github.com/herlesupreeth/docker_open5gs
  cd docker_open5gs/base
+
  cd /usr/local/src/docker_open5gs/base
 
  docker build --no-cache --force-rm -t docker_open5gs .
 
  docker build --no-cache --force-rm -t docker_open5gs .
  
  cd ../ims_base
+
  cd /usr/local/src/docker_open5gs/ims_base
 
  docker build --no-cache --force-rm -t docker_kamailio .
 
  docker build --no-cache --force-rm -t docker_kamailio .
  
  cd ../srslte
+
  cd /usr/local/src/docker_open5gs/srslte
 
  docker build --no-cache --force-rm -t docker_srslte .
 
  docker build --no-cache --force-rm -t docker_srslte .
  
  cd ../srsran
+
  cd /usr/local/src/docker_open5gs/srsran
 
  docker build --no-cache --force-rm -t docker_srsran .
 
  docker build --no-cache --force-rm -t docker_srsran .
  
  cd ../ueransim
+
  cd /usr/local/src/docker_open5gs/ueransim
 
  docker build --no-cache --force-rm -t docker_ueransim .
 
  docker build --no-cache --force-rm -t docker_ueransim .
  
Build and Run using docker-compose
+
Build dan Run menggunakan docker-compose
 +
 
 +
sudo su
 +
apt-get install -y linux-tools-common linux-tools-6.2.0-32-generic linux-cloud-tools-6.2.0-32-generic linux-tools-generic linux-cloud-tools-generic
  
  cd ..
+
  cd /usr/local/src/docker_open5gs/
 
  set -a
 
  set -a
 
  source .env
 
  source .env
Line 57: Line 123:
 
  sudo sysctl -w net.ipv4.ip_forward=1
 
  sudo sysctl -w net.ipv4.ip_forward=1
 
  sudo cpupower frequency-set -g performance
 
  sudo cpupower frequency-set -g performance
 +
 +
==Deployment==
  
 
4G deployment
 
4G deployment
 +
 +
cd /usr/local/src/docker_open5gs/
  
 
  # 4G Core Network + IMS + SMS over SGs
 
  # 4G Core Network + IMS + SMS over SGs
Line 73: Line 143:
  
 
5G SA deployment
 
5G SA deployment
 +
 +
cd /usr/local/src/docker_open5gs/
  
 
  # 5G Core Network
 
  # 5G Core Network
Line 92: Line 164:
 
  docker-compose -f nr-ue.yaml up -d && docker container attach nr_ue
 
  docker-compose -f nr-ue.yaml up -d && docker container attach nr_ue
  
Configuration
+
==Konfigurasi==
For the quick run (eNB/gNB, CN in same docker network), edit only the following parameters in .env as per your setup
+
 
 +
Untuk quick run (eNB/gNB, CN berada dalam docker network yang sama), edit hanya parameter berikut di .env sesuai setup kita
 +
 
 +
cd /usr/local/src/docker_open5gs
 +
vi .env
 +
 
 +
Parametery yang di ubah,
 +
 
 +
* MCC
 +
* MNC
 +
* TEST_NETWORK --> Ubah ini hanya jika bentrok dengan jaringan internal di rumah/kantor Anda
 +
* DOCKER_HOST_IP --> Ini adalah alamat IP dari host yang menjalankan pengaturan docker Anda
 +
* SGWU_ADVERTISE_IP --> Ubah ini ke nilai DOCKER_HOST_IP yang ditetapkan di atas hanya jika eNB tidak menjalankan jaringan/host docker yang sama
 +
* UPF_ADVERTISE_IP --> Ubah ini ke nilai DOCKER_HOST_IP yang ditetapkan di atas hanya jika gNB tidak menjalankan jaringan/host docker yang sama
 +
* UE_IPV4_INTERNET --> Ubah ini ke rentang ip jaringan UE yang Anda inginkan (agar tidak konflik) untuk APN internet
 +
* UE_IPV4_IMS --> Ubah ini ke rentang ip jaringan UE yang Anda inginkan (agar tidak konflik) untuk ims APN
 +
 
 +
Jika eNB/gNB TIDAK berjalan di jaringan/host docker yang sama dengan host yang menjalankan Core/IMS yang melakukan docker, ikuti langkah-langkah tambahan di bawah ini
 +
 
 +
===Contoh .env===
 +
 
 +
vi /usr/local/src/docker_open5gs/.env
 +
 
 +
MCC=001
 +
MNC=01
 +
TEST_NETWORK=172.22.0.0/24
 +
DOCKER_HOST_IP=192.168.0.5
 +
UE_IPV4_INTERNET=10.45.0.0/24
 +
UE_IPV4_IMS=10.46.0.0/24
 +
# SGW
 +
SGWC_IP=172.22.0.5
 +
SGWU_IP=172.22.0.6
 +
SGWU_ADVERTISE_IP=172.22.0.6
 +
# SMF
 +
SMF_IP=172.22.0.7
 +
SMF_DNS1=8.8.8.8
 +
SMF_DNS2=8.8.4.4
 +
# UPF
 +
UPF_IP=172.22.0.8
 +
UPF_ADVERTISE_IP=172.22.0.8
 +
 
 +
Alternatif contoh
 +
 
 +
vi /usr/local/src/docker_open5gs/.env
  
  MCC
+
  MCC=999
  MNC
+
  MNC=70
  TEST_NETWORK --> Change this only if it clashes with the internal network at your home/office
+
  TEST_NETWORK=172.22.0.0/24
  DOCKER_HOST_IP --> This is the IP address of the host running your docker setup
+
  DOCKER_HOST_IP=192.168.0.5
  SGWU_ADVERTISE_IP --> Change this to value of DOCKER_HOST_IP set above only if eNB is not running the same docker network/host
+
UE_IPV4_INTERNET=10.45.0.0/24
  UPF_ADVERTISE_IP --> Change this to value of DOCKER_HOST_IP set above only if gNB is not running the same docker network/host
+
UE_IPV4_IMS=10.46.0.0/24
  UE_IPV4_INTERNET --> Change this to your desired (Not conflicted) UE network ip range for internet APN
+
# SGW
  UE_IPV4_IMS --> Change this to your desired (Not conflicted) UE network ip range for ims APN
+
SGWC_IP=172.22.0.5
 +
SGWU_IP=172.22.0.6
 +
  SGWU_ADVERTISE_IP=172.22.0.6
 +
# SMF
 +
SMF_IP=172.22.0.7
 +
SMF_DNS1=8.8.8.8
 +
SMF_DNS2=8.8.4.4
 +
# UPF
 +
UPF_IP=172.22.0.8
 +
  UPF_ADVERTISE_IP=172.22.0.8
 +
 +
# UERANSIM
 +
NR_GNB_IP=172.22.0.23
 +
NR_UE_IP=172.22.0.24
 +
 +
UE1_IMEI=356938035643803
 +
UE1_IMEISV=4370816125816151
 +
UE1_IMSI=999701234567895
 +
UE1_KI=11111111111111111111111111111111
 +
  UE1_OP=11111111111111111111111111111111
 +
  UE1_AMF=8000
  
If eNB/gNB is NOT running in the same docker network/host as the host running the dockerized Core/IMS then follow the below additional steps
+
===4G deployment===
  
4G deployment
+
Di bawah mme section di docker compose file (4g-volte-deploy.yaml), uncomment bagian berikut,
Under mme section in docker compose file (4g-volte-deploy.yaml), uncomment the following part
 
  
 
  ...
 
  ...
Line 114: Line 248:
 
  ...
 
  ...
  
Then, uncomment the following part under sgwu section
+
Kemudian, uncomment bagian berikut di bawah sgwu section
  
 
  ...
 
  ...
Line 121: Line 255:
 
  ...
 
  ...
  
5G SA deployment
+
===5G SA deployment===
Under amf section in docker compose file (sa-deploy.yaml), uncomment the following part
+
 
 +
Di bawah amf section di docker compose file (sa-deploy.yaml), uncomment bagian berikut,
  
 
  ...
 
  ...
Line 129: Line 264:
 
  ...
 
  ...
  
Then, uncomment the following part under upf section
+
Kemudian, uncomment bagian berikut dibawah upf section
  
 
  ...
 
  ...
Line 136: Line 271:
 
  ...
 
  ...
  
Provisioning of SIM information
+
==Provisioning SIM information==
Provisioning of SIM information in open5gs HSS as follows:
+
 
Open (http://<DOCKER_HOST_IP>:3000) in a web browser, where <DOCKER_HOST_IP> is the IP of the machine/VM running the open5gs containers. Login with following credentials
+
Provisioning SIM information di open5gs HSS sebagai berikut:
 +
 
 +
* Buka (http://<DOCKER_HOST_IP>:3000) di web browser, dimana <DOCKER_HOST_IP> adalah IP dari machine/VM yang menjalankan open5gs container. Login dengan credential berikut,
  
 
  Username : admin
 
  Username : admin
 
  Password : 1423
 
  Password : 1423
  
Using Web UI, add a subscriber
+
* Gunakan Web UI, tambahkan subscriber
 +
 
 +
Provisioning IMSI dan MSISDN dengan OsmoHLR sebagai berikut,
 +
 
 +
* Pertama-tama, login ke osmohlr container
  
Provisioning of IMSI and MSISDN with OsmoHLR as follows:
+
docker exec -it osmohlr /bin/bash
First, login to the osmohlr container
 
docker exec -it osmohlr /bin/bash
 
Then, telnet to localhost
 
  
  $ telnet localhost 4258
+
* Kemudian, telnet ke localhost
 +
 
 +
  telnet localhost 4258
  
 
  OsmoHLR> enable
 
  OsmoHLR> enable
 
  OsmoHLR#
 
  OsmoHLR#
  
Finally, register the subscriber information as in following example:
+
* Akhirnya, register subscriber information contoh berikut,
  
 
  OsmoHLR# subscriber imsi 001010123456790 create
 
  OsmoHLR# subscriber imsi 001010123456790 create
 
  OsmoHLR# subscriber imsi 001010123456790 update msisdn 9076543210
 
  OsmoHLR# subscriber imsi 001010123456790 update msisdn 9076543210
  
Replace IMSI and MSISDN as per your programmed SIM
+
* Ganti IMSI dan MSISDN seperti SIM yang kita program.
  
Provisioning of SIM information in pyHSS is as follows:
+
Provisioning SIM information di pyHSS sebagai berikut,
Goto http://172.22.0.18:8080/docs/
+
 
Select apn -> Create new APN -> Press on Try it out. Then, in payload section use the below JSON and then press Execute
+
* Akses  http://172.22.0.18:8080/docs/
 +
* Pilih apn -> Create new APN -> Press Try it out. Kemudian, di payload section gunakan contoh JSON berikut dan tekan Execute
  
 
  {
 
  {
Line 172: Line 313:
 
  }
 
  }
  
Take note of apn_id specified in Response body under Server response for internet APN
+
* Catat apn_id yang di set di Response body dibawah Server response untuk internet APN
 
+
* Ulangi creation step untuk payload berikut,
Repeat creation step for following payload
 
  
 
  {
 
  {
Line 182: Line 322:
 
  }
 
  }
  
Take note of apn_id specified in Response body under Server response for ims APN
+
* Catat apn_id yang di set di Response body dibawah Server response untuk ims APN
 
+
* Execute this step of APN creation only once
Execute this step of APN creation only once
 
  
Next, select auc -> Create new AUC -> Press on Try it out. Then, in payload section use the below example JSON to fill in ki, opc and amf for your SIM and then press Execute
+
Selanjutnya, select auc -> Create new AUC -> Press Try it out. Kemudian, di payload section gunakan contoh JSON berikut untuk mengisi ki, opc dan amf untuk SIM dan press Execute
  
 
  {
 
  {
Line 196: Line 335:
 
  }
 
  }
  
Take note of auc_id specified in Response body under Server response
+
* Catat auc_id yang di set di Response body dibawah Server response
 
+
* Ganti imsi, ki, opc dan amf sesuai yang kita ingin program ke SIM
Replace imsi, ki, opc and amf as per your programmed SIM
 
  
Next, select subscriber -> Create new SUBSCRIBER -> Press on Try it out. Then, in payload section use the below example JSON to fill in imsi, auc_id and apn_list for your SIM and then press Execute
+
Selanjutnya, select subscriber -> Create new SUBSCRIBER -> Press Try it out. Selanjutnya, di payload section gunakan contoh JSON berikut untuk mengisi in imsi, auc_id dan apn_list untuk SIM dan press Execute
  
 
  {
 
  {
Line 213: Line 351:
 
  }
 
  }
  
auc_id is the ID of the AUC created in the previous steps
+
* auc_id adalah ID untuk AUC dibuat di tahap sebelumnya.
default_apn is the ID of the internet APN created in the previous steps
+
* default_apn adalah ID untuk internet APN dibuat di tahap sebelumnya
apn_list is the comma separated list of APN IDs allowed for the UE i.e. APN ID for internet and ims APN created in the previous steps
+
* apn_list adalah comma separated list dari APN ID yang diijinkan untuk UE i.e. APN ID untuk internet dan ims APN dibuat di tahap sebelumnya
Replace imsi and msisdn as per your programmed SIM
+
* Ganti imsi dan msisdn sesuai dengan SIM yang kita program
  
Finally, select ims_subscriber -> Create new IMS SUBSCRIBER -> Press on Try it out. Then, in payload section use the below example JSON to fill in imsi, msisdn, msisdn_list, scscf_peer, scscf_realm and scscf for your SIM/deployment and then press Execute
+
Akhirnya, select ims_subscriber -> Create new IMS SUBSCRIBER -> Press Try it out. Selanjutnya, di payload section gunakan contoh JSON berikut untuk mengisi imsi, msisdn, msisdn_list, scscf_peer, scscf_realm dan scscf untuk SIM/deployment dan press Execute
  
 
  {
 
  {
Line 231: Line 369:
 
  }
 
  }
  
Replace imsi, msisdn and msisdn_list as per your programmed SIM
+
* Ganti imsi, msisdn dan msisdn_list sesuai dengan SIM yang kita program.
 +
* Ganti scscf_peer, scscf dan scscf_realm seperti deployment kita
 +
 
 +
==Error==
 +
 
 +
===Error Deploy Open5GS CN===
 +
 
 +
error di 4G
 +
 
 +
pcscf        | 96(152) INFO: cdp [receiver.c:874]: peer_connect(): peer_connect(): Trying to connect to 172.22.0.4 port 3873
 +
scscf        |  5(61) DEBUG: ims_dialog [dlg_handlers.c:1923]: print_all_dlgs(): ******************** 5(61) DEBUG: ims_dialog [dlg_handlers.c:1924]: print_all_dlgs(): printing 4096 dialogs
 +
scscf        |  5(61) DEBUG: ims_dialog [dlg_handlers.c:1934]: print_all_dlgs(): ******************** 5(61) DEBUG: ims_auth [authorize.c:187]: reg_await_timer(): Looking for expired/useless at 72428826
 +
scscf        |  5(61) DEBUG: ims_auth [authorize.c:232]: reg_await_timer(): [DONE] Looking for expired/useless at 72428826
 +
pcscf        | 96(152) ERROR: cdp [receiver.c:922]: peer_connect(): peer_connect(): Error opening connection to to 172.22.0.4 port 3873 >No route to host
 +
 
 +
sesudah install ulang, masih error tapi beda ... masih di CDP yang error
 +
 
 +
 
 +
osmohlr      | 20230912041343980 DLINP <000b> input/ipa.c:447 connected read/write
 +
osmohlr      | 20230912041343980 DLINP <000b> input/ipa.c:403 172.22.0.31:33545 message received
 +
icscf        | 28(58) ERROR: cdp [receiver.c:922]: peer_connect(): peer_connect(): Error opening connection to to 172.22.0.18 port 3875 >No route to host
 +
scscf        | 28(62) ERROR: cdp [receiver.c:922]: peer_connect(): peer_connect(): Error opening connection to to 172.22.0.18 port 3875 >No route to host
 +
 
 +
 
 +
 
 +
 
 +
===Error deploy SRSLTE===
  
Replace scscf_peer, scscf and scscf_realm as per your deployment
 
  
 +
uhd_usrp_probe
  
 +
[INFO] [UHD] linux; GNU C++ version 11.2.0; Boost_107400; UHD_4.1.0.5-3
 +
[WARNING] [B200] EnvironmentError: IOError: Could not find path for image: usrp_b200_fw.hex
 +
Using images directory: <no images directory located>
 +
Set the environment variable 'UHD_IMAGES_DIR' appropriately or follow the below instructions to download the images package.
 +
Please run:
 +
  "/lib/x86_64-linux-gnu/uhd/utils/uhd_images_downloader.py"
 +
Error: LookupError: KeyError: No devices found for ----->
 +
Empty Device Address
  
 
==Referensi==
 
==Referensi==
  
 
* https://github.com/herlesupreeth/docker_open5gs
 
* https://github.com/herlesupreeth/docker_open5gs

Latest revision as of 04:18, 12 September 2023

Sumber: https://github.com/herlesupreeth/docker_open5gs

Berbeda dengan nama repositorinya, repositori ini berisi file buruh docker untuk deploy jaringan 4G/5G simulasi Over-The-Air (OTA) atau RF menggunakan proyek berikut:

Test Setup

Docker host machine

  • Ubuntu 20.04 or 22.04

Over-The-Air (OTA) setup:

  • srsRAN (eNB/gNB) menggunakan Ettus USRP B210
  • srsRAN eNB menggunakan LimeSDR Mini v1.3
  • srsRAN eNB menggunakan LimeSDR-USB

RF simulasi setup:

  • srsRAN (gNB + UE) simulasi menggunakan ZMQ
  • UERANSIM (gNB + UE) simulator


Persyaratan wajib:

docker-ce - Version 22.0.5 atau yang lebih tinggi
docker-compose - Version 2.14 atau yang lebih tinggi


Setup IP Statik

Edit

sudo su
apt update
apt -y install net-tools


vi /etc/netplan/00-installer-config.yaml

Pastikan,

# This is the network config written by 'subiquity'
# network:
#   ethernets:
#     enp0s31f6:
#       dhcp4: true
#   version: 2
#

network:
    version: 2
    renderer: networkd
    ethernets:
        enp0s31f6:
            addresses:
                - 192.168.0.5/24
            nameservers:
                addresses: [8.8.8.8, 8.8.4.4]
            routes:
                - to: default
                  via: 192.168.0.222

Install docker

Install pendukung

sudo apt update
sudo apt upgrade
sudo apt -y install apt-transport-https ca-certificates curl software-properties-common

Add GPG Key Docker Repo & Sources List

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update

Install

sudo apt -y install docker-ce docker-compose



Install

Clone repositori dan buat image docker dari open5gs, kamailio, ueransim

sudo su
cd /usr/local/src/
git clone https://github.com/herlesupreeth/docker_open5gs
cd /usr/local/src/docker_open5gs/base
docker build --no-cache --force-rm -t docker_open5gs .
cd /usr/local/src/docker_open5gs/ims_base
docker build --no-cache --force-rm -t docker_kamailio .
cd /usr/local/src/docker_open5gs/srslte
docker build --no-cache --force-rm -t docker_srslte .
cd /usr/local/src/docker_open5gs/srsran
docker build --no-cache --force-rm -t docker_srsran .
cd /usr/local/src/docker_open5gs/ueransim
docker build --no-cache --force-rm -t docker_ueransim .

Build dan Run menggunakan docker-compose

sudo su
apt-get install -y linux-tools-common linux-tools-6.2.0-32-generic linux-cloud-tools-6.2.0-32-generic linux-tools-generic linux-cloud-tools-generic
cd /usr/local/src/docker_open5gs/
set -a
source .env
sudo ufw disable
docker-compose -f 4g-volte-deploy.yaml build
docker-compose -f sa-deploy.yaml build
sudo sysctl -w net.ipv4.ip_forward=1
sudo cpupower frequency-set -g performance

Deployment

4G deployment

cd /usr/local/src/docker_open5gs/
# 4G Core Network + IMS + SMS over SGs
docker-compose -f 4g-volte-deploy.yaml up
# srsRAN eNB using SDR (OTA)
docker-compose -f srsenb.yaml up -d && docker container attach srsenb
# srsRAN ZMQ eNB (RF simulated)
docker-compose -f srsenb_zmq.yaml up -d && docker container attach srsenb_zmq
# srsRAN ZMQ 4G UE (RF simulated)
docker-compose -f srsue_zmq.yaml up -d && docker container attach srsue_zmq

5G SA deployment

cd /usr/local/src/docker_open5gs/
# 5G Core Network
docker-compose -f sa-deploy.yaml up
# srsRAN gNB using SDR (OTA)
docker-compose -f srsgnb.yaml up -d && docker container attach srsgnb
# srsRAN ZMQ gNB (RF simulated)
docker-compose -f srsgnb_zmq.yaml up -d && docker container attach srsgnb_zmq
# srsRAN ZMQ 5G UE (RF simulated)
docker-compose -f srsue_5g_zmq.yaml up -d && docker container attach srsue_5g_zmq
# UERANSIM gNB (RF simulated)
docker-compose -f nr-gnb.yaml up -d && docker container attach nr_gnb
# UERANSIM NR-UE (RF simulated)
docker-compose -f nr-ue.yaml up -d && docker container attach nr_ue

Konfigurasi

Untuk quick run (eNB/gNB, CN berada dalam docker network yang sama), edit hanya parameter berikut di .env sesuai setup kita

cd /usr/local/src/docker_open5gs
vi .env

Parametery yang di ubah,

  • MCC
  • MNC
  • TEST_NETWORK --> Ubah ini hanya jika bentrok dengan jaringan internal di rumah/kantor Anda
  • DOCKER_HOST_IP --> Ini adalah alamat IP dari host yang menjalankan pengaturan docker Anda
  • SGWU_ADVERTISE_IP --> Ubah ini ke nilai DOCKER_HOST_IP yang ditetapkan di atas hanya jika eNB tidak menjalankan jaringan/host docker yang sama
  • UPF_ADVERTISE_IP --> Ubah ini ke nilai DOCKER_HOST_IP yang ditetapkan di atas hanya jika gNB tidak menjalankan jaringan/host docker yang sama
  • UE_IPV4_INTERNET --> Ubah ini ke rentang ip jaringan UE yang Anda inginkan (agar tidak konflik) untuk APN internet
  • UE_IPV4_IMS --> Ubah ini ke rentang ip jaringan UE yang Anda inginkan (agar tidak konflik) untuk ims APN

Jika eNB/gNB TIDAK berjalan di jaringan/host docker yang sama dengan host yang menjalankan Core/IMS yang melakukan docker, ikuti langkah-langkah tambahan di bawah ini

Contoh .env

vi /usr/local/src/docker_open5gs/.env
MCC=001
MNC=01
TEST_NETWORK=172.22.0.0/24
DOCKER_HOST_IP=192.168.0.5
UE_IPV4_INTERNET=10.45.0.0/24
UE_IPV4_IMS=10.46.0.0/24
# SGW
SGWC_IP=172.22.0.5
SGWU_IP=172.22.0.6
SGWU_ADVERTISE_IP=172.22.0.6
# SMF
SMF_IP=172.22.0.7
SMF_DNS1=8.8.8.8
SMF_DNS2=8.8.4.4
# UPF
UPF_IP=172.22.0.8
UPF_ADVERTISE_IP=172.22.0.8

Alternatif contoh

vi /usr/local/src/docker_open5gs/.env
MCC=999
MNC=70
TEST_NETWORK=172.22.0.0/24
DOCKER_HOST_IP=192.168.0.5
UE_IPV4_INTERNET=10.45.0.0/24
UE_IPV4_IMS=10.46.0.0/24
# SGW
SGWC_IP=172.22.0.5
SGWU_IP=172.22.0.6
SGWU_ADVERTISE_IP=172.22.0.6
# SMF
SMF_IP=172.22.0.7
SMF_DNS1=8.8.8.8
SMF_DNS2=8.8.4.4
# UPF
UPF_IP=172.22.0.8
UPF_ADVERTISE_IP=172.22.0.8

# UERANSIM
NR_GNB_IP=172.22.0.23
NR_UE_IP=172.22.0.24

UE1_IMEI=356938035643803
UE1_IMEISV=4370816125816151
UE1_IMSI=999701234567895
UE1_KI=11111111111111111111111111111111
UE1_OP=11111111111111111111111111111111
UE1_AMF=8000

4G deployment

Di bawah mme section di docker compose file (4g-volte-deploy.yaml), uncomment bagian berikut,

...
    # ports:
    #   - "36412:36412/sctp"
...

Kemudian, uncomment bagian berikut di bawah sgwu section

...
    # ports:
    #   - "2152:2152/udp"
...

5G SA deployment

Di bawah amf section di docker compose file (sa-deploy.yaml), uncomment bagian berikut,

...
    # ports:
    #   - "38412:38412/sctp"
...

Kemudian, uncomment bagian berikut dibawah upf section

...
    # ports:
    #   - "2152:2152/udp"
...

Provisioning SIM information

Provisioning SIM information di open5gs HSS sebagai berikut:

  • Buka (http://<DOCKER_HOST_IP>:3000) di web browser, dimana <DOCKER_HOST_IP> adalah IP dari machine/VM yang menjalankan open5gs container. Login dengan credential berikut,
Username : admin
Password : 1423
  • Gunakan Web UI, tambahkan subscriber

Provisioning IMSI dan MSISDN dengan OsmoHLR sebagai berikut,

  • Pertama-tama, login ke osmohlr container
docker exec -it osmohlr /bin/bash
  • Kemudian, telnet ke localhost
telnet localhost 4258
OsmoHLR> enable
OsmoHLR#
  • Akhirnya, register subscriber information contoh berikut,
OsmoHLR# subscriber imsi 001010123456790 create
OsmoHLR# subscriber imsi 001010123456790 update msisdn 9076543210
  • Ganti IMSI dan MSISDN seperti SIM yang kita program.

Provisioning SIM information di pyHSS sebagai berikut,

  • Akses http://172.22.0.18:8080/docs/
  • Pilih apn -> Create new APN -> Press Try it out. Kemudian, di payload section gunakan contoh JSON berikut dan tekan Execute
{
  "apn": "internet",
  "apn_ambr_dl": 0,
  "apn_ambr_ul": 0
}
  • Catat apn_id yang di set di Response body dibawah Server response untuk internet APN
  • Ulangi creation step untuk payload berikut,
{
  "apn": "ims",
  "apn_ambr_dl": 0,
  "apn_ambr_ul": 0
}
  • Catat apn_id yang di set di Response body dibawah Server response untuk ims APN
  • Execute this step of APN creation only once

Selanjutnya, select auc -> Create new AUC -> Press Try it out. Kemudian, di payload section gunakan contoh JSON berikut untuk mengisi ki, opc dan amf untuk SIM dan press Execute

{
  "ki": "8baf473f2f8fd09487cccbd7097c6862",
  "opc": "8E27B6AF0E692E750F32667A3B14605D",
  "amf": "8000",
  "sqn": 0,
  "imsi": "001010123456790"
}
  • Catat auc_id yang di set di Response body dibawah Server response
  • Ganti imsi, ki, opc dan amf sesuai yang kita ingin program ke SIM

Selanjutnya, select subscriber -> Create new SUBSCRIBER -> Press Try it out. Selanjutnya, di payload section gunakan contoh JSON berikut untuk mengisi in imsi, auc_id dan apn_list untuk SIM dan press Execute

{
  "imsi": "001010123456790",
  "enabled": true,
  "auc_id": 1,
  "default_apn": 1,
  "apn_list": "0,1",
  "msisdn": "9076543210",
  "ue_ambr_dl": 0,
  "ue_ambr_ul": 0
}
  • auc_id adalah ID untuk AUC dibuat di tahap sebelumnya.
  • default_apn adalah ID untuk internet APN dibuat di tahap sebelumnya
  • apn_list adalah comma separated list dari APN ID yang diijinkan untuk UE i.e. APN ID untuk internet dan ims APN dibuat di tahap sebelumnya
  • Ganti imsi dan msisdn sesuai dengan SIM yang kita program

Akhirnya, select ims_subscriber -> Create new IMS SUBSCRIBER -> Press Try it out. Selanjutnya, di payload section gunakan contoh JSON berikut untuk mengisi imsi, msisdn, msisdn_list, scscf_peer, scscf_realm dan scscf untuk SIM/deployment dan press Execute

{
    "imsi": "001010123456790",
    "msisdn": "9076543210",
    "sh_profile": "string",
    "scscf_peer": "scscf.ims.mnc001.mcc001.3gppnetwork.org",
    "msisdn_list": "[9076543210]",
    "ifc_path": "default_ifc.xml",
    "scscf": "sip:scscf.ims.mnc001.mcc001.3gppnetwork.org:6060",
    "scscf_realm": "ims.mnc001.mcc001.3gppnetwork.org"
}
  • Ganti imsi, msisdn dan msisdn_list sesuai dengan SIM yang kita program.
  • Ganti scscf_peer, scscf dan scscf_realm seperti deployment kita

Error

Error Deploy Open5GS CN

error di 4G

pcscf        | 96(152) INFO: cdp [receiver.c:874]: peer_connect(): peer_connect(): Trying to connect to 172.22.0.4 port 3873
scscf        |  5(61) DEBUG: ims_dialog [dlg_handlers.c:1923]: print_all_dlgs(): ******************** 5(61) DEBUG: ims_dialog [dlg_handlers.c:1924]: print_all_dlgs(): printing 4096 dialogs
scscf        |  5(61) DEBUG: ims_dialog [dlg_handlers.c:1934]: print_all_dlgs(): ******************** 5(61) DEBUG: ims_auth [authorize.c:187]: reg_await_timer(): Looking for expired/useless at 72428826
scscf        |  5(61) DEBUG: ims_auth [authorize.c:232]: reg_await_timer(): [DONE] Looking for expired/useless at 72428826
pcscf        | 96(152) ERROR: cdp [receiver.c:922]: peer_connect(): peer_connect(): Error opening connection to to 172.22.0.4 port 3873 >No route to host

sesudah install ulang, masih error tapi beda ... masih di CDP yang error


osmohlr      | 20230912041343980 DLINP <000b> input/ipa.c:447 connected read/write
osmohlr      | 20230912041343980 DLINP <000b> input/ipa.c:403 172.22.0.31:33545 message received
icscf        | 28(58) ERROR: cdp [receiver.c:922]: peer_connect(): peer_connect(): Error opening connection to to 172.22.0.18 port 3875 >No route to host
scscf        | 28(62) ERROR: cdp [receiver.c:922]: peer_connect(): peer_connect(): Error opening connection to to 172.22.0.18 port 3875 >No route to host



Error deploy SRSLTE

uhd_usrp_probe
[INFO] [UHD] linux; GNU C++ version 11.2.0; Boost_107400; UHD_4.1.0.5-3
[WARNING] [B200] EnvironmentError: IOError: Could not find path for image: usrp_b200_fw.hex
Using images directory: <no images directory located>
Set the environment variable 'UHD_IMAGES_DIR' appropriately or follow the below instructions to download the images package.
Please run:
 "/lib/x86_64-linux-gnu/uhd/utils/uhd_images_downloader.py"
Error: LookupError: KeyError: No devices found for ----->
Empty Device Address

Referensi