Skip to content. | Skip to navigation

Personal tools


You are here: Home / Wiki / PhantomNet / FlexRAN: A Flexible and Programmable Platform for Software-Defined Radio Access Networks

FlexRAN: A Flexible and Programmable Platform for Software-Defined Radio Access Networks

Profile Overview

This tutorial is based on the work done for the FlexRAN platform, presented in CoNEXT 2016. FlexRAN is a flexible and programmable SD-RAN platform that separates the RAN control and data planes through a new, custom-tailored southbound API. Aided by virtualized control functions and control delegation features, FlexRAN provides a flexible control plane designed with support for real-time RAN control applications, flexibility to realize various degrees of coordination among RAN infrastructure entities, and programmability to adapt control over time and easier evolution to the future following SDN/NFV principles.

For questions or comments, please contact:


The FlexRAN profile makes use of OpenEPC for the core part of the network. In order to use OpenEPC as part of the PhantomNet testbed, you first need to sign an OpenEPC sub-license agreement following the instructions provided here. You MUST follow this step, otherwise you will be unable to instantiate the FlexRAN profile and you will get an error message mentioning that you have insufficient permissions to use the OpenEPC binaries.

Profile Instantiation

You first need to create a new experiment by logging in to the PhantomNet web UI. If you do not have any current experiments running you should land on the instantiate page by default, otherwise you can click on "Actions" and select "Start Experiment" from the drop down menu. Click on the "Change Profile" button. To find the profile we will use for this tutorial, type "flexran-oai" into the search box. Select "flexran-oai" from the resulting list by clicking on it. This will show a description of the selected profile. Next click on the "Select Profile" button which will take you back to the "1. Select a Profile" page. Click "Next" to reach the "2. Parameterize" page. For this tutorial we will stay with the default options, so simply select "Next" to reach the "3. Finalize" page. In this page you will see the topology of the experiment and you need to select the project in which the experiment should be created (assuming you have access to more than one projects). You might optionally also give your experiment a name at this point by typing into the "Name" field. Click "Finish". PhantomNet will now go through the process of creating and setting up your experiment (this can take some time). When your experiment goes beyond the "created" state, the web interface will show more information of the resources allocated for the experiment and the current state of each node. For example the "Topology View" tab will show the topology of your experiment and hovering over a node will show its current state. Also, pay attention to the “List View” tab which shows you how to connect to each node of the experiment using ssh.

Setting up the FlexRAN Master Controller

You first need to log in to the master controller node and initialize it. This node is called “flexran_controller” and you can find the appropriate ssh command to connect to it through the “List View” tab of the experiment. For the password, give the password of your PhantomNet account.

$ cd /usr/local/src/flexran_controller

To set up the execution environment, configure and start the controller, simply run:

$ ./

 The controller will be ready once the message “Now listening on” shows up.

Setting up the FlexRAN Agent

 From a different terminal window (do NOT close the previous one) connect to the agent node and initialize it. This node is called "flexran-agent" and once more you can find the appropriate ssh command to connect to it through the “List View” tab of the experiment.

Once you are connected to the node, go to the directory where the agent code and the executable file are located:

$ cd /usr/local/src/flexran

To set up the execution environment, configure and start the agent, simply run:

$ ./

Your password will be requested. Again, give the same password as the one you use for your PhantomNet account.

The script will configure and execute the eNodeB and agent executable.

If everything went smoothly, a message “got sync (eNB_thread_single)” should show up at the agent side and some log messages about a new connection establishment should show up at the controller side (window of the previous step).

Connecting a UE

Once the controller and the agent are running properly, you simply need to wait for a bit for the UE to attach to the network. Once the UE is attached, a list of UE capabilites will show up at the agent side and some log messages about a UE state change should show up at the controller.

To verify that the UE was attached without problems, we can connect to it and ping some external IP.

First connect to the UE debugging console. For this you first need to connect through ssh to the node “adb-tgt” (Find the appropriate ssh command from the “List View” tab of the experiment).

Once connected, you need to connect to the UE using the Android Debug Bridge (ADB):

$ pnadb -a

You should see a message for a successful connection.

Next, you need to get a shell to the UE:

$ adb shell

Once you get a shell to the UE, you can test if it is properly attached using ping:

$ ping -c 3

Interacting with the Master Controller through the Northbound REST API

The FlexRAN controller provides a northbound RESTful API for issuing control commands and for obtaining statistics and reports for the underlying base stations using simple HTTP requests. Here, we will see two examples, one for control delegation and one for obtaining MAC statistics and eNodeB configurations.

Open a new terminal and connect to the controller node (“flexran_controller” from the “List View” tab).

Switching between a local and a remote scheduler

When FlexRAN starts, it uses a local downlink scheduler located at the agent-side by default. In this example, we will show how to dynamically switch between this scheduler and a centralized scheduler located at the master controller.

To perform a swap between the two schedulers, simply issue from the new terminal at the controller side the command:

$ curl -X POST http://localhost:9999/dl_sched/<scheduler_id>

where “<scheduler_id>” can be either 0 (load local scheduler) or 1 (load remote scheduler).

If successful, this command should return a message describing the type of scheduler that is currently used and the agent should also dump a similar message.

Obtaining UE MAC statistics and eNodeB configurations

To obtain UE MAC statistics, simply issue from the new terminal at the controller side the command:

$ curl -X GET http://localhost:9999/stats_manager/mac_stats

This should return all the MAC statistics for all connected UEs that are currently available at the controller RIB.

To obtain eNodeB and cell configurations issue the command:

$ curl -X GET http://localhost:9999/stats_manager/enb_config

Finally, if you want a full report of everything stored in the RIB, issue the command:

$ curl -X GET http://localhost:9999/stats_manager/all

For questions or comments, contact: