Skip to content

Open5GS 5G Core Network implementation for testbed with UERANSIM gNB and UE integration. Designed to run with three deployment types: Linux native, Compose and K3s

Notifications You must be signed in to change notification settings

rayhanegar/Open5GS-Testbed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Open5GS-Testbed

A comprehensive 5G Core Network testbed integrating Open5GS and UERANSIM for research, testing, and educational purposes. This testbed supports multiple network slices and provides flexible deployment options to suit different testing scenarios.

This testbed network is used for 5G core network demonstration for 2025 CIF65217 Wireless Network course @ FILKOM UB.

A paper about this project is available on Bahasa Indonesia thru this link: https://j-ptiik.ub.ac.id/index.php/j-ptiik/article/view/16025

For more information: rayhanegar.sn@gmail.com

πŸ“‹ Overview

This repository provides a complete 5G standalone (SA) network testing environment with:

  • Open5GS 5G Core Network: Full 5GC implementation with AMF, SMF, UPF, NRF, and all control plane functions
  • UERANSIM: Open-source 5G UE and RAN (gNB) simulator for testing the core network
  • Multi-Slice Support: Three pre-configured network slices (eMBB, URLLC, mMTC)
  • Flexible Deployment: Native, Docker Compose, and Kubernetes (K3s) deployment options

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    UERANSIM Component                           β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                              β”‚
β”‚  β”‚  nr-gnb  β”‚ ◄─────► β”‚  nr-ue   β”‚                              β”‚
β”‚  β”‚ (gNodeB) β”‚         β”‚   (UE)   β”‚                              β”‚
β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜                              β”‚ 
β”‚       β”‚ N2 (NGAP)          β”‚ uesimtun0 (Data)                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚                    β”‚
        β”‚ SCTP/38412         β”‚ GTP-U/2152
        β–Ό                    β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Open5GS 5G Core Network                       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚  Control Plane                                          β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”            β”‚    β”‚
β”‚  β”‚  β”‚ AMF β”‚  β”‚ SMF β”‚  β”‚ NRF β”‚  β”‚ AUSFβ”‚  β”‚ UDM β”‚  ...       β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”˜            β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚  User Plane                                             β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”    ogstun (10.45.0.0/24)  - eMBB               β”‚    β”‚
β”‚  β”‚  β”‚ UPF β”‚ ── ogstun2 (10.45.1.0/24) - URLLC              β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”˜    ogstun3 (10.45.2.0/24) - mMTC               β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚  Data Store                                             β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”                                β”‚    β”‚
β”‚  β”‚  β”‚ MongoDB β”‚  β”‚ WebUI  β”‚                                β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜                                β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                           β–Ό
                      Internet

Important: The architecture diagram shows the IP addresses used in the current configuration (e.g., 10.34.4.130, 10.10.0.0/24). You must adjust these IP addresses to match your specific environment before deployment.

πŸ’Ύ MongoDB and WebUI Setup

Overview

MongoDB and Open5GS WebUI operate outside the K3s/Docker cluster as external services running on the host machine or a separate VM. The containerized Open5GS network functions connect to these external services for subscriber data management.

Why External?

  • MongoDB: Serves as the persistent subscriber database, accessible by both the WebUI and core network functions (UDM, UDR, etc.)
  • Open5GS WebUI: Provides a web-based interface for managing subscribers, requiring direct MongoDB access
  • Isolation: Keeping data services external simplifies backup, migration, and allows the core network to scale independently

MongoDB Installation

# Install MongoDB on Ubuntu
sudo apt update
sudo apt install -y mongodb-org

# Start MongoDB service
sudo systemctl start mongod
sudo systemctl enable mongod

# Verify MongoDB is running
sudo systemctl status mongod

# Check MongoDB is listening on port 27017
sudo netstat -tulpn | grep 27017

MongoDB Configuration for Remote Access

By default, MongoDB only listens on localhost. To allow K3s/Docker containers to connect:

# Edit MongoDB configuration
sudo nano /etc/mongod.conf

# Update the bindIp to allow connections from your network
# Change:
#   bindIp: 127.0.0.1
# To:
#   bindIp: 0.0.0.0  # Or specify your host IP (e.g., 10.34.4.130)

# Restart MongoDB
sudo systemctl restart mongod

Open5GS WebUI Installation

# Install Node.js (required for WebUI)
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs

# Clone and install Open5GS WebUI
git clone https://github.com/open5gs/open5gs.git
cd open5gs/webui
npm clean-install

# Configure MongoDB connection (if needed)
# Edit: open5gs/webui/server/index.js
# Update MongoDB URI to: mongodb://localhost:27017

# Start WebUI
npm run dev
# Or for production: npm run start

# Access WebUI at: http://<your-host-ip>:9999
# Default credentials: admin / 1423

IP Address Configuration

Critical: Before deploying Open5GS, update the MongoDB connection strings in the network function configurations:

For Docker Compose Deployment

Edit the following files in open5gs/open5gs-compose/:

  • amf/amf.yaml - Update NRF address
  • smf/smf.yaml - Update NRF and UPF addresses
  • nrf/nrf.yaml - Update MongoDB URI: mongodb://<your-host-ip>:27017
  • udm/udm.yaml - Update MongoDB URI
  • udr/udr.yaml - Update MongoDB URI
  • All NF configs - Update sbi.advertise addresses to match your network

Example MongoDB URI update:

db_uri: mongodb://10.34.4.130:27017/open5gs  # Change to your host IP

For K3s Deployment

Edit ConfigMaps in open5gs/open5gs-k3s-calico/01-configmaps/:

  • nrf-configmap.yaml
  • udm-configmap.yaml
  • udr-configmap.yaml
  • All relevant ConfigMaps with db_uri fields

Verifying MongoDB Connectivity

# From host machine
mongo --host <your-host-ip> --port 27017

# From inside a container/pod (test connectivity)
ping <your-host-ip>
curl http://<your-host-ip>:27017
# MongoDB should respond with: "It looks like you are trying to access MongoDB over HTTP..."

# Check Open5GS database exists
mongo --host <your-host-ip> --eval "show dbs"

Current Configuration IP Addresses

The configurations in this repository use the following IP addresses as examples:

  • Host/MongoDB/WebUI: 10.34.4.130
  • Control Plane Network: 10.10.0.0/24
  • User Plane Networks: 10.45.0.0/24, 10.45.1.0/24, 10.45.2.0/24

You must replace these with your actual network addresses before deployment.

🎯 Key Features

Open5GS Component

  • Complete 5G Core Network Functions:

    • AMF (Access and Mobility Management Function)
    • SMF (Session Management Function)
    • UPF (User Plane Function)
    • NRF (Network Repository Function)
    • AUSF (Authentication Server Function)
    • UDM (Unified Data Management)
    • UDR (Unified Data Repository)
    • PCF (Policy Control Function)
    • NSSF (Network Slice Selection Function)
    • SCP (Service Communication Proxy)
  • Three Network Slices:

    Slice SST DNN Subnet Use Case
    eMBB 1 embb.testbed 10.45.0.0/24 Enhanced Mobile Broadband
    URLLC 2 urllc.v2x 10.45.1.0/24 Ultra-Reliable Low Latency (V2X)
    mMTC 3 mmtc.testbed 10.45.2.0/24 Massive Machine Type (IoT)
  • Three Deployment Options:

    1. Native Installation: Systemd services on Ubuntu (production-like)
    2. Docker Compose: Containerized NFs with hybrid architecture
    3. Kubernetes (K3s): Orchestrated deployment with Calico CNI

UERANSIM Component

  • gNB Simulator (nr-gnb): 5G base station implementation

    • NGAP (N2) interface to AMF
    • GTP-U (N3) interface to UPF
    • Multi-slice support
  • UE Simulator (nr-ue): 5G user equipment implementation

    • Full NAS registration procedure
    • PDU session establishment
    • TUN interface creation (uesimtun0)
    • Multi-DNN support
  • Supporting Tools:

    • nr-cli: Interactive command-line interface
    • nr-binder: Network namespace binding utility

πŸ“‚ Repository Structure

Open5GS-Testbed/
β”œβ”€β”€ open5gs/                          # Open5GS 5G Core Network
β”‚   β”œβ”€β”€ configs-reference/            # Reference configuration files for all NFs
β”‚   β”œβ”€β”€ open5gs-compose/              # Docker Compose deployment
β”‚   β”‚   β”œβ”€β”€ docker-compose.yml
β”‚   β”‚   β”œβ”€β”€ setup-host-network-*.sh   # Network setup scripts
β”‚   β”‚   β”œβ”€β”€ amf/, smf/, upf/, ...     # Per-NF configurations
β”‚   β”‚   └── README.md                 # Compose deployment guide
β”‚   β”œβ”€β”€ open5gs-k3s-calico/           # Kubernetes deployment
β”‚   β”‚   β”œβ”€β”€ 00-foundation/            # K3s foundation resources
β”‚   β”‚   β”œβ”€β”€ 01-configmaps/            # NF configurations
β”‚   β”‚   β”œβ”€β”€ 02-control-plane/         # Control plane deployments
β”‚   β”‚   β”œβ”€β”€ 03-session-mgmt/          # Session management
β”‚   β”‚   β”œβ”€β”€ 04-user-plane/            # User plane deployments
β”‚   β”‚   β”œβ”€β”€ deploy-k3s-calico.sh      # Deployment script
β”‚   β”‚   └── README.md                 # K3s deployment guide
β”‚   β”œβ”€β”€ scripts/                      # Helper scripts for native deployment
β”‚   β”œβ”€β”€ Open5GS Setup and Configuration.md  # Native installation guide
β”‚   └── README.md                     # Open5GS overview
β”œβ”€β”€ ueransim/                         # UERANSIM RAN Simulator
β”‚   β”œβ”€β”€ build/                        # Pre-compiled binaries
β”‚   β”‚   β”œβ”€β”€ nr-gnb                    # gNB simulator
β”‚   β”‚   β”œβ”€β”€ nr-ue                     # UE simulator
β”‚   β”‚   β”œβ”€β”€ nr-cli                    # CLI tool
β”‚   β”‚   └── nr-binder                 # Network binder
β”‚   β”œβ”€β”€ configs/                      # Configuration files
β”‚   β”‚   β”œβ”€β”€ open5gs-gnb-local.yaml    # gNB configuration
β”‚   β”‚   └── open5gs-ue-embb.yaml      # UE configuration
β”‚   └── README.md                     # UERANSIM usage guide
└── README.md                         # This file

πŸš€ Quick Start

Prerequisites

  • Ubuntu 20.04/22.04 or similar Linux distribution
  • Root/sudo access
  • MongoDB installed and running (on host machine or accessible VM)
  • Open5GS WebUI (optional but recommended for subscriber management)
  • For Docker Compose: Docker and Docker Compose installed
  • For K3s: K3s cluster with Calico CNI
  • For UERANSIM: SCTP kernel module

Note: MongoDB and WebUI must be set up before deploying Open5GS. See the MongoDB and WebUI Setup section for installation instructions.

Option 1: Native Deployment

# Follow the native installation guide
cd open5gs
cat "Open5GS Setup and Configuration.md"

# Install Open5GS packages
sudo apt install software-properties-common
sudo add-apt-repository ppa:open5gs/latest
sudo apt update
sudo apt install open5gs

# Configure and start services
# See detailed guide for configuration steps
sudo systemctl start open5gs-amfd open5gs-smfd open5gs-upfd

Option 2: Docker Compose Deployment

