Skip to content

Commit

Permalink
Add SRSRAN BTS initial setup
Browse files Browse the repository at this point in the history
Signed-off-by: Maros Marsalek <[email protected]>
  • Loading branch information
marosmars authored and Nevolnikova committed Mar 13, 2024
1 parent d89a8a9 commit 2efce65
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
8 changes: 8 additions & 0 deletions containerlab/frinx_topo_1/frinx_topo_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ topology:
R2_PE2:
mgmt-ipv4: 172.20.20.122
startup-config: config_r2_pe2.partial.txt

# BTS
BTS:
image: bts
kind: linux
mgmt-ipv4: 172.20.20.201

links:
# Data center 1
Expand All @@ -64,5 +70,7 @@ topology:
# PTP grandmaster to core routers
- endpoints: [PTP_GM:eth1, C1:eth5]
- endpoints: [PTP_GM_BACKUP:eth1, C2:eth5]
# BTS
- endpoints: ["BTS:eth1", "R1_PE1:eth3"]


27 changes: 27 additions & 0 deletions containerlab/frinx_topo_1/ran/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM ubuntu

# Builds a software only BTS from srsran project
# This bts does not require any hardware, since it is built with zeroMQ as a "mock" for radio traffic
# Note that srsran can be installed into ubuntu as a package, but that package does not support the zermoMQ mock

# from https://docs.srsran.com/projects/4g/en/latest/general/source/1_installation.html
RUN apt-get update && \
apt-get install -y libzmq3-dev build-essential git libtool pkg-config fftw3 fftw3-dev libmbedtls-dev libsctp-dev libboost-program-options-dev libconfig++-dev cmake

# from https://docs.srsran.com/projects/4g/en/next/app_notes/source/zeromq/source/index.html
WORKDIR /root/

RUN git clone https://github.com/srsRAN/srsRAN_4G.git
WORKDIR /root/srsRAN_4G
RUN mkdir build
WORKDIR /root/srsRAN_4G/build
RUN cmake ../
RUN make -j8
RUN make install

RUN srsran_install_configs.sh user

RUN apt-get update && \
apt-get install -y lldpd

CMD lldpd; ./srsenb/src/srsenb --rf.device_name=zmq --rf.device_args="fail_on_disconnect=true,tx_port=tcp://*:2000,rx_port=tcp://localhost:2001,id=enb,base_srate=23.04e6"
44 changes: 44 additions & 0 deletions containerlab/frinx_topo_1/ran/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# RAN resources

This folder contains resources related to running RAN network on top of the frinx containerlab topology


## SRSRAN

This is currently using the SRSRAN open-source implementation of a RAN network (software only)

https://docs.srsran.com/projects/4g/en/latest/index.html


### BTS

A base station can be built from the provided Dockerfile.
The dockerfile builds the BTS software that can be run without a real hardware radios. It uses a zero MQ internally.
It also runs LLDP.

Resources:
https://docs.srsran.com/projects/4g/en/next/app_notes/source/zeromq/source/index.html

#### How to

1. build the container `docker build -t bts .` (takes a long time)
2. Add to containerlab topology:
```
nodes:
bts1:
image: bts
kind: linux
mgmt-ipv4: 172.20.20.201
...
- endpoints: ["srsenb:eth1", "R1_PE1:eth4"]
```





// TODO add the backend/core services from SRSRAN behind our datacenter PE
// TODO add a client "device" from the SRSRAN connected to the BTS

0 comments on commit 2efce65

Please sign in to comment.