srs‐5G‐NSA - mhradhika/5GTrial GitHub Wiki

srsRAN-5G-NSA architecture

srs 1 srs 2

Get started

This page deals with the implementation of srsRAN-5G-NSA. This has been implemented on a single Ubuntu(22.04 LTS) system.

Note that because of the lack of hardware support , we use ZMQ which can be installed by following the steps mentioned in Installations or with the help of the official installation guide you can can find here

Installation

First install the ZMQ libraries using the command

sudo apt-get install libzmq3-dev

Now clone the srsRAN_4G from github using the command

git clone https://github.com/srsRAN/srsRAN_4G.git

You will now see a new srsRAN_4G folder in your current working directory. Enter the folder using

cd srsRAN_4G and then create a new folder build using the command

mkdir build

Enter the build folder using cd build and execute the command

cmake ../

and make sure that the line

-- Found libZEROMQ: /usr/local/include, /usr/local/lib/libzmq.so has appeared in the terminal

To build use the command

make

Configuration

Since we implement srsRAN-4G-NSA on a single machine to simulate the UE we have to create a new network namespace called ue1 using the command

sudo ip nentns add ue1

To generate the configuration files run the command

sudo ./srsRAN_4G_install_configs.sh

Now go to the /root/.config/srsran folder where 3 files have to be edited.

1) ue.conf

Go to the [rf] settings and uncomment the device_name and the device_args field and set it to the following

device_name = zmq

device_args = tx_port0=tcp://*:2001,rx_port0=tcp://localhost:2000,tx_port1=tcp://*:2101,rx_port1=tcp://localhost:2100,id=ue,base_srate=23.04e6

Go to the [gw] settings and set the netns field to

netns = ue1

To enable the 5G NR capabilities go to the [rat.nr] settings and set the bands and nof_carriers field

bands = 3,78

nof_carriers = 1

To create a 5G-NSA network go to the [rrc] settings and set the release field

release = 15

2) enb.conf

Go to the [rf] settings and uncomment the device_name and the device_args field and set it to the following

device_name = zmq

device_args = fail_on_disconnect=true,tx_port0=tcp://*:2000,rx_port0=tcp://localhost:2001,tx_port1=tcp://*:2100,rx_port1=tcp://localhost:2101,id=enb,base_srate=23.04e6

3) rrc.conf

To the end of this file add the nr_cell_list

nr_cell_list =
(
   {
    rf_port = 1;
    cell_id = 0x02;
    tac = 0x0007;
    pci = 500;
    root_seq_idx = 204;

    // TDD:
    //dl_arfcn = 634240;
    //band = 78;

    // FDD:
    dl_arfcn = 368500;
    band = 3;
  }
);

Testing

First run the EPC using the command

sudo srsepc

the output must look like

Screenshot from 2023-07-26 13-33-04

then run the eNB using the command

sudo srsenb

the output must look like

Screenshot from 2023-07-26 13-33-32

and finally run the UE using the command

sudo srsue

the output must look like

Screenshot from 2023-07-26 13-33-56

Check whether the tun_srsue interface exists in your ue1 network namespace using the command

sudo ip netns exec ue1 ifconfig

Screenshot from 2023-07-26 13-37-44

To connect to the internet from this network namespace first in the host machine masquerade the interface that connects to the internet using the command

sudo ./srsepc_if_masq.sh <interface>

Note that <interface> is the name of your ethernet interface(Eg- ens33,enp1s0 etc) or any interface you use to connect to the internet

Then add ip route in your ue1 namespace to pass all the traffic through the epc using the command

sudo ip netns exec ue1 ip route add default via 172.16.0.1 dev tun_srsue

ping google from your ue1 namespace using the command

sudo ip netns exec ue1 ping 8.8.8.8

References

https://docs.srsran.com/projects/4g/en/latest/app_notes/source/5g_nsa_zmq/source/index.html

https://docs.srsran.com/projects/4g/en/latest/app_notes/source/zeromq/source/index.html#zeromq-appnote

⚠️ **GitHub.com Fallback** ⚠️