169 lines
4.4 KiB
Markdown
169 lines
4.4 KiB
Markdown
# 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:
|
|
- Core Network (4G/5G) - open5gs - https://github.com/open5gs/open5gs
|
|
- IMS (Only 4G supported i.e. VoLTE) - kamailio
|
|
- IMS HSS - https://github.com/nickvsnetworking/pyhss
|
|
- Osmocom HLR - https://github.com/osmocom/osmo-hlr
|
|
- Osmocom MSC - https://github.com/osmocom/osmo-msc
|
|
- srsRAN (4G/5G) - https://github.com/srsran/srsRAN
|
|
- UERANSIM (5G) - https://github.com/aligungr/UERANSIM
|
|
|
|
## 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
|
|
|
|
* Mandatory requirements:
|
|
* [docker-ce](https://docs.docker.com/install/linux/docker-ce/ubuntu) - Version 22.0.5 or above
|
|
* [docker-compose](https://docs.docker.com/compose) - Version 2.14 or above
|
|
|
|
|
|
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
|
|
docker-compose build --no-cache
|
|
sudo ufw disable
|
|
sudo sysctl -w net.ipv4.ip_forward=1
|
|
```
|
|
|
|
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 attach srsenb
|
|
|
|
# srsRAN ZMQ eNB (RF simulated)
|
|
docker-compose -f srsenb_zmq.yaml up -d && docker attach srsenb_zmq
|
|
|
|
# srsRAN ZMQ 4G UE (RF simulated)
|
|
docker-compose -f srsue_zmq.yaml up -d && docker 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 attach srsgnb
|
|
|
|
# srsRAN ZMQ gNB (RF simulated)
|
|
docker-compose -f srsgnb_zmq.yaml up -d && docker attach srsgnb_zmq
|
|
|
|
# srsRAN ZMQ 5G UE (RF simulated)
|
|
docker-compose -f srsue_5g_zmq.yaml up -d && docker attach srsue_5g_zmq
|
|
|
|
# UERANSIM gNB (RF simulated)
|
|
docker-compose -f nr-gnb.yaml up -d && docker attach nr_gnb
|
|
|
|
# UERANSIM NR-UE (RF simulated)
|
|
docker-compose -f nr-ue.yaml up -d && docker 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 UE information
|
|
|
|
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
|
|
|
|
## Not supported
|
|
- IPv6 usage in Docker
|