2.OpenAirInterface - mhradhika/5GTrial GitHub Wiki

Architecture

OAI 1 OAI 2

This setup was done by install the Core and UE/gNB on a single host machines.Please refer to the official documentation before following the steps given below.

Installation

1)Prerequisites

  • Install docker using package manager(In this case,apt for Debian/Ubuntu based distributions)

$ sudo apt install docker

  • Python: Minumum version == 3.6 (In this case 3.10.6)

  • Either add your preferred user the docker group

$ sudo docker -a -G docker <username>

Or execute the commands as sudo

  • Sign up to docker on their website if you do not have a docker account already and login through the terminal

$ docker login and enter your username and password

  • Pull the following images (Note the image base for the following is Ubuntu:focal)
docker pull mysql:8.0`
docker pull oaisoftwarealliance/oai-amf:v1.5.0
docker pull oaisoftwarealliance/oai-nrf:v1.5.0
docker pull oaisoftwarealliance/oai-smf:v1.5.0
docker pull oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
docker pull oaisoftwarealliance/trf-gen-cn5g:focal
docker pull oaisoftwarealliance/oai-gnb:develop
docker pull oaisoftwarealliance/oai-nr-ue:develop
docker logout
  • Configure your host system network and iptables

$ sudo sysctl net.ipv4.conf.all.forwarding=1

$ sudo iptables -P FORWARD ACCEPT

$ sudo service docker restart Restart the docker daemon

2)Deploying containers

  • Clone the develop branch of given github repository

$ git clone -b develop https://gitlab.eurecom.fr/oai/openairinterface5g.git

  • Enter into the 5g_rfsimulator directory

$ cd /openairinterface5g/ci-scripts/yaml_files/5g_rfsimulator

  • Create the docker containers and docker network

$ docker-compose up -d mysql oai-nrf oai-amf oai-smf oai-spgwu oai-ext-dn

Output of above command should look like this

Creating network "rfsim5g-oai-public-net" with driver "bridge"
Creating network "rfsim5g-oai-traffic_net-net" with driver "bridge"
Creating rfsim5g-oai-nrf ... done
Creating rfsim5g-mysql      ... done
Creating rfsim5g-oai-spgwu ... done
Creating rfsim5g-oai-amf   ... done
Creating rfsim5g-oai-smf   ... done
Creating rfsim5g-oai-ext-dn ... done
  • Check if all the containers are up and healthy

$ docker-compose ps -a

Output of above command should look like this

      Name                     Command                  State                  Ports            
-------------------------------------------------------------------------------------------------
rfsim5g-mysql        docker-entrypoint.sh mysqld      Up (healthy)   3306/tcp, 33060/tcp         
rfsim5g-oai-amf      /bin/bash /openair-amf/bin ...   Up (healthy)   38412/sctp, 80/tcp, 9090/tcp
rfsim5g-oai-ext-dn   /bin/bash -c  apt update;  ...   Up (healthy)                               
rfsim5g-oai-nrf      /bin/bash /openair-nrf/bin ...   Up (healthy)   80/tcp, 9090/tcp            
rfsim5g-oai-smf      /bin/bash -c /openair-smf/ ...   Up (healthy)   80/tcp, 8805/udp, 9090/tcp  
rfsim5g-oai-spgwu    /openair-spgwu-tiny/bin/en ...   Up (healthy)   2152/udp, 8805/udp          
  • Check if the docker bridges are created

$ ifconfig

rfsim5g-public: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.71.129  netmask 255.255.255.192  broadcast 192.168.71.191
        inet6 fe80::42:e7ff:fe72:dd9d  prefixlen 64  scopeid 0x20<link>
        ether 02:42:e7:72:dd:9d  txqueuelen 0  (Ethernet)
        RX packets 97  bytes 6524 (6.5 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 133  bytes 13944 (13.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

rfsim5g-traffic: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.72.129  netmask 255.255.255.192  broadcast 192.168.72.191
        inet6 fe80::42:5bff:fe4e:a2f1  prefixlen 64  scopeid 0x20<link>
        ether 02:42:5b:4e:a2:f1  txqueuelen 0  (Ethernet)
        RX packets 1  bytes 28 (28.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 46  bytes 6268 (6.2 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  • Deploy the OAI gNB in RF simulator mode

$ docker-compose up -d oai-gnb

The output of the above command should look like this

rfsim5g-oai-nrf is up-to-date
rfsim5g-oai-spgwu is up-to-date
rfsim5g-oai-ext-dn is up-to-date
Creating rfsim5g-oai-gnb ... done
  • Verify that the gNB is connected to the AMF

$ docker logs rfsim5g-oai-amf

The output should look like this.

[AMF] [amf_app] [info ] |----------------------------------------------------gNBs' information-------------------------------------------|
[AMF] [amf_app] [info ] |    Index    |      Status      |       Global ID       |       gNB Name       |               PLMN             |
[AMF] [amf_app] [info ] |      1      |    Connected     |         0x0       |         gnb-rfsim        |            208, 99             |
[AMF] [amf_app] [info ] |----------------------------------------------------------------------------------------------------------------|
...
  • Deply the OAI NR-UE in RF simulator mode

$ docker-compose up -d oai-nr-ue

The output should look like this.

rfsim5g-mysql is up-to-date
rfsim5g-oai-nrf is up-to-date
rfsim5g-oai-amf is up-to-date
rfsim5g-oai-smf is up-to-date
rfsim5g-oai-spgwu is up-to-date
rfsim5g-oai-ext-dn is up-to-date
rfsim5g-oai-gnb is up-to-date
Creating rfsim5g-oai-nr-ue ... done
  • Verify whether the UE is connected

$ docker exec -it rfsim5g-oai-nr-ue /bin/bash

ifconfig

You should see the below network interface

oaitun_ue1: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 12.1.1.2  netmask 255.255.255.0  destination 12.1.1.2
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 500  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

The test results can be found here

⚠️ **GitHub.com Fallback** ⚠️