Skip to main content

Configuration

This chapter explains how to configure the O-RAN/5G testbed using the provided YAML files, the API and how to run the testbed.

The checked-out repository has the following structure, which will be explained in detail in this section.

📁 repository
├── 📄 README.md
├── 📄 run_all.sh
├── 📄 run_api_endpoint.sh
├── 📄 run_trafficker.sh
├── 📁 config
│ ├── 📄 build_configuration.yml
│ ├── 📄 demo_configuration.yml
│ └── 📄 sample_traffic.yml
├── 📁 docs
├── 📁 patches
│ └── 📁 templates
│ └── 📁 patched
├── 📁 src
│ ├── 📄 main.py
│ ├── 📄 trafficker.py
│ ├── 📁 api
│ ├── 📁 controller
│ ├── 📁 model
│ └── 📁 view
└── 📁 tests

Central Configuration using a yml file

All components of the O-RAN/5G testbed can be centrally configured using the YAML files located at:
config/.

The major configuration file is build_configuration.yml, which allows you to define the setup for all major components, including the Near-Real-Time RIC, 5G Core, gNodeB, and User Equipment (UE).

The following shows a sample build configuration file. The sections and fields are explained in detail below.

environment:
core_implementation: "open5gs"
gnb_implementation: "srs"
ric_implementation: "oran_sc_ric"
log_level: "INFO"
log_dir: "logs"
build_dir: "./repositories"
docker_registry: "132.231.14.130:8080"
tag_appendix: latest
push_local_images: false


near_rt_ric:
network:
subnet: 10.0.2.0/24
dbaas_ip: 10.0.2.12
e2term_ip: 10.0.2.10
e2mgr_ip: 10.0.2.11
submgr_ip: 10.0.2.13
appmgr_ip: 10.0.2.14
rtmgr_sim_ip: 10.0.2.15
xapp_runner_ip: 10.0.2.20
vendors:
- implementation: "oran_sc_ric" # Must correspond to RICImplementation(Enum) in model/ric_config.py
repository: "https://github.com/srsran/oran-sc-ric.git"
commit: "e44a7ce239b3c908e842163f1d57cbb4ba43fd0a"
build_type: "docker"
release: 'k'
- implementation: "flexric"
repository: "https://gitlab.eurecom.fr/mosaic5g/flexric.git"
commit: "1f04cc558ebc8da9de6a620762bc02f5db4ecb4a"
build_type: "docker"


5gc:
network:
5gc_ip: 10.53.1.2
mongo_db_ip: 10.53.1.5
subnet: 10.53.1.0/24
vendors:
- implementation: "open5gs" # must correspond to CoreImplementation(Enum) in model/core_config.py
repository: "https://github.com/open5gs/open5gs.git"
commit: "2b6369e9d997eb8eb158e3803e3ae4f4d207cd4d"
build_type: "docker"
- implementation: "open5gs_srs"
repository: "https://github.com/srsran/srsRAN_Project.git"
commit: "11c9bbabb69873752500d676f55e0034f6caa5c5"
build_type: "docker"