# Navigate to compose directory
cd open5gs/open5gs-compose

# Setup host network (choose one option)
sudo bash setup-host-network-eduvpn.sh
# OR
sudo bash setup-host-network-tailscale.sh
# OR
sudo bash setup-host-network-ethernet-icn.sh

# Start Open5GS containers
docker compose up -d

# Verify services
docker compose ps

Option 3: Kubernetes (K3s) Deployment

# Navigate to K3s directory
cd open5gs/open5gs-k3s-calico

# Setup K3s environment
sudo bash setup-k3s-environment-calico.sh

# Build and import container images
bash build-import-containers.sh

# Deploy Open5GS to K3s
bash deploy-k3s-calico.sh

# Verify deployment
kubectl get pods -n open5gs

Running UERANSIM

# Navigate to UERANSIM directory
cd ueransim

# Start gNB (in one terminal)
./build/nr-gnb -c configs/open5gs-gnb-local.yaml

# Start UE (in another terminal)
./build/nr-ue -c configs/open5gs-ue-embb.yaml

# Test connectivity
ping -I uesimtun0 -c 4 8.8.8.8

πŸ“š Documentation

Open5GS Guides

Guide Description Path
Native Installation Step-by-step systemd service deployment open5gs/Open5GS Setup and Configuration.md
Docker Compose Hybrid containerized deployment guide open5gs/open5gs-compose/README.md
Kubernetes (K3s) K3s orchestration with Calico CNI open5gs/open5gs-k3s-calico/README.md
Configuration Reference All NF YAML configurations open5gs/configs-reference/
DNN Configuration Network slice setup details open5gs/open5gs-compose/DNN-configuration.md

UERANSIM Guides

Guide Description Path
UERANSIM Usage Complete gNB/UE setup and testing ueransim/README.md
gNB Configuration Base station configuration ueransim/configs/open5gs-gnb-local.yaml
UE Configuration User equipment configuration ueransim/configs/open5gs-ue-embb.yaml

πŸ”¬ Testing Scenarios

Basic Connectivity Test

# Start Open5GS (choose deployment method)
# Start UERANSIM gNB and UE

# Test basic connectivity
ping -I uesimtun0 -c 4 8.8.8.8

# Test HTTP traffic
curl --interface uesimtun0 http://example.com

# Test throughput
iperf3 -c <server-ip> -B 10.45.0.2

Network Slice Testing

# Configure UE with multiple PDU sessions (eMBB + URLLC)
# Check created TUN interfaces
ip addr show | grep uesimtun

# Test eMBB slice (high bandwidth)
ping -I uesimtun0 -c 10 8.8.8.8

# Test URLLC slice (low latency)
ping -I uesimtun1 -c 10 8.8.8.8

# Compare latencies

Advanced Testing

# Use nr-binder for traffic isolation
cd ueransim
./build/nr-binder 10.45.0.2 traceroute 8.8.8.8

# Capture 5G protocol traffic
sudo tcpdump -i any -n sctp -w n2-interface.pcap
sudo tcpdump -i any -n udp port 2152 -w n3-interface.pcap

# Monitor with Wireshark
wireshark n2-interface.pcap

πŸ› οΈ Common Operations

Managing Subscribers

Reminder: MongoDB and WebUI run outside the K3s/Docker cluster. Ensure these services are installed and running on your host machine. See MongoDB and WebUI Setup for details.

Via WebUI (All Deployments)

# Access Open5GS WebUI (replace with your host IP)
# URL: http://<your-host-ip>:9999 (e.g., http://10.34.4.130:9999)
# Login: admin / 1423

# Add subscriber:
# - IMSI: 001010000000001
# - K: 465B5CE8B199B49FAA5F0A2EE238A6BC
# - OPc: E8ED289DEBA952E4283B54E88E6183CA
# - Select DNN: embb.testbed, urllc.v2x, or mmtc.testbed

Via MongoDB CLI

