Skip to content. | Skip to navigation

Personal tools


You are here: Home / Wiki / PhantomNet / OEPC-Protected / End-to-end LTE/EPC network with OpenAirInterface (OAI) simulated eNB/UE and OAI's EPC

End-to-end LTE/EPC network with OpenAirInterface (OAI) simulated eNB/UE and OAI's EPC


This tutorial will show you how to setup an end-to-end LTE/EPC network on 2 physical machines one runs simulated OpenAirInterface (OAI) UE and eNodeB and another runs OAI EPC core (MME/SGW/HSS). At the end of this tutorial, you will be able to access the Internet from the simulated UE.


Figure 1. Logical components and interfaces in this tutorial setup.


Figure 1 shows the components and interfaces between them in our setup. Simulated eNodeB and UE run on node-0 and MME/SPGW/HSS run on node-1.

UE and eNodeB are simulated - they run the same radio protocol stack as in real hardware SDR, but with simulated physical layer between UE and eNodeB (i.e, simulated fading models, path loss etc). Applications on Node-0 (UE/eNodeB node) send data to the radio stack of the UE/eNB via a local virtual interface (i.e, oip1). The eNodeB has two interfaces to MME and SPGW. S1_MME interface is the control interface for exchanging S1AP signaling messages with MME, S1_U is data plane interface for data packets. Note that MME and SPGW is a single executable in OAI, they communicate with each other via ITTI queue. The HSS is a separate executable communicates with MME via S6a interface.

The S1_U, S1_MME logical interfaces run on the LAN link between the two machines. The public interface on node-1 is used as the PGW's SGi interface for Internet access.

Setup steps

1. Instantiate a new experiment using OAI profile in PhantomNet:

  • Log in to your PhantomNet account. Navigate to the "Start Experiment" page and search for the "OAI_SIM_S" profile. Click "Instantiate" to instantiate a new experiment using this profile.
  • Optionally name your experiment. (Note that your experiment name should not contain an underscore "_".)
  • Wait for the experiment to be ready. Once the experiment is ready, you can click on "List View" to see the ssh instruction to access to your nodes. You will need several ssh terminals on your experiment nodes. As such you will need to access the nodes using the "SSH command" option on the "List View" tab (rather than the "console tab" option.)

2. Run MME, SGW and HSS

The exeriment will have 2 nodes: node-0 and node-1. The profile is set up so that node-0 runs eNodeB/UE and node-1 runs MME/SPGW/HSS.

  • On node-1, run MME/SPGW and HSS:
  1. /usr/local/src/openair-cn/SCRIPTS/run_epc_hss_local
  • After running this script, by typing screen -ls and you can see mme_sgw and hss screens are running. You can attach to see the output of a screen by: screen -r <screen name>
  • Before moving to the next step, we need to make sure MME and HSS are ready to allow connections from the eNB. To make sure, attach to the HSS screen, i.e., "screen -r hss", and wait for the HSS state changes to 'STATE_WAITCEA' -> 'STATE_OPEN'.

3. Run tshark on the S1 interface

In order to "see" the control plane exchange between the eNodeB and the MME you might run tshark on the S1_MME interface.

On node-0 run:

sudo tshark -O s1ap -i eth4

4. Run simulated eNodeB and UE

  • On node-0, run the simulated UE and eNodeB:

You should see "UE State = RRC_RECONFIGURED" in the eNodeB's log screen when the attach procedure completes.


    1. Interfaces:

Once the eNB/UE, MME/SPGW and HSS are running, you should see interface oip1 on node-0. After the UE attaches to the network, the oip1 interface should have an IPv4 address (e.g.,

    2. S1 monitoring:

Your tshark session should show S1 Application Protocol exchanges between the eNodeB and the MME as the UE performs an attach procedure. You should see an "attach complete" message when the procedure completes.

    3. Access the Internet: Once the UE attached to the network, you can test the data plane by pinging a server in the Internet. On node-0 run:

ping -I oip1 -c10


If you have a low latency connection to PhantomNet (low enough for X-window operation), you could run the eNodeB with an emulated oscilloscope option and make use of Wireshark in stead of tshark.

  • On node-0, run the simulated UE and eNodeB with software oscilloscope:

If you chose this option a software oscilloscope will appear showing the signal statistics on the eNodeB. When the UE is radio-connected to the eNodeB (i.e, a RRC connection with the eNodeB is established), you will see good IQ signals in the oscilloscope.

Note: running eNB with scope will cause the end-to-end Ping latency to increase (hundreds of ms). Without the scope, the Ping latency should be lower than 50ms.

  • Wireshark:

If you run wireshark on the S1-MME interface, you will see S1AP messages as the UE performs attach procedure.

You should see "attach complete" message in Wireshark.


Figure 2. Scope showing signal statistics on the eNodeB when UE and eNB set up a RRC-connection

Figure 3. Attach procedure S1AP messages between eNodeB and MME

Possible errors

  1. Restart eNB/UE:

Currently, restarting the simulated eNB/UE could crash the MME (because of incomplete old states handling in MME).

Solution: we recommend to kill the eNB/UE and follow the steps from the start every time you want to restart the eNB/UE.


   2. X11 forwarding:

If you run with eNodeB's scope option and see this following error, it's possible that you did not allow X11 forwarding in your terminal.  

In fl_initialize() [flresource.c:1017] oaisim: Can't open display
In fl_bgn_form() [forms.c:336] Missing or failed call of fl_initialize()
Solution: Add -YA option when login to the node, i.e, ssh -YA <username>@<nodename>
If the problem persists, it's possible that your X11 doesn't have correct permission to create .Xauthority file in /users/<username>. Change the permission of the folder using sudo chown -R <your username>:<your group> /users/<your username>, and log out/in again with the -YA option.


This tutorial shows steps to set up an end-to-end LTE/EPC network using simluated eNB/UE and OAI's EPC. Once setting up, you can observe control signaling when an UE attached to the network. You can also investigate LTE/EPC data plane processing, i.e, radio stack protocol, tunelling, etc.


We built this tutorial based on this tutorial provided by OpenAirInterface. We fixed some problems related to FQDN (Fully Qualified Domain Name) between MME and HSS, UE's IP address allocation, and provided build scripts and a fully replicable environment in PhantomNet.