ue:
network:
ip_range: 10.45.0.0/24
gateway: 10.45.0.1
ues:
- ue1:
implementation: "srs_4g"
repository: "https://github.com/srsran/srsRAN_4G.git"
commit: "1fab3df863f66fdb6c3b34f1b39e745dbcb12d5e"
build_type: "docker"
ue_type: "srsUE"
ip_addr: 10.45.1.2
srate: 11.52e6
usim:
mode: soft
algo: milenage
opc: 63bfa50ee6523365ff14c1f45f88737d
key: 00112233445566778899aabbccddeeff
imsi: 001010123456789
imei: 353490069873319
gateway:
netns: ue1
ip_devname: tun_srsue
ip_netmask: 255.255.255.0
- ue2:
implementation: "srs_4g"
repository: "https://github.com/srsran/srsRAN_4G.git"
commit: "ec29b0c1ff79cebcbe66caa6d6b90778261c42b8"
build_type: "docker"
ue_type: "srsUE"
ip_addr: 10.45.1.3
srate: 11.52e6
usim:
mode: soft
algo: milenage
opc: 63bfa50ee6523365ff14c1f45f88737d
key: 00112233445566778899aabbccddef00
imsi: 001010123456790
imei: 353490069873319
gateway:
netns: ue2
ip_devname: tun_srsue
ip_netmask: 255.255.255.0
- ue3:
implementation: "srs_4g"
repository: "https://github.com/srsran/srsRAN_4G.git"
commit: "ec29b0c1ff79cebcbe66caa6d6b90778261c42b8"
build_type: "docker"
ue_type: "srsUE"
ip_addr: 10.45.1.4
srate: 11.52e6
usim:
mode: soft
algo: milenage
opc: 63bfa50ee6523365ff14c1f45f88737d
key: 00112233445566778899aabbccddef01
imsi: 001010123456791
imei: 353490069873319
gateway:
netns: ue3
ip_devname: tun_srsue
ip_netmask: 255.255.255.0

gnb:
network:
e2: 10.0.2.3
ru_sdr: 10.45.1.1
cu_cp: 10.53.1.3
vendors:
- implementation: "srs"
repository: "https://github.com/srsran/srsRAN_Project.git"
commit: "11c9bbabb69873752500d676f55e0034f6caa5c5"
build_type: "docker"
srate: 11.52e6
tx_gain: 75
rx_gain: 75

zmq_proxy:
ip_addr: 10.45.1.200
rx_ports:
gnb: 2001
ue1: 2100
ue2: 2200
ue3: 2300
tx_ports:
gnb: 2000
ue1: 2101
ue2: 2201
ue3: 2301
path_losses_db:
ue1: 10
ue2: 20
ue3: 30
slow_down_ratio: 4

This configuration file defines all available component implementations (e.g., 5G Core, Near-RT RIC) that can be used within the testbed. For each implementation, the associated Git repository and exact commit hash are specified, ensuring full reproducibility and straightforward version switching. Implementations are selected in the environment section, where the desired variant for each component can be chosen from the predefined list. This enables flexible experimentation with different software stacks without requiring any changes to the underlying codebase.

Environment Configuration

The environment-section includes the following fields:

  • core_implementation: Selects the 5G Core implementation to use (e.g., open5gs, open5gs_srs).
  • gnb_implementation: Selects the gNB implementation (e.g., srs).
  • ric_implementation: Selects the Near-RT RIC implementation (e.g., oran_sc_ric, flexric).
  • log_level: Sets the logging verbosity level (e.g., INFO, DEBUG).
  • log_dir: Directory where logs will be stored, relative to the root directory.
  • build_dir: Directory where components will be built, relative to the root directory.
  • docker_registry: (Optional) Custom Docker registry for pushing built images.
  • tag_appendix: (Optional) Appendix to append to Docker image tags (e.g., "latest", "v1.0").
  • push_local_images: Boolean flag to determine whether to push locally built Docker images to the specified registry.

