Experimental framework, network topologies, and performance benchmarking testbed developed for the thesis "Comparative Study of Network Emulators: A Detailed Analysis of Mininet and Kathara" at Università degli Studi di Milano - Bicocca.
- Thesis Report
- Project Overview
- Emulators Comparison
- Emulation Scenarios
- Performance Benchmarking Framework
- Prerequisites & System Setup
- Execution Guide
- Troubleshooting & Housekeeping
- Repository Structure
- Academic Credits & Citation
The complete thesis document is available in this repository:
- Title: Comparative Study of Network Emulators: A Detailed Analysis of Mininet and Kathara
- Author: Matteo Broglio (Matricola
899562) - Supervisor (Relatore): Prof. Marco Savi
- Co-Supervisor (Correlatore): Dott. Jacopo Talpini
- Institution: Università degli Studi di Milano - Bicocca (UNIMIB)
- Department: Dipartimento di Informatica, Sistemistica e Comunicazione (DISCo)
- Academic Year: 2024 - 2025
Network emulation is critical for testing, research, and education by replicating realistic network behaviors inside controlled sandbox environments. This work analyzes architectural designs, deployment overhead, runtime scalability, and usability across Mininet, Kathara, and their intersection in Containernet:
- Mininet: Delivers outstanding resource efficiency and sub-second startup times by exploiting Linux kernel network namespaces (
netns) and Open vSwitch (OVS). Ideal for large-scale routing graphs on constrained hardware, though sharing the underlying host filesystem and kernel. - Kathara: Leverages containerization (Docker) and virtual collision domains to enforce strict isolation, cross-platform portability (Linux, macOS, Windows), and reproducible lab environments, at the expense of higher CPU and memory overhead during container lifecycle events.
- Containernet: Acts as a bridge, embedding Docker containers into Mininet's programmable OpenFlow data plane.
This repository provides an empirical, reproducible testbed implementing functionally equivalent networking scenarios across all three emulators.
Key objectives:
- Functional Equivalence: Verifying identical behavior and convergence times across emulators for standard L2/L3 services, dynamic routing, and DNS resolution.
- Protocol Integration: Deploying production-grade protocol stacks including FRRouting (FRR) for BGP/OSPF/RIP and BIND9 for hierarchical DNS.
- Resource Profiling: Measuring and visualizing real-time CPU utilization (
%CPU) and virtual memory footprint (VSZ,%MEM) under automated benchmarking runs.
| Dimension | Mininet | Kathara | Containernet |
|---|---|---|---|
| Virtualization Unit | Linux Network Namespaces (netns) |
Docker Containers | Docker Containers & Host Processes |
| Data Plane / Switching | Open vSwitch (OVS) / Linux Bridges | Software Collision Domains (Bridges) | Open vSwitch (OVS) / Linux Bridges |
| Routing Suite | Host FRRouting (multi-instance /etc/frr) |
kathara/frr Docker Image |
Container-embedded daemons |
| SDN / OpenFlow | Native, full OpenFlow support | No native OpenFlow (L2/L3 focused) | Full OpenFlow via OVS |
| Application Isolation | Shared filesystem, isolated network | Completely isolated container filesystems | Completely isolated container filesystems |
| Topology Definition | Python API (Mininet()) |
Declarative configuration (lab.conf) |
Python API (Containernet()) |
| Resource Overhead | Minimal CPU and memory footprint | Moderate (container lifecycle overhead) | Moderate (Docker + OVS orchestration) |
All scenarios are duplicated or functionally mapped across platforms:
| Scenario | Category | Description | Mininet | Kathara | Containernet |
|---|---|---|---|---|---|
| TwoHosts | Baseline | Two nodes connected via L2 switch; baseline latency and resource consumption | ✅ | ✅ | — |
| Client - Server / WebServer | Application | Client host interacting with an HTTP web server | ✅ | ✅ | — |
| StaticRouting | L3 Forwarding | Multi-hop network with static routes configured across gateways | ✅ | ✅ | — |
| RIP | Dynamic Routing | Distance-vector routing with FRRouting ripd across redundant links |
✅ | ✅ | — |
| OSPF | Dynamic Routing | Link-state routing with FRRouting ospfd across multi-router mesh |
✅ | ✅ | — |
| BGP | Exterior Gateway | Inter-AS eBGP peering (AS 10 & AS 20) exchanging internal prefixes | ✅ | ✅ | — |
| DNS (Simple & Hierarchical) | Network Services | Complete DNS resolution hierarchy from Root to TLD to Authoritative | ✅ | ✅ | ✅ |
| LoadBalancer | High Availability | L4/L7 load distribution balancing requests across 3 backend web servers | ✅ | ✅ | — |
| Multiple Solutions | Complex Mesh | Multi-AS network with multiple paths, dynamic routing, and redundant services | ✅ | ✅ | — |
Routing scenarios in Mininet and Kathara rely on FRRouting (FRR):
- RIP: Demonstrates automatic route convergence and recovery upon link failure.
- OSPF: Validates link-state database synchronization and shortest path computation.
- BGP: Establishes autonomous system peering between
as10r1(AS 10) andas20r1(AS 20), announcing customer and server subnets.
The DNS lab replicates the global domain name resolution hierarchy:
[ Root DNS (.) ]
/ \
[ TLD .it ] [ TLD .com ]
| |
[ unimib.it (Auth) ] [ amazon.com (Auth) ]
| |
[ Web Server ] [ Web Server ]
- Kathara & Containernet: Deploys independent BIND9 DNS servers (
dnsroot,dnsit,dnscom,dnsunimib,dnsamazon) and HTTP servers (wsunimib,wsamazon). - Validated via recursive queries issued from client nodes using
digandnslookup.
- A dedicated reverse proxy / load balancer distributes incoming HTTP client traffic across three distinct backend servers (
ws1,ws2,ws3).
- High-density topology featuring multi-homed routers (
as20r1toas20r5), dynamic rerouting, and policy routing.
To quantify the runtime footprint of each emulator, automated monitoring tools track resource consumption:
- Logging Scripts:
Mininet/Performance Test/logger.sh: Polls processes matchingpython,frr,mininet,ovs,iperfevery second.Kathara/Performance Test/log_docker.sh: Polls processes matchingkatharaanddockerevery second.- Recorded metrics: Process ID,
%CPU,%MEM, Virtual Memory Size (VSZin KB), and process command.
- Graph Generator (
GraphCreator.py):- Parses time-series log files (
mininet_usage.log,kathara_usage.log). - Computes aggregated CPU and Memory curves relative to experiment execution time.
- Exports publication-ready SVG charts (
*_cpu_usage.svg,*_memory_usage.svg).
- Parses time-series log files (
A Linux system (Ubuntu 20.04/22.04 LTS recommended) with root privileges is required.
sudo apt-get update
sudo apt-get install -y python3 python3-pip python3-venv openvswitch-switch frr docker.io
python3 -m pip install matplotlib- Mininet:
sudo apt-get install -y mininet
- Kathara:
Follow instructions at Kathara Official Documentation:
sudo add-apt-repository ppa:kathara/ppa sudo apt-get update sudo apt-get install -y kathara
- Containernet: Follow installation steps at Containernet GitHub.
cd "Mininet/Thesis Scenarios/StaticRouting"
sudo python3 StaticRouting.pyPrior to launching routing scenarios, initialize the FRR daemon directories:
cd "Mininet/Thesis Scenarios/BGP"
# 1. Setup FRR node directories and permissions
chmod +x config_frr.sh
sudo ./config_frr.sh
# 2. Run the Mininet topology
sudo python3 BGP.pyKathara scenarios reside in Kathara/ThesisLabs/<scenario>/:
cd "Kathara/ThesisLabs/DNS"
# Start the lab (deploys containers and connects collision domains)
kathara lstart
# Inspect active nodes
kathara linfo
# Open a shell on the client PC
kathara connect pc1
# Inside pc1: test DNS resolution
dig @192.168.0.5 www.unimib.it
ping -c 3 192.168.0.2
# Clean up the lab
kathara lcleancd "Containernet/DNS Simple"
chmod +x build-images.sh
./build-images.sh
sudo python3 containernet_dns_topo.pycd "Containernet/DNS Kathara"
chmod +x build-images.sh
./build-images.sh
sudo python3 containernet_dns_topo.py-
Launch the logger in background:
cd "Mininet/Performance Test" # or "Kathara/Performance Test" chmod +x logger.sh ./logger.sh & LOGGER_PID=$!
-
Execute your scenario (e.g., run
BGP.pyorkathara lstart). -
Terminate logging:
kill -SIGINT $LOGGER_PID
-
Generate vector performance plots:
python3 GraphCreator.py .Outputs will be saved as SVG files in the current folder.
Because emulation tools allocate virtual interfaces, kernel namespaces, and software switches, cleanup commands are essential when topologies exit unexpectedly:
- Clean Mininet & Open vSwitch State:
sudo mn -c sudo killall -9 frr
- Clean Kathara & Docker Containers:
kathara wipe -f # Or brute-force purge running emulator containers: docker rm -f $(docker ps -aq --filter "name=kathara") 2>/dev/null || true
- Containernet Cleanup:
sudo mn -c docker rm -f $(docker ps -aq --filter "name=containernet") 2>/dev/null || true
├── Broglio_Matteo_RelFin_LT_25072025.pdf # Full Thesis Report PDF
├── README.md # Comprehensive Documentation
│
├── Containernet/
│ ├── DNS Kathara/ # Multi-level hierarchical DNS (Root, TLD, Auth, Web)
│ │ ├── build-images.sh # Docker build script for BIND9 container images
│ │ └── containernet_dns_topo.py
│ ├── DNS Simple/ # Single-server DNS testbed
│ │ ├── build-images.sh
│ │ └── containernet_dns_topo.py
│ └── start.sh # Helper startup script
│
├── Kathara/
│ ├── Performance Test/ # Logging daemon and plotting script
│ │ ├── log_docker.sh
│ │ └── GraphCreator.py
│ └── ThesisLabs/ # Kathara declarative network labs
│ ├── BGP/ # eBGP inter-AS lab with FRR
│ ├── Client - Server/ # Web server lab
│ ├── DNS/ # Hierarchical BIND9 DNS lab
│ ├── LoadBalancer/ # Multi-backend HTTP load balancer
│ ├── MultipleSolutions/ # Multi-path resilient routing mesh
│ ├── OSPF/ # Multi-router OSPF mesh
│ ├── RIP/ # Dynamic RIP routing
│ ├── StaticRouting/ # Multi-hop static routing
│ ├── TwoHosts/ # Two hosts baseline lab
│ └── WebServer/ # HTTP server lab
│
└── Mininet/
├── Performance Test/ # Process monitor and SVG graph generator
│ ├── logger.sh
│ └── GraphCreator.py
└── Thesis Scenarios/ # Mininet Python-driven topologies
├── BGP/ # FRR eBGP topology
├── Client - Server/ # HTTP client-server scenario
├── DNS/ # Local DNS resolution
├── LoadBalancer/ # L4/L7 load balancer scenario
├── Multiple Solutions/ # Multi-AS topology with FRR routing
├── OSPF/ # FRR OSPF topology
├── RIP/ # FRR RIP topology
├── StaticRouting/ # Static IP forwarding topology
└── TwoHosts/ # Two hosts switched topology
This research was conducted as part of the Final Examination for the Bachelor's Degree in Computer Science (Laurea Triennale in Informatica) at Università degli Studi di Milano - Bicocca:
- Candidate: Matteo Broglio
- Advisor: Prof. Marco Savi
- Co-Advisor: Dott. Jacopo Talpini
- Department: Dipartimento di Informatica, Sistemistica e Comunicazione (DISCo)
- Academic Year: 2024 / 2025