Non-3GPP IoT use-case aims to demonstrate the untrusted non-3GPP access to the my5Gcore using a Low Power Wide Area (LoRa/LoRaWAN) wireless network and docker containers.
This experiment aims to demonstrate a non-3GPP access based on N3IWF network fcuntion with integrated with a LoRa wireless network implemented Chirpsatack simulator. We also use an open-source implementation of the SBA-based 5G core software, as illustrated by the following image.
Non-3GPP IoT use-case compose has been tested against the following environment:
- Software
- OS: Ubuntu 18.04
- kernel version 5.0.0-23-generic
The listed kernel version is required for the UPF element.
-
Minimum Hardware
- CPU: Intel i5 processor
- RAM: 4GB
- Hard drive: 30GB
- NIC: Any 1Gbps Ethernet card supported in the Linux kernel
-
Recommended Hardware
- CPU: Intel i7 processor
- RAM: 8GB
- Hard drive: 160GB
- NIC: Any 10Gbps Ethernet card supported in the Linux kernel
This guide assumes that you will run all 5GC elements on a single machine.
This repository is a docker compose for container orchestration of my5G-core code. Containers are a form of operating system virtualization. A single container might be used to run anything from a small microservice or software process to a larger application.
Docker is a tool designed to make it easier to create, deploy, and run applications by using containers, and docker compose is a tool for defining and running multi-container Docker applications.
Due to the UPF issue inside container, the host must using kernel 5.0.0-23-generic
. And it should contain gtp5g
kernel module.
On you host OS:
sudo apt -y update
sudo apt -y install git gcc cmake autoconf libtool pkg-config
and execute:
git clone https://github.com/PrinzOwO/gtp5g.git
cd gtp5g
make
sudo make install
Reference: https://docs.docker.com/install/linux/docker-ce/ubuntu/
$ sudo apt-get update
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
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 \
$(lsb_release -cs) \
stable"
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
To let you use docker without root permission.
Reference: https://docs.docker.com/engine/install/linux-postinstall/
$ sudo groupadd docker
$ sudo usermod -aG docker $USER
$ sudo reboot
Reference: https://docs.docker.com/compose/install/
$ sudo curl -L https://github.com/docker/compose/releases/download/1.25.5/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose
Because we need to create tunnel interface, we need to use privileged container with root permission.
To build and run the my5G core containers, use the following commands:
# if mongodb is running
$ sudo service mongodb stop
$ cd ~
$ git clone https://github.com/LABORA-INF-UFG/SBrT2020-Minicurso1.git
$ cd SBrT2020-Minicurso1/docs/non3gpp-iot-use-case/my5Gcore-compose/
$ sudo make
$ sudo docker-compose build
$ sudo docker-compose up -d
Test my5Gcore containers. In this test all containers status should be up.
$ sudo docker-compose ps
The next step of the experiment is to store in UDR the UE's information using the Web Interface that is available at http://localhost:5000, as is shown in the image below (user=admin, password=free5gc).
Subscriber information:
supi: 2089300007487
k: 5122250214c33e723a5dd523fc145fc0
Op: c9e8763286b5b9ffbdf56e1297d0887b
To build and run the lorawan network containers, use the following commands:
$ cd ~
$ cd SBrT2020-Minicurso1/docs/non3gpp-iot-use-case/lorawan-docker/
$ sudo docker-compose build
$ sudo docker-compose up -d
Test LoRaWAN network containers.In this test all containers status should be up.
$ sudo docker-compose ps
After run lorawan docker-compose, to add the LoRa gateway to the ChirpStack Server network. For this, access the ChirpStack Application Server web-interface (http://localhost:8080) and add the gateway with the following steps (user=admin, password=admin).
To connect the ChirpStack Application Server instance with the ChirpStack Network Server instance, click Network servers and after click in Add.
To create a service profile.
To configure the Gateway Profile.
To add the gateway ID that will be managed, after adding the Service Profile and Gateway Profile.
The LoRaWAN gateway must be functional if the following information appears.
To configure the sensors that we want to monitor, add a profile for the device.
The device must be associated with an application, so we must create it.
We can add the device to the application.
We need to configure the corresponding hardware device address.
To build and run the lora iot network containers, use the following commands:
$ cd ~
$ cd SBrT2020-Minicurso1/docs/non3gpp-iot-use-case/lora-iot/
$ sudo make
$ sudo docker-compose build
$ sudo docker-compose up -d
Test LoRa iot network containers. In this test all containers status should be up.
$ sudo docker-compose ps
Sometimes, you need to drop data from DB.
$ docker exec -it mongodb mongo
> use free5gc
> db.subscribers.drop()
> exit # (Or Ctrl-D)
Another way to drop DB data is just remove db data. Outside your container, run:
$ cd ~/SBrT2020-Minicurso1/docs/non3gpp-iot-use-case/my5Gcore-compose/
$ sudo docker-compose down
$ sudo rm -rf ./dbdata