# Connect to MongoDB (replace with your host IP if remote)
mongo --host <your-host-ip> --port 27017
# Or if MongoDB is on localhost:
# mongo

# Switch to open5gs database
use open5gs

# Add subscriber
db.subscribers.insert({
  "imsi": "001010000000001",
  "security": {
    "k": "465B5CE8B199B49FAA5F0A2EE238A6BC",
    "opc": "E8ED289DEBA952E4283B54E88E6183CA",
    "amf": "8000"
  },
  "slice": [{
    "sst": 1,
    "default_indicator": true,
    "session": [{
      "name": "embb.testbed",
      "type": 3
    }]
  }]
})

Monitoring Logs

Native Deployment

sudo journalctl -u open5gs-amfd -f
sudo journalctl -u open5gs-upfd -f

Docker Compose

cd open5gs/open5gs-compose
docker compose logs -f amf
docker compose logs -f upf

K3s Deployment

kubectl logs -n open5gs -l app=amf -f
kubectl logs -n open5gs -l app=upf -f

Restarting Services

Native

sudo systemctl restart open5gs-amfd
sudo systemctl restart open5gs-upfd

Docker Compose

docker compose restart amf
docker compose restart upf

K3s

kubectl rollout restart -n open5gs deployment/amf
kubectl rollout restart -n open5gs deployment/upf

πŸ”§ Troubleshooting

Open5GS Issues

Issue Solution Documentation
AMF not starting Check PLMN configuration, verify SCTP module Native guide
UPF TUN creation failed Verify NET_ADMIN capability, check sysctl Compose guide
MongoDB connection issues Check MongoDB is running on host, verify port 27017 is open, ensure db_uri uses correct host IP, test connectivity from containers MongoDB Setup
NF registration failures Check NRF connectivity, verify SBI addresses K3s guide
WebUI cannot connect WebUI runs on host machine - check Node.js is running, verify MongoDB connection, check firewall rules for port 9999 MongoDB Setup

UERANSIM Issues

Issue Solution Documentation
gNB can't connect to AMF Verify AMF IP/port, check SCTP module, test connectivity UERANSIM guide
UE authentication failure Check K/OPc match, verify IMSI in MongoDB UERANSIM guide
PDU session rejected Verify DNN in SMF config, check slice permissions UERANSIM guide
No internet from UE Check UPF NAT rules, verify IP forwarding UERANSIM guide

Detailed troubleshooting: See individual component README files for comprehensive solutions.

🌐 Network Configuration

⚠️ Important: The IP addresses listed below are examples from the current configuration. You MUST adjust these addresses to match your specific network environment before deployment. Update all configuration files accordingly.

PLMN Configuration

  • MCC: 001 (Test network)
  • MNC: 01

IP Addressing

External Services (Host/VM - Outside Cluster)

  • MongoDB: Port 27017 on host IP (example: 10.34.4.130)
  • Open5GS WebUI: Port 9999 on host IP (example: 10.34.4.130)
  • Host Machine: Primary network interface IP (example: 10.34.4.130)

These services run on the host machine or a dedicated VM and are accessed by containerized network functions.

Control Plane (Native)

  • AMF: 127.0.0.5
  • SMF: 127.0.0.4
  • NRF: 127.0.0.10
  • Other NFs: 127.0.0.x

Control Plane (Docker/K3s)

  • Network: 10.10.0.0/24 (example - adjust to your network)
  • AMF: 10.10.0.5
  • SMF: 10.10.0.4
  • UPF: 10.10.0.7
  • NRF: 10.10.0.10

User Plane (All Deployments)

  • eMBB subnet: 10.45.0.0/24 (ogstun)
  • URLLC subnet: 10.45.1.0/24 (ogstun2)
  • mMTC subnet: 10.45.2.0/24 (ogstun3)

Configuration Files Requiring IP Updates

