Subnet (Network Simulation)

Dockerized Python simulation for testing TCP/UDP connectivity across multi-subnet topologies with IPv4/IPv6 helpers, routers, hosts, and an active test client.

Python Docker IPv4 IPv6 TCP/UDP Networking
Subnet Network Simulation

Project Overview

A comprehensive Docker-based network simulation that creates an isolated, reproducible multi-subnet environment for testing network protocols and connectivity. The simulation includes two routers, two hosts, and a test client distributed across three subnets, providing a realistic testing environment for network analysis and validation.

What It Does

  • Validates end-to-end connectivity across multiple subnets
  • Measures network performance including latency (RTT) and throughput
  • Performs comprehensive testing including port scanning and stress testing
  • Supports both IPv4 and IPv6 protocols with dedicated utilities
  • Provides management interfaces for real-time network introspection

Core Components

Routers (router.py)

Static routing tables, packet forwarding simulation, and management commands including SHOW_ROUTES, SHOW_STATS, PING, and TRACEROUTE.

Hosts (host.py)

TCP echo/time and UDP echo services with connection tracking and management commands for testing and monitoring.

Test Client (test_client.py)

Automated testing suite that performs connection tests, subnet scans, stress tests, and exports results in JSON format with comprehensive statistics.

IPv6 Utilities (ipv6_support.py)

Address generation, validation, and basic IPv6 connectivity checks to ensure proper dual-stack network support.

Key Capabilities

  • Dockerized multi-subnet topology with two routers, two hosts, and a test client
  • TCP and UDP service endpoints (echo/time) for realistic end-to-end testing
  • Active tests: connection (RTT), subnet port scanning, and concurrent stress tests
  • Management planes on routers and hosts for routes, stats, services, and pings
  • IPv6 helpers for address generation, validation, and basic connectivity checks
  • Portable builds (removed native-compiled deps) with system-command fallbacks