/e2e-slicing-in-a-box

Primary LanguagePythonApache License 2.0Apache-2.0

DOI

e2e-slicing-in-a-box

Introduction

End-to-End network slicing (RAN, Transport, Edge Cloud) using ContainerNet, NS-3, DinD, and UERANSIM. Based on lasseufpa / emulation-setup-networking.

Requirements

Tested with Ubuntu 18.04.

Dependencies:

  1. ContainerNet
  2. ONOS
  3. NS-3
  4. UERANSIM
  5. python3 & pip
  6. Docker
  7. Tmux

Installation

ONOS and ContainerNet

First, make sure you have python3 with pip installed.

install.py will try to install all dependencies needed in a tools/ folder. Everything should work, but if something goes wrong, you will need to install the dependencies that failed in tools/ (or in the system).

Run install.py:

python3 install.py

How to use & Configuration

To start the emulation setup, use:

sudo ./start.sh

start.sh will start Tmux and run ONOS, Containernet and Free5GC with our topology.

After 1 minute, verify on the onos-cli window that all apps cited in controller/onoscmd were activated. You should also check the onos and free5gc windows to see if any container stoped working.

After checking all above, run the following commands on the scenario window:

./create_intents.sh             # to install routing on each switch
./connect_core.sh               # to connect the 5G core containers to Containernet
./start_ran.sh                  # to connect the UE to the respective switch
./ns_command_build.sh           # to start NS-3 and connect it to the gNB and UE

Custom network topology

You can emulate any network topology with containernet, which uses the same interface as Mininet.

For further information on implementing custom network topologies on Mininet, please check Mininet documentation.

We also provide an example of a custom network topology, the NSFNet topology. You can check it out at src/topologies/nsfnet.py. You can use it with run_demo.py to take a look.

We recommend using the following convention when creating a new network topology:

  • hX for hosts, where X is an integer between 1 and the number of hosts.
  • sX for switches, where X is an integer between 1 and the number of switches.
  • IP(hX) = 10.0.0.X, the IP address of a host hX is directly related to the host id X.
  • mac(hX) = 00:00:00:00:00:X, the mac address of a host hX is directly related to the host id X in hexadecimal.

PS: For now, our routing module only supports a maximum of 255 hosts.

free5GC installation

Prerequisites

Changing docker compose file

For the project to work, it was necessary to modify the "docker-compose" file and the configuration folder present in the Free5GC repository by the docker-compose and config generated and made available by this repository

Media Server

The streaming server is started along with the other services through a docker compose file. It consists of an ubuntu docker in its latest LTS version and the MediaMTX server, which is responsible for transmitting the video and audio files over the network, so this server is started after the container is created.

The streaming server container also has two video files in mpeg 2 format for testing, namely the files: example720.mpg and example1080.mpg, the first being a video in 720p and the second in 1080p. To perform a video publication on the network, you can use an ffmpeg command inside the container, as described below:

sudo docker exec server ffmpeg -re -stream_loop -1 -i file.mpg -c copy -f rtsp rtsp://10.100.200.20:8554/mystream

Where file.mpg needs to be one of the two files available in the container.

To receive the data use the command below in the UE:

ffmpeg -i rtsp://10.100.200.20:8554/mystream -c copy output.mpg

This command will generate an mpg 2 file that can be opened using vlc, and it also provides information about the transmission

Reference