Skip to content

iithnewslab/SBA-gRPC-5G

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

5G-Core-gRPC-SBA

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.

How to run 5G modules

Create Docker containers

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

Start Consul Server for NRF

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

Start the 5G Network Function modules

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

Run in AUSF

sudo service mysql restart
make ausf.out
./ausf.out 10
# 10 denotes the num_of_ausf_threads for N_ausf interface

Run in SMF

make smf.out
./smf.out 10
# 10 denotes the num_of_smf_threads for N_smf and N4 interfaces

Run in AMF

make amf.out
./amf.out 10 
# 10 denotes the num_of_amf_threads for N_amf interface

Run in UPF

make upf.out
./upf.out 10 10 10
# 10 denotes the num_of_upf_threads for N3, N4 and N6 interface

Run in SINK

make sink.out
./settings.sh
./sink.out 10 
# 10 denotes the num_of_sink_server threads

Run in RAN

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.