University of Trento

Virtualized mobile networks

comnetsemu-srsRAN

Leonardo Baldin

Ettore Saggiorato

Stiven Sharra

Prof. Fabrizio Granelli

Overview

The aim of this project is to integrate both a a 4G and a 5G NSA network topologies in the comnetsemu network emulator.

The network stack is provided by the srsRAN (used to be srsLTE) project, a fully open source (free as in freedom) 4G/5G software suite.

The software

  • Vagrant provisions a custom VM based on comnetsemu with some small fixes
  • docker-compose is used to test interoperability between srsRAN network nodes
  • The topology scripts and supporting library are written in Python 3.8 (as is comnetsemu)
  • These slides are rendered using Marp
  • The build system for this project is written in Bash

Implementation notes

  • Three srsRAN components are used: EPC, eNodeB (ENB) and a simple UE
  • The RF signals are sent directly from UE to ENB using ZeroMQ REQ-REP instead of a software-defined radio
  • The ZeroMQ messages travel on the same network as EPC-ENB traffic but it's fine because ZeroMQ is strictly end-to-end
  • The components use the default configuration with necessary tweaks, such as static IP assignment to the EPC

Topology (high level view)

Topology for 4G LTE (low level view)

Topology for 5G NSA (low level view)

Why not separate networks?

  • Mininet hates it when a single host is connected to two separate networks
  • Mininet only attaches network interfaces to hosts after they've been started
    • This made srsEPC/srsENB stall execution since they couldn't connect
  • A single network for all the traffic was deemed viable after testing

# Create the host
epc = net.addDockerHost(
    name="srsepc", ...
)
# Save the command line string
cmds[epc] = "srsepc ..."

# Start network and interfaces
net.start()

# Run command inside each host
for host in cmds:
    host.cmd(cmds[host])

Demo

  1. Start the VM (and provision it if necessary):

    $ ./make.sh vagrant
    
  2. Connect to the VM (using an interactive shell):

    $ vagrant ssh -t -c 'cd project/src && bash'
    
  3. Start one of the scripts:

    $ sudo python3 5g_nsa.py
    

Closing remarks

  • srsENB supports only one UE per channel (each channel being a ZeroMQ REQ/REP pair) so a custom ZeroMQ broker is needed for faithful radio tower emulation
    • srsRAN can also use SUB/PUB ZeroMQ sockets (not mentioned in the official documentation)
  • Multiple cells can be emulated via S1 handover
  • The code provided is simple and very procedural (and full of hacks and workarounds) but it's a working, stable example of what can be done with srsRAN in a containerized environment

University of Trento

Virtualized mobile networks

comnetsemu-srsRAN

Leonardo Baldin

Ettore Saggiorato

Stiven Sharra

Prof. Fabrizio Granelli

The EPC will then connect to the internet

Cool trick, thank you https://github.com/marp-team/marpit/issues/137

![bg left:47% 66%](srsran_logo_mod.svg)