This repository is the proof of concept for Service Based Architecture of 5G using gRPC. This work is published with the title Prototyping and Load Balancing the Service Based Architecture of 5G Core using NFV in the 5th proceedings of IEEE Network Softwarization (NetSoft) 2019. The paper can be accessed here with the presentation at this link. The Code in this repository is based on NFV-LTE-EPC developed by Networked Systems Lab, IIT Bombay under Prof. Mythili Vutukuru.
The 5G core modules code is in the src folder.
The loadbalancer code is in the grpclb folder.
Please cite the appropriate paper if you use this code.
git clone https://github.com/iithnewslab/SBA-gRPC-5G.git ~/ngcode
docker network create vepc
docker run -ti -d --rm --name ran --cap-add NET_ADMIN --network vepc -v ~/ngcode/:/code btvk/sba-vnf /bin/bash
docker run -ti -d --rm --name ausf --cap-add NET_ADMIN --network vepc -v ~/ngcode/:/code btvk/sba-vnf /bin/bash
docker run -ti -d --rm --name amf --cap-add NET_ADMIN --network vepc -v ~/ngcode/:/code btvk/sba-vnf /bin/bash
docker run -ti -d --rm --name smf --cap-add NET_ADMIN --network vepc -v ~/ngcode/:/code btvk/sba-vnf /bin/bash
docker run -ti -d --rm --name upf --cap-add NET_ADMIN --network vepc -v ~/ngcode/:/code btvk/sba-vnf /bin/bash
docker run -ti -d --rm --name sink --cap-add NET_ADMIN --network vepc -v ~/ngcode/:/code btvk/sba-vnf /bin/bash
Download Consul pre-compiled binaries from here. From host machine get the IP address of your interface on which Consul is bound and update the code with this IP address value. Run the following command in the host machine to start consul server.
consul agent -server -bootstrap -bind=<Interface-IP-Address> -client=<Interface-IP-Address> -ui -data-dir=/tmp/consul -node=consul-node
Check your docker subnet for network vepc. If the subnet is not 172.18.x.x, update your corresponding modules IP addresses in src files of
Amf.cpp
Ran.cpp
Smf.cpp
Upf.cpp
Sink.cpp
Run the follow commands in every docker container shell
export LD_LIBRARY_PATH=/usr/local/lib/
cd code/src
sudo service mysql restart
make ausf.out
./ausf.out 10
# 10 denotes the num_of_ausf_threads for N_ausf interface
make smf.out
./smf.out 10
# 10 denotes the num_of_smf_threads for N_smf and N4 interfaces
make amf.out
./amf.out 10
# 10 denotes the num_of_amf_threads for N_amf interface
make upf.out
./upf.out 10 10 10
# 10 denotes the num_of_upf_threads for N3, N4 and N6 interface
make sink.out
./settings.sh
./sink.out 10
# 10 denotes the num_of_sink_server threads
make ransim.out
./settings.sh
./ransim.out 10 10
# first 10 denotes the num_of_ue_threads at RAN
# second 10 denotes the time duration of each UE thread
To disable logging, set the DEBUG macro present in utils.h to 0.