Newer
Older
## Installation and deployment of 5G Core (5GC) of Open Air Interface (OAI)
## Objectives
- Install and configure the 5GC of OAI in a virtual machine Ubuntu 20.04 LTS (Focal Fossa)
- Deploy 5GC Core
- Inspec 5G Core Docker containers by means of command line instructions
- Install and configure Portainer tool
- Inspec 5G Core Docker containers by means of Portainer browser
**Minimum hardware requirements for OAI UE, according to doc/NR_SA_Tutorial_COTS_UE.md · develop · oai / openairinterface5G · GitLab (eurecom.fr):**
- Ubuntu 20.04.5 LTS;
- CPU: 4 cores x86_64;
- 8 GB RAM.
**Minimum hardware requirements for OAI 5GC and OAI gNB, according to doc/NR_SA_Tutorial_COTS_UE.md · develop · oai / openairinterface5G · GitLab (eurecom.fr):**
- Ubuntu 20.04.5 LTS;
- CPU: 8 cores x86_64 3.5 GHz;
- 32 GB RAM.
**However, if you do not have such hardware specifications, you may use the one below for both devices (tested for us, you may face some lags, but it works):**
- Ubuntu 20.04.5 LTS;
- CPU: 4 cores x86_64;
- 4 GB RAM.
## 5GC Installation
In a Linux Terminal, follow the steps below:
**Step 0:** Setup your VM or Baremetal Machine, after install Useful Software:
> sudo su
>
> apt update -y
>
> apt upgrade -y
>
> apt install -y python3-pip git curl cmake tree golang vim net-tools build-essential nfs-common openssh-server
> sudo apt-get install ca-certificates
>
> sudo apt-get install curl
>
> sudo apt-get install gnupg
>
> sudo apt-get install lsb-release
> sudo sysctl net.ipv4.conf.all.forwarding=1
>
> sudo iptables -P FORWARD ACCEPT
**Step 3:** Install docker and docker-compose
> sudo rm /etc/apt/sources.list.d/docker.list*
>
> sudo mkdir -p /etc/apt/keyrings
>
> 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 $(lsb_release -cs) stable"
>
> sudo chmod a+r /etc/apt/keyrings/docker.gpg
>
> sudo apt-get update
>
> sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
>
> sudo curl -L https://github.com/docker/compose/releases/download/1.29.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
>
> sudo chmod +x /usr/local/bin/docker-compose
**Step 4:** Clone OpenAirInterface 5G Core repository
> git clone https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed.git
>
> cd oai-cn5g-fed
>
> git checkout slicing-spring-of-code
## 5G RAN Installation
## Objectives
- Install and configure the OAI gNB
- Deploy a gNB together a previous configured 5GC
- Inspect gNB status in 5GC Core
To install OAI RAN 5G, go back for /home/$your user$ and follow this tutorial.
**Step 0:** go back to /home/$your user$. In a Linux Terminal, type:
> sudo add-apt-repository ppa:ettusresearch/uhd
>
> sudo apt-get install libuhd-dev uhd-host -y
>
> sudo apt-get install libuhd4.6.0 -y
>
> sudo apt-get install ccache -y
>
> sudo apt-get install net-tools
**Step 2:** Fix problem in the libuhd. When you run the commands below, if you get the error "cannot access archive", you can continue to the next step.
sudo dpkg -i --force-overwrite /var/cache/apt/archives/libuhd4.6.0_4.6.0.0-0ubuntu1~focal1_amd64.deb
**Step 3:** Clone OpenAirInterface 5G RAN repository
> git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
> cd /home/$your user$/openairinterface5g
>
> git checkout slicing-spring-of-code
>
> **Step 4:** Run the installation script
>
> source oaienv
>
> cd cmake_targets
>
> sudo ./build_oai -I
>
> sudo ./build_oai -I --install-optional-packages
>
> sudo ./build_oai -w USRP --ninja --gNB --nrUE -C --build-lib "uescope nrscope telnetsrv"
## Objectives
- Install and configure the gNB and FlexRIC
To install OAI FlexRIC, go back to /home/$your user$ and follow this tutorial.
**Step 0:** go back to /home/$your user$. In a Linux Terminal, type:
**Step 1:** Install dependencies:
> sudo apt-get install -y autotools-dev automake g++ make libpcre2-dev byacc cmake python3-dev libsctp-dev pcre2-utils bison
**Step 2:** Install swig:
> git clone https://github.com/swig/swig.git
>
> cd swig
>
> git checkout release-4.1
>
> ./autogen.sh
>
> ./configure --prefix=/usr/
>
> make -j8
>
> sudo make install
> git clone https://gitlab.eurecom.fr/mosaic5g/flexric flexric
>
> cd flexric/
>
> git checkout slicing-spring-of-code
>
> **Step 4:** Build FlexRIC:
>
> mkdir build && cd build && cmake .. && make -j8
>
> sudo make install
## Deployment
For this task, open another terminal using crtl+Alt+T.
> cd /home/$your user$/oai-cn5g-fed/docker-compose
> docker compose -f docker-compose-slicing-basic-nrf.yaml up -d
After running the above command, nine containers are expected to be in the "Up (healthy)" state as shown in figure below.
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238

**Step 2:** FlexRIC deployment:
> cd flexric/
>
> ./build/examples/ric/nearRT-RIC
After running the above command the expect result is shown in figure below.

**Step 3:** gNB deployment:
**Attention:** You must have Core 5G up and running
**Step 3.1:** open a new terminal using ctrl+Alt+T and type:
> sudo su
>
> cd /home/dco1020/openairinterface5g/cmake_targets/ran_build/build/
>
> sudo RFSIMULATOR=server ./nr-softmodem --rfsim --sa -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --continuous-tx
**Step 3.2**: To check the connection of gNodeB to the Core, see AMF logs. Open another terminal (the third one) using ctrl+Alt+T and type:
> docker logs -f oai-amf
The expected return is shown in figure below, where gNodeB shows the connected status.
