Skip to content

Neel1097/docker-open5gs

 
 

Repository files navigation

Review Assignment Due Date Open in Visual Studio Code

Mobile Computing README template

Template with examples

MobCom-Giga-Force

Roaming-AMF/UPF/SMF-Traffic
Group-4
Members-matriculation number
Syeda Ayesha Asad-1512083
Rubi Kiran-1504617
Chaitra Bhandari-1504352
Amit Maity-1502808


Contents

Overview

With the rapid advancement of mobile communications, 5G networks have become a key enabler of high-speed, low-latency, and ultra-reliable connectivity. The Mobile Computing Project focuses on designing, implementing, and analyzing a comprehensive 5G Core Network architecture. It also focuses on the implementation of a 5G Core Network (5GC) using Open5GS, along with a 5G Radio Access Network (RAN) and User Equipment (UE) simulation usingPacketrusher. Additionally, the project includes managing and orchestrating 5G network functions (NFs) using Docker and Docker Compose to ensure network scalability, reliability, and fault tolerance. This collaborative project integrates various essential components of the 5G ecosystem, offering hands-on experience in modern mobile network technologies.

Project Overview (5G Roaming Deployment)

This project implements a 5G roaming architecture with two separate 5G Core Networks (CNs): a Home 5G CN (PLMN: 262/01) and a Visited 5G CN (PLMN: 262/02). Each CN includes key network functions such as NRF, AMF, SMF, and UPF. The two networks are interconnected via a roaming interface, allowing seamless mobility for users between them. The deployment is designed to work with the Open5GS roaming feature, utilizing PacketRusher for the 5G Radio Access Network (gNB and UE). The architecture enables interoperability between two distinct 5G Core Networks (home and a visited network) while leveraging a shared MongoDB database exposed via TCP port 27017 for user authentication. The 5G RAN consists of multiple gNBs based on Packetrusher, supporting multiple 5G UEs. This setup enables testing of roaming scenarios, performance, and scalability within a containerized environment using Docker and Docker Compose.

Project Network Architecture

                                                    +-----------------------+  
                                                    |      Home 5G CN       |  
                                                    |  (PLMN: 262/01)       |  
                                                    |                       |  
                                                    | NRF, AMF, SMF, UPF    |  
                                                    +-----------------------+  
                                                             |  
                                                     (Roaming Interface)  
                                                             |  
                                                    +-----------------------+  
                                                    |    Visited 5G CN      |  
                                                    |  (PLMN: 262/02)       |  
                                                    | NRF, AMF, SMF, UPF    |  
                                                    +-----------------------+  
                                                             |  
                                                     ----------------------  
                                                    |    5G RAN (gNBs)    |  
                                                    | Packetrusher gNBs   |  
                                                     ----------------------  
                                                             |  
                                                     Multiple 5G UEs                                                 

This configuration focuses on implementing a minimal set of essential network functions to establish a functioning 5G roaming setup. Authentication is handled within the home network database, ensuring that user credentials remain within the home PLMN while the visited network enforces roaming policies based on PCF configurations.

Home Network (PLMN 262 01)

  • Network Repository Function (NRF) – Service registration and discovery
  • Authentication Server Function (AUSF) – User authentication
  • Unified Data Management (UDM) – Subscription data handling
  • Unified Data Repository (UDR) – Storage for subscription information
  • Policy Control Function (PCF) – Policy enforcement
  • Session Management Function (SMF) – Manages user sessions
  • User Plane Function (UPF) – Traffic routing and forwarding
  • Access and Mobility Management Function (AMF) – Handles mobility and access control

Visited Network (PLMN 262 02)

  • Contains a subset of 5G Core functions necessary for roaming operations
  • Includes its own NRF, AMF, SMF, PCF, and UPF
  • Relies on the home network for user authentication

Prerequisites:

  1. Operating System: Ubuntu 20.04.
    * Other Linux distributions may work but could require additional dependencies.
    * Ensure your system is up to date (eg: sudo apt update && sudo apt upgrade -y). * MongoDB version 4.2
  2. Docker and Docker Compose.
    * Since Open5GS will run in a containerized environment, need Docker and Docker Compose installed.
    * Install Docker.
    * Start and enable docker.
    * Install Docker compose.
    * Verify the installation.

Deployment Instructions:


* Step 1: Clone the Repository ( https://github.com/Borjis131/docker-open5gs/tree/main )
* Step 2: Setup Docker & Docker Compose
* Step 3: Installing MongoDB
* Step 4: Configure the Roaming Setup
* Step 5: Start the 5G Core & RAN & installing Open5gs
* Step 6: Verify Running Containers/images
* Step 7: Registering User Equipment & installing Packetrushers
* Step 8: Testing & Verification using-iperf3.

Configuration Files

Modify the following .yaml files to adapt the deployment:

  1. NRF Configuration (nrf.yaml).
  2. AMF Configuration (amf.yaml).
  3. UPF Configuration (upf.yaml).
  4. SMF Configuration (upf.yaml).

Roaming Deployment

The roaming deployment is prepared to work with Open5GS Roaming feature and PacketRusher(gNB and UE), only exposing the MongoDB database using TCP port 27017. Two 5G Cores are deployed, one for the visited network (with PLMN 262 02) and one for the home network (with PLMN 262 01). This deploys the all the Network Functions. One database is used, for the home network user authentication. So, in this case, the UE with IMSI 262011234567891. The Roaming agreement is present on the visited network PCF (v-pcf) configuration file, under the policy section. That is because the visited network does not have any information for the user apart from that.

The communication between the two 5G Cores is done via the SEPP Network Functions.

image

Even though the two SBI sections are separated in the diagram, only one docker network is created so in reality everything is interconnected.

Used Technologies

  1. Open5GS (5G Core Network).
  2. Packetrusher was installed from GitHub.
  3. Traffic Generation Tool used iperf3.
  4. Implementation of a management and orchestration solution for Docker containers and 5G NFs.

Testing/Verification

  1. First the reachability of the server is checked.

    ´Ping

  2. Run the iperf3 client from another machine to establish a connection with the UPF server using the ( iperf3 -s ) command.

  3. Start the iperf3 server on the UPF machine to listen for incoming connections.

    Iperf

  4. Testing and verification of UPF Server and Client using iperf3 for traffic throughput generation.

    iperf3@UPF

  5. Check the output for bandwidth, latency, and packet loss to verify network performance.

    Test UDP connection

Logging

  1. The following figure show the logs of UE with vrf interface.

WhatsApp Image 2025-03-01 at 21 54 02_3926b7cf

  1. The image shows the Open5GS WebUI, a web-based interface for managing and configuring mobile network subscribers.
  2. The subscriber ID (IMSI) displayed is 262011234567890, which is used for identifying the user in the mobile network.

WhatsApp Image 2025-03-01 at 21 58 13_e89a2984

Building the Project( Using Docker-Compose)

  1. Create the Base Open5GS Image– Run the command to build the base-open5gs image, which serves as the foundation for the 5G Core Network deployment.
  2. Build and Deploy the 5GC Network-(docker compose -f compose-files/roaming/docker-compose.yaml --env-file=.env up -d.).
  3. Execute the Docker Compose command to build all necessary images, configure the environment, and deploy the selected 5G Core Network architecture.
  4. Verify Deployment – Ensure all containers are running properly, check logs for any errors, and confirm successful communication between the 5GC, RAN, and simulated UE.

Conclusion

The Mobile Computing Project provides a practical and in-depth exploration of 5G network architecture, implementation, and management. By leveraging Open5GS for the 5G Core Network, Packetrusher for RAN and UE simulation, and Docker & Docker Compose for orchestration, the project ensures a scalable, reliable, and fault-tolerant network. This hands-on approach enables a deeper understanding of modern mobile networks, preparing participants to tackle real-world challenges in 5G deployment and innovation. Ultimately, the project contributes to advancing next-generation communication systems by integrating key components of the 5G ecosystem.

Sources


* https://github.com/Borjis131/docker-open5gs/tree/main
* https://github.com/open5gs/open5gs
* https://medium.com/@vidime.sa.buduci.rok/5g-roaming-open5gs-packet-rusher-dacb34f3497c
* https://github.com/HewlettPackard/PacketRusher/blob/main/docker/docker-compose.yml
* https://open5gs.org/open5gs/docs/

About

Open5GS 5G Core container images, Docker compose deployments and Helm charts

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 56.8%
  • Shell 14.6%
  • Smarty 12.8%
  • Makefile 8.0%
  • HCL 7.8%