Overview of Configuration Sections

  • near RT RIC

    The near_rt_ric contains the following fields:

      near_rt_ric:
    network:
    subnet: 10.0.2.0/24
    dbaas_ip: 10.0.2.12
    e2term_ip: 10.0.2.10
    e2mgr_ip: 10.0.2.11
    submgr_ip: 10.0.2.13
    appmgr_ip: 10.0.2.14
    rtmgr_sim_ip: 10.0.2.15
    xapp_runner_ip: 10.0.2.20
    vendors:
    - implementation: "oran_sc_ric" # Must correspond to RICImplementation(Enum) in model/ric_config.py
    repository: "https://github.com/srsran/oran-sc-ric.git"
    commit: "e44a7ce239b3c908e842163f1d57cbb4ba43fd0a"
    build_type: "docker"
    release: 'k'
    - implementation: "flexric"
    repository: "https://gitlab.eurecom.fr/mosaic5g/flexric.git"
    commit: "1f04cc558ebc8da9de6a620762bc02f5db4ecb4a"
    build_type: "docker"
    • network: Defines the network settings for the Near-RT RIC, including subnet and specific IP addresses for different RIC components (e.g., DBaaS, E2 Term, E2 Manager, Sub Manager, App Manager, RTMGR Simulator, xApp Runner).

    • vendors: A list of available Near-RT RIC implementations, each with its own configuration:

      • repository: Git repository URL for the RIC implementation.
      • commit: Specific commit hash to check out.
      • build_type: Specifies whether to use a native or Docker-based build.

      ⚠️ Currently, only Docker-based builds are supported.

      • release: Specifies the ORAN-SC RIC release.

      ℹ️ Our testbed supports O-RAN releases i to m. You can switch between releases by changing this field to the desired release letter (e.g., 'i', 'j', 'k', 'l', 'm').

      • implementation: Specifies the Near-Real-Time RIC implementation.

      Supported implementations include: oran_sc_ric, flexric. You can select the desired implementation by setting this field to the corresponding name (e.g., "oran_sc_ric" or "flexric"). A specific release can only be set for the ORAN-SC RIC implementation, as the FlexRIC implementation does not currently support multiple releases.

  • 5G Core

    The 5g core network can be configured within the 5gc section:

    5gc:
    network:
    5gc_ip: 10.53.1.2
    mongo_db_ip: 10.53.1.5
    subnet: 10.53.1.0/24
    vendors:
    - implementation: "open5gs"
    repository: "https://github.com/open5gs/open5gs.git"
    commit: "2b6369e9d997eb8eb158e3803e3ae4f4d207cd4d"
    build_type: "docker"
    - implementation: "open5gs_srs"
    repository: "https://github.com/srsran/srsRAN_Project.git"
    commit: "11c9bbabb69873752500d676f55e0034f6caa5c5"
    build_type: "docker"
    • network: Defines the network settings for the 5G Core, including the core IP address, MongoDB IP address, and subnet.
      • vendors: A list of available 5G Core implementations, each with its own configuration:
        • repository: Git repository URL for the 5G Core implementation.
        • commit: Specific commit hash to check out.
        • build_type: Specifies whether to use a native or Docker-based build.

        ⚠️ Currently, only Docker-based builds are supported.

        • implementation: Specifies the 5G Core implementation.

        Supported implementations include: open5gs, open5gs_srs. You can select the desired implementation by setting this field to the corresponding name (e.g., "open5gs" or "open5gs_srs").

  • gNB:

    To configure a next-generation Node B (gNB), use the gnb section:

    gnb:
    network:
    e2: 10.0.2.3
    ru_sdr: 10.45.1.1
    cu_cp: 10.53.1.3
    vendors:
    - implementation: "srs"
    repository: "https://github.com/srsran/srsRAN_Project.git"
    commit: "11c9bbabb69873752500d676f55e0034f6caa5c5"
    build_type: "docker"
    srate: 11.52e6
    tx_gain: 75
    rx_gain: 75
    • network: Defines the network settings for the gNB, including IP addresses for the E2 interface, RU software-defined radio interface, and CU-CP interface.
    • vendors: A list of available gNB implementations, each with its own configuration:
      • repository: Git repository URL for the gNB implementation.
      • commit: Specific commit hash to check out.
      • build_type: Specifies whether to use a native or Docker-based build.

        ℹ️ We currently support the SRSRAN project with the ZeroMQ interface build locally or using docker

      • srate: Sample rate in Hz, determining the baseband processing rate. Must match the UE sample rate for proper operation.
      • tx_gain: Transmit gain applied to the gNB radio output (Currently only simulated).
      • rx_gain: Receive gain applied to the gNB radio input (Currently only simulated).
      • implementation: Specifies the gNB implementation.

        Supported implementations include: srs. You can select the desired implementation by setting this field to the corresponding name (e.g., "srs").

  • UE:

    The testbed allows a single User Equipment (UE) to connect directly to the gNB, or multiple UEs to connect via a ZMQ proxy. Accordingly, the following parameters must be configured in the ue section:

    ue:
    network:
    ip_range: 10.45.0.0/24
    gateway: 10.45.0.1
    ues:
    - ue1:
    implementation: "srs_4g"
    repository: "https://github.com/srsran/srsRAN_4G.git"
    commit: "1fab3df863f66fdb6c3b34f1b39e745dbcb12d5e"
    build_type: "docker"
    ue_type: "srsUE"
    ip_addr: 10.45.1.2
    srate: 11.52e6
    usim:
    mode: soft
    algo: milenage
    opc: 63bfa50ee6523365ff14c1f45f88737d
    key: 00112233445566778899aabbccddeeff
    imsi: 001010123456789
    imei: 353490069873319
    gateway:
    netns: ue1
    ip_devname: tun_srsue
    ip_netmask: 255.255.255.0
    - ue2:
    implementation: "srs_4g"
    repository: "https://github.com/srsran/srsRAN_4G.git"
    commit: "ec29b0c1ff79cebcbe66caa6d6b90778261c42b8"
    build_type: "docker"
    ue_type: "srsUE"
    ip_addr: 10.45.1.3
    srate: 11.52e6
    usim:
    mode: soft
    algo: milenage
    opc: 63bfa50ee6523365ff14c1f45f88737d
    key: 00112233445566778899aabbccddef00
    imsi: 001010123456790
    imei: 353490069873319
    gateway:
    netns: ue2
    ip_devname: tun_srsue
    ip_netmask: 255.255.255.0
    - ue3:
    implementation: "srs_4g"
    repository: "https://github.com/srsran/srsRAN_4G.git"
    commit: "ec29b0c1ff79cebcbe66caa6d6b90778261c42b8"
    build_type: "docker"
    ue_type: "srsUE"
    ip_addr: 10.45.1.4
    srate: 11.52e6
    usim:
    mode: soft
    algo: milenage
    opc: 63bfa50ee6523365ff14c1f45f88737d
    key: 00112233445566778899aabbccddef01
    imsi: 001010123456791
    imei: 353490069873319
    gateway:
    netns: ue3
    ip_devname: tun_srsue
    ip_netmask: 255.255.255.0
    • network: Defines the network settings for the UEs, including IP range and gateway.
    • ues: A list of UE configurations, each with its own settings:
      • implementation: Specifies the UE implementation.

        Supported implementations include: srs_4g. You can select the desired implementation by setting this field to the corresponding name (e.g., "srs_4g").

      • repository: Git repository URL for the UE implementation.
      • commit: Specific commit hash to check out.
      • build_type: Specifies whether to use a native or Docker-based build.
      • ue_type: Type of UE implementation (currently only srsUE is supported).
      • ip_addr: IP address assigned to the UE. (Must be within the previous defined ip range)
      • srate: Sample rate in Hz, determining the baseband processing rate. Must match the gNB sample rate for proper operation.
      • usim: Sim card parameters for authentication and identification:
      • mode: Mode of USIM (e.g., soft).
      • algo: Algorithm used for authentication (e.g., milenage).
      • *opc: Operator code.
      • key: Encryption key.
      • imsi: International Mobile Subscriber Identity.
      • imei: International Mobile Equipment Identity.
      • gateway: Defines the UE's network interface and namespace:
        • netns: Linux network namespace for isolating UE traffic, when running in simulation.
        • ip_devname: Virtual interface device name (e.g., tun_srsue).
        • ip_netmask: Subnet mask for UE IP configuration.
  • ZMQ Proxy:

    Finally, in order to run multiple ues in simulation, the ZMQ proxy must be configured in the zmq_proxy section:

    zmq_proxy:
    ip_addr: 10.45.1.200
    rx_ports:
    gnb: 2001
    ue1: 2100
    ue2: 2200
    ue3: 2300
    tx_ports:
    gnb: 2000
    ue1: 2101
    ue2: 2201
    ue3: 2301
    path_losses_db:
    ue1: 10
    ue2: 20
    ue3: 30
    slow_down_ratio: 4
    • ip_addr: IP address of the ZMQ proxy.
    • rx_ports: Receive ports for each UE and gNB.
    • tx_ports: Transmit ports for each UE and gNB.
    • path_losses_db: Path loss values in dB for each UE.
    • slow_down_ratio: Slow down ratio for simulating real-time operation.

