• Stars
    star
    300
  • Rank 138,870 (Top 3 %)
  • Language
    Shell
  • License
    BSD 2-Clause "Sim...
  • Created over 5 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Docker files to run open5gs + IMS + eNB + gNB + NR-UE in a docker

docker_open5gs

Quite contrary to the name of the repository, this repository contains docker files to deploy an Over-The-Air (OTA) or RF simulated 4G/5G network using following projects:

Tested Setup

Docker host machine

  • Ubuntu 20.04 or 22.04

Over-The-Air setups:

  • srsRAN (eNB/gNB) using Ettus USRP B210
  • srsRAN eNB using LimeSDR Mini v1.3
  • srsRAN eNB using LimeSDR-USB

RF simulated setups:

  • srsRAN (gNB + UE) simulation over ZMQ
  • UERANSIM (gNB + UE) simulator

Build and Execution Instructions

Clone repository and build base docker image of open5gs, kamailio, ueransim

git clone https://github.com/herlesupreeth/docker_open5gs
cd docker_open5gs/base
docker build --no-cache --force-rm -t docker_open5gs .

cd ../ims_base
docker build --no-cache --force-rm -t docker_kamailio .

cd ../srslte
docker build --no-cache --force-rm -t docker_srslte .

cd ../srsran
docker build --no-cache --force-rm -t docker_srsran .

cd ../ueransim
docker build --no-cache --force-rm -t docker_ueransim .

Build and Run using docker-compose

cd ..
set -a
source .env
sudo ufw disable
docker-compose -f 4g-volte-deploy.yaml build
docker-compose -f sa-deploy.yaml build
sudo sysctl -w net.ipv4.ip_forward=1
sudo cpupower frequency-set -g performance
4G deployment
# 4G Core Network + IMS + SMS over SGs
docker-compose -f 4g-volte-deploy.yaml up

# srsRAN eNB using SDR (OTA)
docker-compose -f srsenb.yaml up -d && docker container attach srsenb

# srsRAN ZMQ eNB (RF simulated)
docker-compose -f srsenb_zmq.yaml up -d && docker container attach srsenb_zmq

# srsRAN ZMQ 4G UE (RF simulated)
docker-compose -f srsue_zmq.yaml up -d && docker container attach srsue_zmq
5G SA deployment
# 5G Core Network
docker-compose -f sa-deploy.yaml up

# srsRAN gNB using SDR (OTA)
docker-compose -f srsgnb.yaml up -d && docker container attach srsgnb

# srsRAN ZMQ gNB (RF simulated)
docker-compose -f srsgnb_zmq.yaml up -d && docker container attach srsgnb_zmq

# srsRAN ZMQ 5G UE (RF simulated)
docker-compose -f srsue_5g_zmq.yaml up -d && docker container attach srsue_5g_zmq

# UERANSIM gNB (RF simulated)
docker-compose -f nr-gnb.yaml up -d && docker container attach nr_gnb

# UERANSIM NR-UE (RF simulated)
docker-compose -f nr-ue.yaml up -d && docker container attach nr_ue

Configuration

For the quick run (eNB/gNB, CN in same docker network), edit only the following parameters in .env as per your setup

MCC
MNC
TEST_NETWORK --> Change this only if it clashes with the internal network at your home/office
DOCKER_HOST_IP --> This is the IP address of the host running your docker setup
SGWU_ADVERTISE_IP --> Change this to value of DOCKER_HOST_IP set above only if eNB is not running the same docker network/host
UPF_ADVERTISE_IP --> Change this to value of DOCKER_HOST_IP set above only if gNB is not running the same docker network/host
UE_IPV4_INTERNET --> Change this to your desired (Not conflicted) UE network ip range for internet APN
UE_IPV4_IMS --> Change this to your desired (Not conflicted) UE network ip range for ims APN

If eNB/gNB is NOT running in the same docker network/host as the host running the dockerized Core/IMS then follow the below additional steps

4G deployment

Under mme section in docker compose file (4g-volte-deploy.yaml), uncomment the following part

...
    # ports:
    #   - "36412:36412/sctp"
...

Then, uncomment the following part under sgwu section

...
    # ports:
    #   - "2152:2152/udp"
...
5G SA deployment

Under amf section in docker compose file (sa-deploy.yaml), uncomment the following part

...
    # ports:
    #   - "38412:38412/sctp"
...

Then, uncomment the following part under upf section

...
    # ports:
    #   - "2152:2152/udp"
...

Provisioning of SIM information

Provisioning of SIM information in open5gs HSS as follows:

