The target Architectural diagram has two parts. (a) Virtualized 5G Core1 and (b) gNB docker. This tutorial is about how to create gNB docker. We have used Intel Core i7 systems along with Ettus B210 with Ubuntu 20.04.LTS and we suggest use of same OS.
We have used the following Tutorial to install docker engine. Interested readers may go through the given tutorial to avoid sudo
while using docker along with multiple other useful things.
```
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
apt-cache policy docker-ce
sudo apt install docker-ce
sudo systemctl status docker
```
```
git clone https://github.com/subhrendu1987/oai-gnodeb
```
```
cd oai-gnb-docker_ubuntu20
cat oai-gnb_20.tar.a? > oai-gnb_20.tar
sudo docker load --input oai-gnb_20.tar
sudo docker tag <Image-ID> oai-gnb:latest
```
- ping test from
GNB
toAMF
andAMF
toGNB
. If ping is not successfull, then try to debug- Commands to be executed in
gNB
to enable packet forwarding from Core to the external network via theCore VM
sudo sysctl net.ipv4.ip_forward=1 sudo iptables -P FORWARD ACCEPT sudo ip route add 192.168.70.128/26 via <Bridge IP of Core VM>
- Check routing tables of
GNB Docker
,GNB Baremetal
,Core VM
,Core Baremetal
- For ease of operations use the Google sheet tool
- Commands to be executed in
```
sudo docker run -it \
-v /dev:/dev \
--privileged \
-e USE_SA_TDD_MONO_B2XX='yes' \
-e USE_B2XX='yes' \
-e GNB_NAME='gNB-in-docker' \
-e MCC='001' \
-e MNC='01' \
-e MNC_LENGTH=2 \
-e TAC=1 \
-e NSSAI_SST=1 \
-e NSSAI_SD0=1 \
-e AMF_IP_ADDRESS='172.21.16.136' \
-e GNB_NGA_IF_NAME='eth0' \
-e GNB_NGA_IP_ADDRESS='192.168.68.194' \
-e GNB_NGU_IF_NAME='eth0' \
-e GNB_NGU_IP_ADDRESS='192.168.68.194' \
-e USE_ADDITIONAL_OPTIONS='--sa --continuous-tx --log_config.global_log_options level,nocolor,time,line_num,function' \
--entrypoint "/bin/bash" \
oai-gnb:latest \
--name sa-b210-gnb \
/bin/bash
```
Edit ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml
and modify the following variables as per the core specification:
AMF_IP_ADDRESS
GNB_NGA_IP_ADDRESS
GNB_NGU_IP_ADDRESS
GNB_NGU_IP_ADDRESS
MCC
MNC
cd ci-scripts/yaml_files/sa_b200_gnb/; sudo docker compose -f docker-compose.yml up -d
- Now Execute NR inside the container
sudo docker attach sa-b210-gnb
# Enter into the oai-gnb docker- Inside docker
bash bin/entrypoint.sh
/opt/oai-gnb/bin/nr-softmodem -O /opt/oai-gnb/etc/gnb.conf $USE_ADDITIONAL_OPTIONS
sudo docker compose -f ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml down
files.
uhd_find_devices
- ping test from
GNB
toAMF
andAMF
toGNB
. If ping is not successfull, then try to debug- Commands to be executed in Core-VM
sudo sysctl net.ipv4.ip_forward=1 sudo iptables -P FORWARD ACCEPT sudo ip route add 192.168.71.194 via <GNB IP>
- Check routing tables of
GNB Docker
,GNB Baremetal
,Core VM
,Core Baremetal
- To test/debug/understand the nr-softmodem configurations use
/custom
folder version ofentrypoint.sh
script and/custom/conf
configuration
- Commands to be executed in Core-VM
- Install Astra streaming studio in the UE
- Create a RTMP streaming service with it by tapping on the globe icon in right side pane. Use service name as RTMP and Profile name as oai-core
- Server IP: 192.168.70.141:1935/live
- Stream ID: test
- Save it and start the service using the play button