Demo Configuration

A second configuration file, demo_configuration.yml, is included in the repository. It defines the supported terminals for proper visualization of the tmux session and specifies the components to be started, including their state transitions. This allows the configurator to automatically start components in the correct order and restart them in case of a crash.

default_terminal: "linux_gnome"
terminals:
- linux_gnome:
subprocess_prefix: ["gnome-terminal", "--", "bash", "-c"]
subprocess_postfix: []
- linux_alacritty:
subprocess_prefix: ["alacritty", "-e", "zsh", "-c", "\""]
subprocess_postfix: ["\"", "&"]
- apple_terminal:
subprocess_prefix: [ "osascript", "-e", "tell application \"Terminal\"", " activate", " do script \"{{command}}\"", "end tell" ]
subprocess_postfix: [ ]
- apple_iterm:
subprocess_prefix: [ "osascript", "-e", "tell application \"iTerm\"", " create window with default profile", " tell current session of current window", " write text \"{{command}}\"", " end tell", "end tell" ]
subprocess_postfix: [ ]


# Supported options: [tmux|python]
output_mode: "tmux"
output_settings:
log_dir: "run_logs" # This folder is relative to the log folder of the environment (see sample_configuration.yml)
tmux:
session_prefix: "oran_demo_"
panes_per_session: 4
python:
show_num_lines: 10 # Lines per panel on the python live display