When adapting this testbed to your environment, update IP addresses in:

  1. MongoDB Connection Strings: All db_uri parameters in NRF, UDM, UDR configs
  2. SBI Addresses: Service-based interface advertise addresses in all NF configs
  3. NGAP/GTPU Addresses: AMF NGAP address, UPF GTPU address
  4. Setup Scripts: Network setup scripts in open5gs-compose/setup-host-network-*.sh
  5. UERANSIM Configs: gNB and UE configuration files with AMF/UPF addresses

Refer to individual deployment guides for detailed configuration instructions.

πŸŽ“ Educational Use

This testbed is designed for:

  • 5G Protocol Research: Full 3GPP-compliant implementation
  • Network Slice Experimentation: Pre-configured eMBB, URLLC, mMTC slices
  • Performance Testing: Throughput, latency, QoS validation
  • Student Labs: Hands-on 5G core network experience
  • Development: Testing 5G applications and services

Sample Lab Exercises

  1. Basic 5G Connectivity: Deploy Open5GS, connect UERANSIM, test data plane
  2. Network Slice QoS: Compare latency/throughput across eMBB vs URLLC slices
  3. Multi-UE Scenarios: Register multiple UEs with different slice configurations
  4. Handover Testing: Test UE mobility between cells (multiple gNBs)
  5. Protocol Analysis: Capture and analyze NGAP, GTP-U, NAS messages
  6. Deployment Comparison: Compare Native vs Docker vs K8s performance

πŸ” Security Notes

⚠️ This is a testbed environment - NOT production-ready!

Current Security Posture

  • Test PLMN codes (001/01)
  • Example subscriber credentials
  • No TLS for inter-NF communication
  • MongoDB without authentication
  • Open5GS WebUI with default credentials

For Production Deployment

  • Use real PLMN codes from your operator license
  • Generate unique K/OPc per subscriber
  • Enable TLS for all NF-to-NF communication
  • Secure MongoDB with authentication and TLS
  • Change all default passwords
  • Implement proper network segmentation
  • Use hardware security modules (HSM) for key storage
  • Enable SELinux/AppArmor for container isolation

πŸ“Š Performance Characteristics

Tested Performance (Reference)

Metric Native Docker Compose K3s
Registration Time ~150ms ~200ms ~250ms
PDU Session Setup ~100ms ~150ms ~180ms
Throughput (eMBB) 500+ Mbps 450+ Mbps 400+ Mbps
Latency (URLLC) ~15ms ~20ms ~25ms
Concurrent UEs 100+ 80+ 60+

Note: Performance varies based on hardware, network conditions, and configuration.

🀝 Contributing

Contributions are welcome! Areas for improvement:

  • Additional network slice configurations
  • Performance optimization
  • Additional deployment scenarios
  • Enhanced monitoring and observability
  • Test automation scripts
  • Documentation improvements

πŸ“– References

Open5GS

UERANSIM

3GPP Standards

  • 5G System Architecture: TS 23.501
  • NAS Protocol: TS 24.501
  • NGAP Protocol: TS 38.413
  • 5G QoS: TS 23.503

Additional Resources

πŸ“œ License

This testbed integrates open-source components:

  • Open5GS: GNU Affero General Public License v3.0
  • UERANSIM: GNU General Public License v3.0

Please refer to individual component licenses for detailed terms.

πŸ‘₯ Authors

  • Repository Maintainer: rayhanegar
  • Open5GS: Open5GS Project Team
  • UERANSIM: aligungr and contributors

πŸ“ž Support

For issues and questions:

  1. Check the relevant README.md in component directories
  2. Review troubleshooting sections
  3. Consult official documentation
  4. Open an issue in this repository

Status: βœ… Active Development | πŸ§ͺ Testbed Environment | πŸ“š Educational Use

Last Updated: February 13, 2026

About

Open5GS 5G Core Network implementation for testbed with UERANSIM gNB and UE integration. Designed to run with three deployment types: Linux native, Compose and K3s

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors