RF simulator, 1 eNB, 2 UEs, all-in-one

This tutorial explains how to connect 2 UEs to a eNB, with simulated RF board, on same machine.

It reuse the other tutorials we published in a quite complex IP addresses configuration

Constrains

  1. 50 RB (10MHz) as it seems current commit in develop branch doesn’t work well on 100RB
  2. Full mode, with EPC: the noS1 mode seems to not work with two UEs

Let’s go

RF simulator and OAI UE tutorial

Do this tutorial, with the UE on same machine option.

To install EPC, eNB, use all-in-one tuto, with latest commit in develop branch

      • you can add –ninja on ./build_oai … and replace all “make” by “ninja” that will be faster compilation for same result

you should reach one UE in traffic, all on one machine

Now, we will add the second UE

Make a second SIM

The UE always use the current directory files for SIM files
( hidden files: .usim.nvram0,  .ue.nvram0, .ue_emm.nvram0)

so we make a second directory and create the files in this directory

cd ..
mkdir build2
cd build2
cp ~/opencells-mods/sim.conf sim2.conf
# edit the file: change only the msin: MSIN="0100001112";
../../nas_sim_tools/build/conf2uedata -c sim2.conf -o .

Make a second network namespace

sudo ip netns delete ueNameSpace2
sudo ip link delete v-eth2
sudo ip netns add ueNameSpace2
sudo ip link add v-eth2 type veth peer name v-ue2
sudo ip link set v-ue2 netns ueNameSpace2
sudo ip addr add 10.201.1.1/24 dev v-eth2
sudo ip link set v-eth2 up
sudo iptables -t nat -A POSTROUTING -s 10.201.1.0/255.255.255.0 -o enp0s31f6 -j MASQUERADE
sudo iptables -A FORWARD -i enp0s31f6 -o v-eth2 -j ACCEPT
sudo iptables -A FORWARD -o enp0s31f6 -i v-eth2 -j ACCEPT
sudo ip netns exec ueNameSpace2 ip link set dev lo up
sudo ip netns exec ueNameSpace2 ip addr add 10.201.1.2/24 dev v-ue2
sudo ip netns exec ueNameSpace2 ip link set v-ue2 up
sudo ip netns exec ueNameSpace2 bash

Run the second UE

cd build2
ip netns exec ueNameSpace2 bash
./lte-uesoftmodem -C 2685000000 -r 50 --rfsim --rfsimulator.serveraddr 10.202.1.1

Traffic test

In one more window, launch some traffic in the second UE

ip netns exec ueNameSpace2 bash
ping -I oaitun_ue1 10.201.1.1

 

Leave a Reply

Your email address will not be published. Required fields are marked *