A professional, feature-rich simulator for Data Link Layer ARQ protocols
Modern GUI β’ Real-time Analytics β’ Interactive Tutorials β’ Dark/Light Theme
- β Stop-and-Wait ARQ - Simple, reliable transmission
- β Go-Back-N ARQ - Sliding window with cumulative ACKs
- β Selective Repeat ARQ - Most efficient with individual ACKs
- π¨ 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
- Python 3.8 or higher
- pip package manager
# 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-
Select Protocol
- Stop-and-Wait
- Go-Back-N
- Selective Repeat
- Compare All (runs all three)
-
Configure Parameters
- Number of packets (1-100)
- Loss probability (0.0-1.0)
- Window size (1-20)
- Timeout (seconds)
-
Run Simulation
- Click "βΆ Run Simulation"
- Watch real-time output
- View live metrics
- Analyze comparison graphs
Click "π Load Preset" to choose from:
- WiFi networks (Excellent/Good/Poor)
- Mobile networks (4G/5G)
- Satellite links
- Ethernet LAN
- And more!
- Click "πΎ Export Results" to save data as CSV
- Includes all metrics and efficiency calculations
- Perfect for reports and analysis
Access interactive lessons to learn:
- Introduction to ARQ protocols
- Protocol-specific deep dives
- Performance comparisons
- Best practices
- Primary: Deep Teal (#1F7A8C)
- Success: Teal-Green (#2A9D8F)
- Warning: Sand (#F2CC8F)
- Error: Soft Red (#E76F51)
- Stop-and-Wait: Coral-Red (#E76F51)
- Go-Back-N: Blue (#2E5EAA)
- Selective Repeat: Green-Teal (#2A9D8F)
- Light Mode: Clean, professional appearance
- Dark Mode: Easy on the eyes for extended use
The simulator tracks:
- Total packets sent
- Retransmissions count
- ACKs received
- Timeout events
- Protocol efficiency (%)
- Execution time
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
Run the test suite:
cd tests
python test_protocols.pyTest Coverage:
- β 15 comprehensive test cases
- β Unit tests for all components
- β Integration tests for protocols
- β Edge case validation
- Understand ARQ protocol mechanisms
- Compare protocol efficiency
- Analyze network performance
- Explore trade-offs in protocol design
- Computer Networks courses
- Protocol demonstration
- Performance analysis
- Research projects
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!
- Start with Low Loss Rates (0.1-0.2) to see basic behavior
- Increase Loss Rates (0.3-0.5) to see protocol differences
- Experiment with Window Sizes to find optimal values
- Use Presets for realistic network conditions
- Compare All Protocols to see performance differences
- Configurable packet loss probability
- Variable transmission delays
- Realistic timeout handling
- Random ACK loss simulation
- Stop-and-Wait: Alternating bit protocol
- Go-Back-N: Cumulative acknowledgments
- Selective Repeat: Individual ACKs with buffering
- β¨ Modern UI with design system
- π Dark/light theme support
- π Real-time metrics dashboard
- πΎ CSV export functionality
- π Network scenario presets
- π Interactive tutorial system
- β‘ Performance improvements
- Basic protocol implementations
- Simple GUI interface
- CLI support
- Basic testing
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
Created for educational purposes as part of Computer Science Engineering curriculum.
Course: Computer Networks
Semester: 5
Project Type: Data Link Layer Protocol Simulation
Date: February 2026
- Computer Networks textbook by Kurose & Ross
- Academic faculty for guidance
- Open-source community for tools and libraries
For questions or issues:
- Review documentation in
docs/folder - Check test suite for examples
- Refer to code comments
- Use tutorial mode for learning
What makes this simulator special:
- Professional Quality - Production-ready code
- Modern Design - Beautiful, intuitive interface
- Educational Focus - Built specifically for learning
- Comprehensive Testing - 100% test pass rate
- Real-world Scenarios - Practical network presets
- Interactive Learning - Built-in tutorial system
- Export Capabilities - Easy data analysis
- Theme Support - Comfortable for any environment
Ready to explore network protocols? Launch the simulator and start learning!
cd src
python main_gui.pyNetwork Protocol Simulator - Enterprise Edition v2.0
Making network protocols easy to understand!