Open (http://<DOCKER_HOST_IP>:3000) in a web browser, where <DOCKER_HOST_IP> is the IP of the machine/VM running the open5gs containers. Login with following credentials

Username : admin
Password : 1423

Using Web UI, add a subscriber

Provisioning of IMSI and MSISDN with OsmoHLR as follows:

  1. First, login to the osmohlr container
docker exec -it osmohlr /bin/bash
  1. Then, telnet to localhost
$ telnet localhost 4258

OsmoHLR> enable
OsmoHLR#
  1. Finally, register the subscriber information as in following example:
OsmoHLR# subscriber imsi 001010123456790 create
OsmoHLR# subscriber imsi 001010123456790 update msisdn 9076543210

Replace IMSI and MSISDN as per your programmed SIM

Provisioning of SIM information in pyHSS is as follows:

  1. Goto http://<DOCKER_HOST_IP>:8080/docs/
  2. Select apn -> Create new APN -> Press on Try it out. Then, in payload section use the below JSON and then press Execute
{
  "apn": "internet",
  "apn_ambr_dl": 0,
  "apn_ambr_ul": 0
}

Take note of apn_id specified in Response body under Server response for internet APN

Repeat creation step for following payload

{
  "apn": "ims",
  "apn_ambr_dl": 0,
  "apn_ambr_ul": 0
}

Take note of apn_id specified in Response body under Server response for ims APN

Execute this step of APN creation only once

  1. Next, select auc -> Create new AUC -> Press on Try it out. Then, in payload section use the below example JSON to fill in ki, opc and amf for your SIM and then press Execute
{
  "ki": "8baf473f2f8fd09487cccbd7097c6862",
  "opc": "8E27B6AF0E692E750F32667A3B14605D",
  "amf": "8000",
  "sqn": 0,
  "imsi": "001010123456790"
}

Take note of auc_id specified in Response body under Server response

Replace imsi, ki, opc and amf as per your programmed SIM

  1. Next, select subscriber -> Create new SUBSCRIBER -> Press on Try it out. Then, in payload section use the below example JSON to fill in imsi, auc_id and apn_list for your SIM and then press Execute
{
  "imsi": "001010123456790",
  "enabled": true,
  "auc_id": 1,
  "default_apn": 1,
  "apn_list": "0,1",
  "msisdn": "9076543210",
  "ue_ambr_dl": 0,
  "ue_ambr_ul": 0
}
  • auc_id is the ID of the AUC created in the previous steps
  • default_apn is the ID of the internet APN created in the previous steps
  • apn_list is the comma separated list of APN IDs allowed for the UE i.e. APN ID for internet and ims APN created in the previous steps

Replace imsi and msisdn as per your programmed SIM

  1. Finally, select ims_subscriber -> Create new IMS SUBSCRIBER -> Press on Try it out. Then, in payload section use the below example JSON to fill in imsi, msisdn, msisdn_list, scscf_peer, scscf_realm and scscf for your SIM/deployment and then press Execute
{
    "imsi": "001010123456790",
    "msisdn": "9076543210",
    "sh_profile": "string",
    "scscf_peer": "scscf.ims.mnc001.mcc001.3gppnetwork.org",
    "msisdn_list": "[9076543210]",
    "ifc_path": "default_ifc.xml",
    "scscf": "sip:scscf.ims.mnc001.mcc001.3gppnetwork.org:6060",
    "scscf_realm": "ims.mnc001.mcc001.3gppnetwork.org"
}

Replace imsi, msisdn and msisdn_list as per your programmed SIM

Replace scscf_peer, scscf and scscf_realm as per your deployment

Not supported

  • IPv6 usage in Docker

More Repositories

1

CoIMS_Wiki

Wiki for overriding IMS settings to enable VoLTE/VoWiFi using Carrier Privileges in Android phones
82
star
2

Kamailio_IMS_Config

Fixed version of Kamailio IMS configuration files for basic calling
46
star
3

pysim

Pysim repository from Osmocom with added features
Python
13
star
4

FHoSS

Git clone of SVN repo at svn://svn.code.sf.net/p/openimscore/code/FHoSS/trunk but with added features
Java
11
star
5

sim-tools

Clone from the Osmocom sim-tools.git with added features
TeX
11
star
6

OAI-5G

EmPOWER Agent integration with OpenAirInterface stack
C
9
star
7

sysmo-usim-tool

Modified version of sysmo-usim-tool
Python
7
star
8

SetAPN

App to set Internet and IMS APN and force usage of IPv4 over IPv4v6
Java
6
star
9

iptables_ext_gtp

iptables extension for gtp encap and decap
C
5
star
10

UICC_SIM_Wiki

SIM part of steps involved in enabling UICC carrier privileges
5
star
11

Open5gs_Config

Open5gs Configuration files for IMS/VoLTE
3
star
12

openair-cn-new

Modded version of Eurecom's Openair-CN code
C
2
star
13

n3gpp_access

WIP: Implements access to Mobile Core Network from non-3gpp access networks
C
1
star
14

carrier_wifi_http_server

Implements a server that hosts the certificate of the carrier which is used to encrypt the IMSI sent to WLAN or EPDG
Python
1
star
15

spaceappchallenge

Space App Challenge - Helsinki hackathon - 2015
JavaScript
1
star
16

limetrx

C++
1
star
17

snoopsnitch

SRLabs SnoopSnitch fork (https://opensource.srlabs.de/git/snoopsnitch.git)
C
1
star
18

throt-fb

Throttling API client for Facebook Graph API
JavaScript
1
star
19

Acroname

Easy lookup of acronyms/abbreviations using python
Python
1
star