Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Network Protocol Simulator - Enterprise Edition

A professional, feature-rich simulator for Data Link Layer ARQ protocols

Modern GUI β€’ Real-time Analytics β€’ Interactive Tutorials β€’ Dark/Light Theme


🌟 Features

Core Protocols

  • βœ… Stop-and-Wait ARQ - Simple, reliable transmission
  • βœ… Go-Back-N ARQ - Sliding window with cumulative ACKs
  • βœ… Selective Repeat ARQ - Most efficient with individual ACKs

Enterprise Features

  • 🎨 Modern UI - Professional design with dark/light themes
  • πŸ“Š Real-time Analytics - Live metrics dashboard
  • πŸ“ˆ Visual Comparisons - Interactive charts and graphs
  • πŸ’Ύ Export Results - CSV export for analysis
  • πŸ“‹ Network Presets - Real-world scenarios (WiFi, 4G, Satellite, etc.)
  • πŸŽ“ Interactive Tutorials - Learn protocols step-by-step
  • ⚑ Performance Optimized - Fast, responsive interface

πŸš€ Quick Start

Prerequisites

  • Python 3.8 or higher
  • pip package manager

Installation

# Clone or download the project
cd network_protocol_simulator

# Install dependencies
pip install -r requirements.txt

# Run the simulator
cd src
python main_gui.py

πŸ“– User Guide

Running Simulations

  1. Select Protocol

    • Stop-and-Wait
    • Go-Back-N
    • Selective Repeat
    • Compare All (runs all three)
  2. Configure Parameters

    • Number of packets (1-100)
    • Loss probability (0.0-1.0)
    • Window size (1-20)
    • Timeout (seconds)
  3. Run Simulation

    • Click "β–Ά Run Simulation"
    • Watch real-time output
    • View live metrics
    • Analyze comparison graphs

Using Presets

Click "πŸ“‹ Load Preset" to choose from:

  • WiFi networks (Excellent/Good/Poor)
  • Mobile networks (4G/5G)
  • Satellite links
  • Ethernet LAN
  • And more!

Exporting Results

  • Click "πŸ’Ύ Export Results" to save data as CSV
  • Includes all metrics and efficiency calculations
  • Perfect for reports and analysis

Tutorial Mode

Access interactive lessons to learn:

  • Introduction to ARQ protocols
  • Protocol-specific deep dives
  • Performance comparisons
  • Best practices

🎨 Design System

Color Palette

  • Primary: Deep Teal (#1F7A8C)
  • Success: Teal-Green (#2A9D8F)
  • Warning: Sand (#F2CC8F)
  • Error: Soft Red (#E76F51)

Protocol Colors

  • Stop-and-Wait: Coral-Red (#E76F51)
  • Go-Back-N: Blue (#2E5EAA)
  • Selective Repeat: Green-Teal (#2A9D8F)

Themes

  • Light Mode: Clean, professional appearance
  • Dark Mode: Easy on the eyes for extended use

πŸ“Š Performance Metrics

The simulator tracks:

  • Total packets sent
  • Retransmissions count
  • ACKs received
  • Timeout events
  • Protocol efficiency (%)
  • Execution time

πŸ—οΈ Project Structure

network_protocol_simulator/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main_gui.py              # Main GUI application
β”‚   β”œβ”€β”€ packet.py                # Packet data structure
β”‚   β”œβ”€β”€ network_channel.py       # Network simulation
β”‚   β”œβ”€β”€ stop_and_wait.py         # Stop-and-Wait protocol
β”‚   β”œβ”€β”€ go_back_n.py             # Go-Back-N protocol
β”‚   β”œβ”€β”€ selective_repeat.py      # Selective Repeat protocol
β”‚   β”œβ”€β”€ design_system.py         # UI design system
β”‚   β”œβ”€β”€ network_scenarios.py     # Pre-configured scenarios
β”‚   └── tutorial_system.py       # Interactive tutorials
β”œβ”€β”€ tests/
β”‚   └── test_protocols.py        # Comprehensive test suite
β”œβ”€β”€ docs/
β”‚   └── [Documentation files]
β”œβ”€β”€ requirements.txt             # Python dependencies
└── README.md                    # This file

πŸ§ͺ Testing

Run the test suite:

cd tests
python test_protocols.py

Test Coverage:

  • βœ… 15 comprehensive test cases
  • βœ… Unit tests for all components
  • βœ… Integration tests for protocols
  • βœ… Edge case validation

πŸ“š Educational Value

Learning Outcomes

  • Understand ARQ protocol mechanisms
  • Compare protocol efficiency
  • Analyze network performance
  • Explore trade-offs in protocol design

Use Cases

  • Computer Networks courses
  • Protocol demonstration
  • Performance analysis
  • Research projects

🎯 Typical Results

Example: 20 packets, 20% loss, window size 5

Protocol Packets Sent Retransmissions Efficiency
Stop-and-Wait 28 8 71.4%
Go-Back-N 32 12 62.5%
Selective Repeat 24 4 83.3%

Selective Repeat is most efficient!


πŸ’‘ Tips for Best Results

  1. Start with Low Loss Rates (0.1-0.2) to see basic behavior
  2. Increase Loss Rates (0.3-0.5) to see protocol differences
  3. Experiment with Window Sizes to find optimal values
  4. Use Presets for realistic network conditions
  5. Compare All Protocols to see performance differences

πŸ”§ Technical Details

Network Simulation

  • Configurable packet loss probability
  • Variable transmission delays
  • Realistic timeout handling
  • Random ACK loss simulation

Protocol Implementation

  • Stop-and-Wait: Alternating bit protocol
  • Go-Back-N: Cumulative acknowledgments
  • Selective Repeat: Individual ACKs with buffering

πŸ“ Version History

v2.0 - Enterprise Edition (Current)

  • ✨ Modern UI with design system
  • πŸŒ“ Dark/light theme support
  • πŸ“Š Real-time metrics dashboard
  • πŸ’Ύ CSV export functionality
  • πŸ“‹ Network scenario presets
  • πŸŽ“ Interactive tutorial system
  • ⚑ Performance improvements

v1.0 - Initial Release

  • Basic protocol implementations
  • Simple GUI interface
  • CLI support
  • Basic testing

πŸ‘₯ Contributing

This is an academic project for educational purposes.

Suggestions for Enhancement:

  • Real socket-based networking
  • Network animation
  • Additional protocols (TCP-like)
  • Congestion control simulation
  • Mobile app version

πŸ“„ License

Created for educational purposes as part of Computer Science Engineering curriculum.


πŸŽ“ Academic Information

Course: Computer Networks
Semester: 5
Project Type: Data Link Layer Protocol Simulation
Date: February 2026


πŸ™ Acknowledgments

  • Computer Networks textbook by Kurose & Ross
  • Academic faculty for guidance
  • Open-source community for tools and libraries

πŸ“ž Support

For questions or issues:

  1. Review documentation in docs/ folder
  2. Check test suite for examples
  3. Refer to code comments
  4. Use tutorial mode for learning

✨ Standout Features

What makes this simulator special:

  1. Professional Quality - Production-ready code
  2. Modern Design - Beautiful, intuitive interface
  3. Educational Focus - Built specifically for learning
  4. Comprehensive Testing - 100% test pass rate
  5. Real-world Scenarios - Practical network presets
  6. Interactive Learning - Built-in tutorial system
  7. Export Capabilities - Easy data analysis
  8. Theme Support - Comfortable for any environment

Ready to explore network protocols? Launch the simulator and start learning!

cd src
python main_gui.py

Network Protocol Simulator - Enterprise Edition v2.0
Making network protocols easy to understand!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages