This project provides a comprehensive analysis of 5G Core Network traffic using real-world datasets. The primary goal is to extract, visualize, and summarize key network metrics and communication patterns from packet capture data, supporting research and education in next-generation mobile networks.
The analysis uses the 5G-Core-Networks-Datasets, which contains packet captures and CSV exports from a 5G core network emulation. The project generates summary statistics, protocol distributions, network topology graphs, and time-series visualizations to help understand the behavior and structure of 5G core network traffic.
We use the 5G-Core-Networks-Datasets, which includes:
- Dataset1.pcapng: A packet capture file containing initial UE registration and over two hours of 5G core network operations.
- Dataset2.csv: A CSV export with selected fields per packet (sequence number, timestamp, source/destination IP, protocol, length, and info).
The dataset captures traffic among various 5G core network functions (AMF, SMF, UPF, etc.) and user equipment, providing a realistic view of network interactions.
- PCAP Processing: The original implementation in
main.py
usespyshark
to analyze the.pcapng
file directly. However, due to the large size of the dataset, this approach is time-consuming. - Optimized Analysis: To address performance issues, we use
temp.py
, which extracts a representative sample from the.pcapng
file usingtshark
and processes the resulting CSV for faster analysis.
- Traffic Pattern Analysis: Compute total packets, unique IPs, protocol distributions, and top talkers.
- Network Topology Visualization: Build a directed graph of network communications and visualize the most significant connections.
- Packet Length Analysis: Plot the distribution of packet sizes and analyze by protocol.
- Time-Series Analysis: Visualize packet activity over time and by protocol.
- Conversation Patterns: Identify common communication flows and protocol sequences between network functions.
- Summary Report Generation: Output a detailed summary of findings and visualizations.
All generated plots and the summary report are saved in the output_metrics/
directory.
-
Install Dependencies
Ensure you have Python 3.x and install required packages:pip install pandas matplotlib seaborn networkx pyshark
-
Download the Dataset
Clone or download the 5G-Core-Networks-Datasets repository and place it in the project directory. -
Run the Analysis
Execute the optimized analysis script:python temp.py
This will generate summary statistics, plots, and a report in
output_metrics/
and as5g_network_analysis_summary.txt
.
main.py
: Original analysis script (slower, direct.pcapng
processing).temp.py
: Optimized analysis using CSV extraction for faster results.output_metrics/
: Directory for generated plots and visualizations.5g_network_analysis_summary.txt
: Summary report of the analysis.5G-Core-Networks-Datasets/
: Directory containing the dataset.
- Harshit Agrawal (202251053) - drive link
- Malaika Varshney (202251069) - drive link
- Ameya Naik (202251012) - drive link
Dr. Bhupendra Kumar
- Harshit Agrawal (202251053)
- Malaika Varshney (202251069)
- Ameya Naik (202251012)