Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: tariromukute
  • Language: Jupyter Notebook
  • Default Branch: main
  • Size: 7.8 MB
Statistics
  • Stars: 5
  • Watchers: 1
  • Forks: 3
  • Open Issues: 2
  • Releases: 0
Created almost 4 years ago · Last pushed 10 months ago
Metadata Files
Readme Citation

README.md

Mobile core network traffic generator

A comprehensive traffic generator for 5G Core Network testing with features for UE/gNodeB emulation, control/user plane traffic generation, SCTP protocol analysis, and 5GC compliance validation.

Features

UE Features 1. Initial registration 2. Primary Authentication and Key Agreement 2. Security Mode Control 3. UE initiated PDU session establishment 3. UE initiated De-registration

NGAP Features 1. NG Setup 2. Initial Context Setup 3. Initial UE Message 4. Downlink NAS Transport 5. Uplink NAS Transport 6. PDU Session Resource Setup 7. UE Connection Release

SCTP Analysis Features 1. Round Trip Time (RTT) measurement 2. Retransmission Timeout (RTO) monitoring 3. Buffer utilisation tracking 4. Stream usage analysis 5. Inter-packet jitter measurement

Installing 5GC traffic generator

```bash

Get dependencies

git submodule init && git submodule update

Install required packages

sudo apt-get install python3-dev python3-bpfcc bpfcc-tools linux-headers-$(uname -r) libbpf-dev clang-14 python3-setuptools build-essential sudo ln /usr/bin/clang-14 /usr/bin/clang

Install Python packages

pip install pycrate pysctp scapy pyroute2 cryptography pyyaml tabulate

Install CryptoMobile

cd CryptoMobile && python3 setup.py install ```

Running the traffic generator

You will need to update the ip address in the files src/config/open5gs-ue.yaml and src/config/open5gs-gnb.yaml on the core network VM. The config files are inspired by UERANSIM's config files.

```bash cd ~/cn-tg/

usage: run.py [-h] [-i INTERVAL] [-u UECONFIGFILE] [-g GNBCONFIGFILE] [-f FILE] [-v]

Run 5G Core traffic generator

optional arguments:

-h, --help show this help message and exit

-i INTERVAL, --interval INTERVAL

Interval of adding UEs in seconds

-n NUMPKTS, --numpkts NUM_PKTS

Number of UP packets to send per second

-u UECONFIGFILE, --ueconfigfile UECONFIGFILE

UE configuration file

-g GNBCONFIGFILE, --gnbconfigfile GNBCONFIGFILE

GNB configuration file

-f FOLDER, --file FOLDER

Folder to put the generated files (stats and logs)

-v, --verbose Increase verbosity (can be specified multiple times)

-s, --statistics Enable print of statistics

-e, --ebpf Enable print of ebpf statistics

-p PERIOD, --period PERIOD

Period/interval (seconds) for printing statistics

--sctp Enable all SCTP tracing modules

--sctp-rtt Enable SCTP RTT tracing

--sctp-rto Enable SCTP RTO tracing

--sctp-bufmon Enable SCTP buffer monitoring

--sctp-stream Enable SCTP stream utilization analysis

--sctp-jitter Enable SCTP jitter measurement

python3 run.py -u config/oai-cn5g-ue.yaml -g config/oai-cn5g-gnb.yaml -vvv ```

Configuring the traffic generator to send IP packets

After PDU session establishment, the traffic generator can generate and send UP traffic for each UE that has established a PDU session. This is achieved by updating the procedures list to include 5GSMPDUSessionTransmission after 5GSMPDUSessionEstabRequest, see the sample below. The generator will generate at most the number of packets per second provided above. The default is (1 << 20), meaning it will generate the most it can.

yaml ... # Procedures: a list of UE initiated messages that trigger a given procedure procedures: - 5GMMRegistrationRequest - 5GSMPDUSessionEstabRequest - 5GSMPDUSessionTransmission - 5GMMMODeregistrationRequest

Running the traffic generator using Docker Compose

You can also run the traffic generator using Docker Compose, which simplifies the process of setting up and running the required dependencies. Here's an example of how to run it with OAI CN and Free5GC:

OAI CN

```bash cd docker-compose

docker compose -f docker-compose-oai.yaml --profile oai up -d

Wait ~10 seconds for UEs to be initiased in DB

docker compose -f docker-compose-oai.yaml --profile cn-tg up -d

See the logs with the NGAP and NAS messages

docker logs cn-tg ```

free5GC

```bash cd docker-compose

docker compose -f docker-compose-free5gc.yaml --profile free5gc up -d

Wait ~10 seconds for UEs to be initiased in DB

docker compose -f docker-compose-free5gc.yaml --profile cn-tg up -d

See the logs with the NGAP and NAS messages

docker logs cn-tg ```

Output

The traffic generator records the timestamp for each state transition for the UEs. This can be useful for analysing the performance of the Core Network, the computation cost of each prodecure, among other things. When the traffic genetaor exists, this information is stored in files procedure_times_{cpu} (since each CPU will act an an independent gNB). The SCTP tracing tools generate data that can be visualised to understand protocol behavior.

Below is a sample result analysis you can extract from the information.

Cummulative requests by Procedure Operation Name Active requests by Procedure Operation Name Total active requests by Procedure Operation Name SCTP Round Trip Time Analysis SCTP Buffer Utilization SCTP Inter-Packet Jitter SCTP Retransmission Events

Validation/Compliance testing of 5GC responses

The traffic generator can be used to validate responses from the core network. The response data is checked against what's stated in the 3GPP TS 24.501 version 15.7.0. To start validate increase the verbose of the generator: vvvv will print only failed validations and vvvvv will print all the validation results.

Notes

For a tutorial on how to run or test the traffic generator with open source 5G networks see the Performance study of Open Source 5G Core networks under docs folder.

Owner

  • Login: tariromukute
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
title: 5G Core Network Traffic Generator
message: Please cite this software using these metadata.
type: software
authors:
  - given-names: Tariro
    family-names: Mukute
    email: tariromukute@gmail.com
url: https://github.com/tariromukute/cn-tg
version: 0.1.0

GitHub Events

Total
  • Issues event: 4
  • Watch event: 4
  • Delete event: 1
  • Issue comment event: 14
  • Push event: 4
  • Pull request event: 8
  • Fork event: 3
  • Create event: 1
Last Year
  • Issues event: 4
  • Watch event: 4
  • Delete event: 1
  • Issue comment event: 14
  • Push event: 4
  • Pull request event: 8
  • Fork event: 3
  • Create event: 1

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 0
  • Total pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: less than a minute
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: less than a minute
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • bluemelov1 (2)
  • romoreira (1)
Pull Request Authors
  • tariromukute (3)
  • priyanshs (1)
  • bluemelov1 (1)
Top Labels
Issue Labels
Pull Request Labels