Skip to content

Compilation and Usage

pablop edited this page Oct 23, 2026 · 6 revisions

The emulator has been designed to be easily compiled and used. We have created a simple Makefile to simplify the compilation process. The code has been developed in C++11 and prepared to be compiled using g++. The emulator is designed to work on Ubuntu/Linux when actual IP traffic is used, because the real-traffic mode depends on Linux namespaces, iptables and Netfilter Queues.

Dependencies

Install the system libraries required by the C++ emulator:

sudo apt update
sudo apt install make g++ libnetfilter-queue-dev libmnl-dev

Some helper scripts and analyzers use Python. The recommended setup is to create a repository-local virtual environment:

python3 -m venv .venv
. .venv/bin/activate
pip install numpy matplotlib

If you use the scripts for traffic generation or PCAP parsing, install their Python dependencies as well:

pip install scipy pandas scapy

Compilation

Download or clone the source code from this repository. Open a terminal and navigate to the source code folder. In the main folder, where the Makefile is, run:

make

This produces the main executable at:

bin/fikore

The Makefile also builds helper tools, such as bin/udp_tos_probe, when running the default target.

Local Checks

For a quick local check without privileged IP traffic, use:

make test
make smoke

The smoke target runs FikoRE with tests/smoke_sim.ini. This is the recommended first check after compiling the project.

Running FikoRE Directly

The executable accepts the configuration file as the first argument:

./bin/fikore config/offline_umi_n40_npn.ini

If no argument is provided, FikoRE falls back to ./config.ini:

./bin/fikore

The configuration file does not need to be named config.ini anymore. The recommended configuration examples are stored in the config/ directory.

Offline Simulated Traffic

For offline simulations with simulated traffic, use:

bash run_scripts/run_offline.sh
bash run_scripts/run_offline.sh config/offline_umi_n40_npn.ini
bash run_scripts/run_offline.sh -a config/offline_umi_n40_npn.ini

The -a flag also generates DualQ/L4S/NFQUEUE-specific plots. Offline mode usually uses period: -1, which makes the emulator run as fast as possible instead of waiting for real-time ticks.

Real IP Traffic

For real-traffic emulation, the recommended workflow is the NFQUEUE lab described in Run Scripts and NFQUEUE Lab. The lab script creates Linux namespaces, veth pairs, routes and NFQUEUE rules, and then runs FikoRE on top of that topology.

A typical workflow is:

make
sudo BACKEND=host UE_COUNT=2 run_scripts/run_fikore_nfqueue_lab.sh up
FIKORE_API_HOST=0.0.0.0 bash run_scripts/run_api.sh
run_scripts/run_emulated.sh config/emulated_rural_n78_single_with_background.ini

For emulation mode, sudo is required because namespaces, iptables rules and packet queue access require elevated privileges.

Manual iptables rules are still possible, but they are no longer the recommended entry point. If you configure them manually, the queue numbers must match the ul_queue_n and dl_queue_n values of the real UE in the .ini file.

Execution Warnings and Troubleshooting

When running the emulated workflow, some scripts also start traffic generators or analyzers. If the script asks for interruption, use Ctrl+C as indicated by the script output. In workflows that launch both FikoRE and traffic processes, a first Ctrl+C stops the emulator and a second Ctrl+C may be needed to stop the traffic process and trigger the final plotting.

If you encounter Python errors such as:

ModuleNotFoundError: No module named 'numpy'

it means that your Python environment is missing required libraries. The run scripts prefer the repository virtual environment at .venv when it exists.

Example Configurations

The repository includes ready-to-use examples:

  • config/offline_umi_n40_npn.ini: offline UMi n40 NPN scenario.
  • config/offline_rural_n78_vehicular.ini: offline rural vehicular scenario.
  • config/offline_indoor_hotspot_n78_pedestrian.ini: offline indoor scenario.
  • config/emulated_rural_n78_single_with_background.ini: recommended real-traffic emulation example.
  • config/emulated_uma_n78_compare_with_background.ini: emulated comparison scenario.
  • config/emulated_umi_n40_npn_compare_with_background.ini: emulated UMi n40 NPN scenario.

Clone this wiki locally