# Each program has the following parameters
# <name>: a name to reference the programs by in a readable way. Within the run_ue and run_misc sections the program names must be unique.
# <implementation>: the implementation type. Must correspond to the enums defined in model/xxx_config.py. Is optional (and currently unused) for run_misc type programs.
# <depends_on>: list of programs, which must run before this program can be started
# <command>: command to executed, including parameters (array of strings)
# <working_dir>: [Optional] the directory, in which the command is to be started. If this is missing, the environment build directory is used instead
# <state_transitions>: [Optional] A program has the states 'stopped', 'initializing' and 'running'. The transition from one stage into the other may be
# indicated by an expected output string.
# This field is optional, but if it is given, then it must have the sub fields
# stop_to_init: "str" and init_to_running: "str"
#
programs:
run_core:
restart_timeout_s: 30
max_num_restart: 3
program_list:
- name: "5G_core"
implementation: "open5gs" # Must be one of CoreImplementation(Enum) (core_config.py)
depends_on: []
command: ["docker", "compose", "up", "5gc", "mongodb"]
state_transitions:
stop_to_init: "Configuration: 'open5gs-5gc.yml'"
init_to_running: "UDR initialize...done"
- name: "5G_core" # Since we only start one core, the names here may be the same
implementation: "open5gs_srs" # Must be one of CoreImplementation (core_config.py)
depends_on: []
command: [ "docker", "compose", "up", "5gc"]
state_transitions:
stop_to_init: "open5gs_5gc"
init_to_running: "UDR initialize...done"
run_ric:
restart_timeout_s: 30
max_num_restart: 3
program_list:
- name: "ric"
implementation: "oran_sc_ric" # Must be one of RICImplementation(Enum) (ric_config.py)
depends_on: ["5G_core"]
command: ["docker", "compose", "up", "dbaas", "rtmgr_sim", "submgr", "e2term", "appmgr", "e2mgr", "python_xapp_runner"]
state_transitions:
stop_to_init: "Running"
init_to_running: "RMR is ready now ..."
- name: "ric"
implementation: "flexric"
depends_on: [ "5G_core" ]
command: [ "docker", "compose", "up", "flexric" ]
state_transitions:
stop_to_init: "Setting the config -c file to /usr/local/etc/flexric/flexric.conf"
init_to_running: "Initializing Task Manager with 2 threads"
run_gnb:
restart_timeout_s: 30
max_num_restart: 3
program_list:
- name: "gnb"
implementation: "srs" # Must be one of GNBImplementation(Enum) (gnb_config.py)
depends_on: ["ric"]
command: ["docker", "compose", "up", "gnb"]
state_transitions:
stop_to_init: "--== srsRAN"
init_to_running: "==== gNB started ==="
run_ue:
restart_timeout_s: 30
max_num_restart: 3
program_list:
- name: "ue1"
implementation: "srs_4g" # Must be one of UEImplementation(Enum) (ue_config.py)
depends_on: ["gnb"]
command: ["docker", "compose", "up", "--force-recreate", "ue1"]
state_transitions:
stop_to_init: "Attaching UE..."
init_to_running: "PDU Session Establishment successful."
- name: "ue2"
implementation: "srs_4g"
depends_on: ["gnb"]
command: ["docker", "compose", "up", "--force-recreate", "ue2"]
state_transitions:
stop_to_init: "Attaching UE..."
init_to_running: "PDU Session Establishment successful."
- name: "ue3"
implementation: "srs_4g"
depends_on: ["gnb"]
command: ["docker", "compose", "up", "--force-recreate", "ue3"]
state_transitions:
stop_to_init: "Attaching UE..."
init_to_running: "PDU Session Establishment successful."
run_zmq_proxy:
restart_timeout_s: 3
max_num_restart: 3
program_list:
- name: "zmq_proxy"
implementation: "grc"
depends_on: ["ric"]
depends_on_init: ["ue1", "ue2", "ue3"]
command: ["docker", "compose", "up", "zmq_proxy"]
state_transitions:
stop_to_init: "ZMQ Proxy initialising."
init_to_running: "ZMQ Proxy running."
run_misc:
restart_timeout_s: 20
max_num_restart: 3
###################### Add custom programs here ######################
program_list:
- name: "xapp_simple"
depends_on: ["gnb", "5G_core", "ric", "ue1"]
command: ["docker", "compose", "exec", "python_xapp_runner", "./simple_xapp.py"]

This configuration file contains the following important sections:

  • default_terminal: Specifies the default terminal type for displaying program outputs.

    Supported options include "linux_gnome", "linux_alacritty", "apple_terminal", and "apple_iterm".
    ⚠️ If a terminal is chosen not supported by the system, the configurator will automatically select an available fallback option.

  • terminals: Defines the supported terminal types and their corresponding command prefixes and postfixes for executing subprocesses.
  • output_mode: Specifies the mode for displaying program outputs, either using a tmux session or a custom live display shown directly in the python console.

    Supported options include "tmux" and "python".

  • output_settings: Contains settings specific to the chosen output mode, such as log directory and tmux session configuration.
  • programs: Defines the programs to be executed within the demo. This section contains the command to run each component. Furthermore, it specifies the different strings in the program output, which indicate the transition from 'stopped' to 'initializing' and from 'initializing' to 'running'. In addition, the timeout after which a restart is triggered (when no state transition is detected) and the maximum number of restarts can be defined here.

Interactive Configuration

An alternative way to set up the demo is via an interactive console (limited functionality), which guides you step by step through the configuration process. The execution of this tool is described nex in the setup section.