View on GitHub Star

Gradiant 5G Charts

A curated collection of 5G/6G related Helm Charts

Open5gs and UERANSIM

5G end to end (SA) communication demo with Open5gs and UERANSIM.

This setup uses 2 helm charts generated by Gradiant: open5gs and ueransim-gnb. These charts are packaged and available at Gradiant’s DockerHub repo: https://hub.docker.com/u/gradiant

If you want to have the repo in local you can pull it:

helm pull oci://registry-1.docker.io/gradiant/open5gs --version 2.2.0
helm pull oci://registry-1.docker.io/gradiant/ueransim-gnb --version 0.2.6

Deployment NGC and registration of subscribers

First, deploy the NGC (open5gs) using the 5gSA-values.yaml file provided in order to overwrite some of the default values of the Open5GS chart:

helm install open5gs oci://registry-1.docker.io/gradiant/open5gs --version 2.2.0 --values https://gradiant.github.io/5g-charts/docs/open5gs-ueransim-gnb/5gSA-values.yaml 

These new values will:

Deployment RAN

Now, deploy the RAN (ueransim-gnb) using the gnb-ues-values.yaml file provided in order to overwrite some of the default values of the ueransim-gnb chart:

helm install ueransim-gnb oci://registry-1.docker.io/gradiant/ueransim-gnb --version 0.2.6 --values https://gradiant.github.io/5g-charts/docs/open5gs-ueransim-gnb/gnb-ues-values.yaml 

Thus, this deployment will not only launch the gNodeB, but it will also enable the launching of 2 UEs. They will use consecutive MSIDNs, starting from the value of ues.initialMSISDN (0000000001, by default).

It is important to notice that the default values of mcc, mnc, sst, sd and tac match those configured in the open5gs chart and the registered UEs.

In addition, take into account that the value given for amf.hostname must match the name of the correponding AMF service deployed by the open5gs chart. Therefore, in case you use a differente release name for the open5gs chart, make sure that this value is set accordingly.

Verify deployment

Connection between SMF and UPF (C-Plane and U-Plane of NGC)

Check that the SMF gets associated with the UPF’s address:

kubectl logs deployment/open5gs-smf -f

Connection between AMF and gNodeB

Check that the AMF accepts and adds the gNodeB:

kubectl logs deployment/open5gs-amf -f

Check that gNodeB establishes SCTP connection successfully and that the NG Setup procedure was successful as well:

kubectl logs deployment/ueransim-gnb -f

UE’s connectivity

Check that both UEs established their PDU Session successfully, creating each of them one tunnel interface (uesimtun0 and uesimtun1):

kubectl exec deployment/ueransim-gnb-ues -ti -- bash

ip addr

UEs tunnel interfaces

Check that UEs have connectivity through these interfaces:

ping gradiant.org -I uesimtun0

ping gradiant.org -I uesimtun1

UEs connectivity

It’s even possible to check that the UEs’ traffic is being routed correctly through their PDU sessions, capturing the packets in the UPF. The installation of tcpdump in the corresponding pod is needed in order to complete this check:

kubectl exec deployment/open5gs-upf -ti -- bash

apt update && apt install tcpdump

tcpdump -i ogstun

Capturing traffic in the UPF

Add additional subscribers using open5gs-populate

Once the NGC is deployed, we can register additional subscribers at any time by using the Deployment previously described:

kubectl exec deployment/open5gs-populate -ti -- bash

From there, we can register a new subscriber by executing the following command, providing the corresponding values for imsi, key, opc, apn, sst and sd:

open5gs-dbctl add_ue_with_slice <imsi> <key> <opc> <apn> <sst> <sd>

After that, the changes can be verified following 2 different approaches:

kubectl exec deployment/open5gs-mongodb -ti -- bash

mongo

use open5gs

db.subscribers.find().pretty()

Clean

Clean the deployment for this demo by uninstalling the 2 helm charts previously installed:

helm uninstall ueransim-gnb

helm uninstall open5gs