© 2019–2026 Antonio Clim, Andrei Toma | by Revolvix
# ═══════════════════════════════════════════════════════════════════════════════
# CLONE_REPOSITORY
# ═══════════════════════════════════════════════════════════════════════════════
git clone https://github.com/antonioclim/netENwsl.git
cd netENwsl
# ═══════════════════════════════════════════════════════════════════════════════
# NAVIGATE_TO_WEEK
# ═══════════════════════════════════════════════════════════════════════════════
cd 01enWSL # or any week (01-14)
# ═══════════════════════════════════════════════════════════════════════════════
# VERIFY_ENVIRONMENT
# ═══════════════════════════════════════════════════════════════════════════════
python3 setup/verify_environment.py
# ═══════════════════════════════════════════════════════════════════════════════
# START_LABORATORY
# ═══════════════════════════════════════════════════════════════════════════════
python3 scripts/start_lab.py
# ═══════════════════════════════════════════════════════════════════════════════
# RUN_FORMATIVE_QUIZ (optional — test your knowledge)
# ═══════════════════════════════════════════════════════════════════════════════
make quiz
# Or: python3 formative/run_quiz.py
# ═══════════════════════════════════════════════════════════════════════════════
# ACCESS_PORTAINER
# ═══════════════════════════════════════════════════════════════════════════════
# Open in browser: http://localhost:9000
# Credentials: stud / studstudstud| Service | Username | Password |
|---|---|---|
| Ubuntu WSL | stud |
stud |
| Portainer | stud |
studstudstud |
💭 PREDICTION: After running
python3 scripts/start_lab.py, how many containers do you think will start for Week 1?
Course: Computer Networks (25.0205IF3.2-0003)
Programme: Economic Informatics, Year III, Semester 2
Institution: Bucharest University of Economic Studies (ASE), Faculty of Cybernetics, Statistics and Economic Informatics (CSIE)
Academic Year: 2025–2026
Laboratory materials are available in two languages, organised in separate repositories:
| Repository | Language | URL | Naming Convention |
|---|---|---|---|
| netENwsl | 🇬🇧 English | https://github.com/antonioclim/netENwsl | <N>enWSL (e.g. 1enWSL, 14enWSL) |
| netROwsl | 🇷🇴 Romanian | https://github.com/antonioclim/netROwsl | <NN>roWSL (e.g. 01roWSL, 14roWSL) |
| Repository | Language | URL | Status |
|---|---|---|---|
| NETro | 🇷🇴 Romanian | https://github.com/antonioclim/NETro | Beta — requires Linux VM |
| netEN | 🇬🇧 English | https://github.com/antonioclim/netEN | Beta — requires Linux VM |
| Feature | netROwsl / netENwsl (WSL) | NETro / netEN (Beta VM) |
|---|---|---|
| Execution Environment | WSL2 + Docker + Portainer | Linux VM + Mininet |
| Host Operating System | Native Windows 10/11 | Any OS with VM (VirtualBox/VMware) |
| Naming Convention | <NN>roWSL / <N>enWSL |
WEEK<N> |
| Automation | Python scripts + Makefile | Makefile only |
| Visual Interface | Portainer (port 9000) | CLI only |
| Network Simulation | Docker bridge networks | Mininet (complex topologies) |
| Traffic Capture | Native Windows Wireshark | tcpdump in VM |
| Setup Complexity | ⭐⭐ Accessible | ⭐⭐⭐⭐ Advanced |
| PlantUML Diagrams | ✗ | ✓ |
| Presentation Slides | ✗ | ✓ |
| Completeness | 14 complete kits | 14 weeks (variable structure) |
| Documentation | 2,600+ lines | ~1,000 lines |
| Resource Usage | ~500MB RAM base | ~2-4GB RAM (VM) |
- No separate VM required — Runs directly on Windows without virtualisation overhead
- Visual management — Portainer provides web interface for containers
- Modern Python scripts — Easier to understand than shell scripts
- Native Wireshark integration — Direct capture on Windows
- Consistent structure — All 14 kits have identical organisation
- Extended documentation — Detailed README with complete troubleshooting
- Formative assessment — Interactive quizzes with immediate feedback in every week
- CI/CD ready — GitHub Actions workflows included for quality assurance
- Makefile automation — Standardised targets simplify common operations
- You have Linux experience and prefer CLI
- You need complex Mininet topologies
- You want to practise Linux administration in VM
- Your system does not support WSL2
This documentation covers the WSL repositories (netROwsl/netENwsl), with specific instructions for each language variant.
- 5. System Requirements
- 6. Standard Credentials
- 7. Step-by-Step Installation
- 8. Installation Verification
- 9. Quick Laboratory Start Guide
- 10. Individual Week Cloning
- 11. Week 1: Network Fundamentals
- 12. Week 2: Architectural Models and Socket Programming
- 13. Week 3: Advanced Network Programming Models
- 14. Week 4: Physical and Data Link Layers
- 15. Week 5: Network Layer and IP Addressing
- 16. Week 6: NAT/PAT, Support Protocols and SDN
- 17. Week 7: Packet Capture, Filtering and Security
- 18. Week 8: Transport Layer, HTTP and Reverse Proxy
- 19. Week 9: Session and Presentation Layers
- 20. Week 10: Application Layer Protocols
- 21. Week 11: Load Balancing
- 22. Week 12: Email Protocols and RPC
- 23. Week 13: IoT and Network Security
- 24. Week 14: Integrated Review and Assessment
- 25. Standard Kit Structure
- 26. IP Addressing Plan
- 27. Port Allocation Conventions
- 28. Technologies and Tools Used
- 29. Complete Troubleshooting Guide
- 30. Essential Commands — Quick Reference Sheet
- 31. Higher-Level Exercises (EVALUATE & CREATE)
- 32. Live Coding Guide for Instructors
- 33. FAQ — Frequently Asked Questions
- 34. Licence
This repository contains complete laboratory kits for the Computer Networks course, covering all 14 weeks of the university semester. The materials are designed and optimised specifically for deployment on Windows 10/11 systems using WSL2 (Windows Subsystem for Linux) with Docker containerisation and visual management through Portainer CE, providing students and instructors with a portable, reproducible, isolated and professional laboratory environment.
Each weekly kit constitutes a self-contained and complete educational unit, comprising:
| Component | Description |
|---|---|
| 📚 Structured Documentation | Clearly articulated theoretical foundations, explicit learning objectives and step-by-step guides |
| 🐍 Python Exercises | Gradual progression from guided implementations to independent complex problem-solving |
| 🐳 Docker Compose Environments | Pre-configured multi-container network topologies, ready to use |
| 🖥️ Portainer Interface | Visual management of Docker containers and networks |
| 🧪 Testing Frameworks | Automated validation of exercise completion and environment integrity |
| 📡 Capture Facilities | Scripts for packet capture and protocol forensic analysis |
| 🦈 Wireshark Guides | Specific filters for each protocol and week |
| 📋 Reference Sheets | Essential CLI commands consolidated for quick access |
| 📝 Homework Assignments | Additional exercises with reference solutions for independent study |
| ✅ Formative Assessment | Interactive quizzes with immediate feedback and LO mapping |
| ⚙️ CI/CD Integration | GitHub Actions workflows for automated quality checks |
| 🔧 Makefile Automation | Standardised targets for common operations (make quiz, make test) |
The pedagogical approach emphasises learning through direct observation and experimentation:
┌─────────────────────────────────────────────────────────────────────────────┐
│ EXPERIENTIAL LEARNING CYCLE │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ BUILD │ ──▶ │ GENERATE │ ──▶ │ CAPTURE │ │
│ │ network │ │ network │ │ packets │ │
│ │ services │ │ traffic │ │ PCAP │ │
│ └──────────────┘ └──────────────┘ └──────┬───────┘ │
│ ▲ │ │
│ │ ▼ │
│ ┌──────┴───────┐ ┌──────────────┐ │
│ │ APPLY │ ◀────────────────────── │ ANALYSE │ │
│ │ new │ │ protocols │ │
│ │ knowledge │ │ & behaviour │ │
│ └──────────────┘ └──────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
This methodology bridges theoretical models and operational reality, preparing students for careers in:
- 🌐 Computer network engineering
- 🔒 Cybersecurity analysis and auditing
- 🏗️ Distributed systems development
- ☁️ Cloud infrastructure administration
- 🔧 DevOps and Site Reliability Engineering
| Target Audience | Benefits |
|---|---|
| Students | Complete materials for independent learning, practical exercises and reference solutions |
| Lecturers/Teaching Assistants | Ready-to-use laboratory kits, consistent structure and assessment framework |
| Self-Learners | Complete networking curriculum from fundamentals to advanced topics |
| Professionals | Concept refresher, experimentation sandbox and technical reference |
The course follows a bottom-up architectural exploration aligned with OSI/TCP-IP reference models, beginning with fundamental concepts and diagnostic tools before ascending through the protocol stack:
╔═══════════════════════════════════════════════════════════════════════════════╗
║ LEARNING TRAJECTORY — SEMESTER 2 ║
╠═══════════════════════════════════════════════════════════════════════════════╣
║ ║
║ Week 14 ─┬─ INTEGRATION ════════════════════════════════════════════════ ║
║ │ ║
║ Week 13 ─┤ ┌───────────────────────────────────────────┐ ║
║ Week 12 ─┤ APPLICATION │ • IoT & MQTT (publish/subscribe) │ ║
║ Week 11 ─┤ LAYER │ • Email (SMTP, POP3, IMAP) │ ║
║ Week 10 ─┘ │ • RPC (JSON-RPC, XML-RPC, gRPC) │ ║
║ │ • HTTP/HTTPS, REST APIs, DNS, SSH │ ║
║ │ • Load Balancing │ ║
║ └───────────────────────────────────────────┘ ║
║ ║
║ Week 9 ─┬─ SESSION & ┌───────────────────────────────────────────┐ ║
║ │ PRESENTATION │ • FTP Active/Passive modes │ ║
║ │ │ • Binary serialisation │ ║
║ │ │ • Session state management │ ║
║ └────────────────└───────────────────────────────────────────┘ ║
║ ║
║ Week 8 ─── TRANSPORT ┌───────────────────────────────────────────┐ ║
║ │ • TCP 3-way handshake │ ║
║ │ • HTTP/1.1 server implementation │ ║
║ │ • Nginx reverse proxy & load balancing │ ║
║ └───────────────────────────────────────────┘ ║
║ ║
║ Week 7 ─── SECURITY ┌───────────────────────────────────────────┐ ║
║ & FILTERING │ • iptables firewall rules │ ║
║ │ • Packet filtering (DROP/REJECT) │ ║
║ │ • Port scanning & reconnaissance │ ║
║ │ • tcpdump, tshark, Wireshark │ ║
║ └───────────────────────────────────────────┘ ║
║ ║
║ Week 5 ─┬─ NETWORK ┌───────────────────────────────────────────┐ ║
║ Week 6 ─┘ LAYER │ • IP addressing, CIDR, VLSM │ ║
║ │ • NAT/PAT, SNAT, DNAT │ ║
║ │ • ARP, DHCP, ICMP, NDP │ ║
║ │ • Software-Defined Networking (SDN) │ ║
║ └───────────────────────────────────────────┘ ║
║ ║
║ Week 4 ─── DATA LINK ┌───────────────────────────────────────────┐ ║
║ │ • Ethernet frames, MAC addressing │ ║
║ │ • CRC32 error detection │ ║
║ │ • Binary protocol design │ ║
║ │ • Python struct pack/unpack │ ║
║ └───────────────────────────────────────────┘ ║
║ ║
║ Week 1 ─┬─ FUNDAMENTALS ┌───────────────────────────────────────────┐ ║
║ Week 2 ─┤ │ • CLI diagnostic tools (ip, ss, ping) │ ║
║ Week 3 ─┘ │ • Socket programming (TCP/UDP) │ ║
║ │ • Concurrent servers (threading) │ ║
║ │ • Packet capture & analysis │ ║
║ └───────────────────────────────────────────┘ ║
║ ║
╚═══════════════════════════════════════════════════════════════════════════════╝
Each laboratory session targets specific cognitive levels, progressing from simple to complex:
| Cognitive Level | Key Verb | Typical Activities | Assessment Methods |
|---|---|---|---|
| 1. REMEMBER | Recall, Identify, List | Command syntax, protocol fields, concept definitions | Reference sheet completion, quick quizzes |
| 2. UNDERSTAND | Explain, Describe, Compare | Protocol behaviour, traffic patterns, data flows | Written analysis, verbal explanations, diagrams |
| 3. APPLY | Demonstrate, Implement, Use | Using tools in new scenarios, adapting scripts | Functional implementations, logs, reports |
| 4. ANALYSE | Examine, Differentiate, Investigate | Packet captures, troubleshooting workflows, root cause analysis | PCAP annotations, root cause reports |
| 5. EVALUATE | Assess, Critique, Justify | Security posture, design trade-offs, architectural choices | Technical recommendations, audits, peer review |
| 6. CREATE | Design, Build, Develop | Protocol implementations, custom tools, original solutions | Original code, documentation, presentations |
The choice of WSL2 + native Docker in Ubuntu architecture (instead of Docker Desktop) is based on several significant advantages for the educational environment:
| Criterion | WSL2 + Native Docker | Docker Desktop |
|---|---|---|
| 🚀 Performance | Native Linux kernel, fast I/O | Additional virtualisation overhead |
| 💾 Resource Usage | ~500MB base, efficient | ~2GB+ base, high RAM consumption |
| 🌐 Network Fidelity | Complete Linux network stack | Abstraction and limitations |
| 📁 File Integration | Direct access to Windows file system | Mounts with overhead |
| 💰 Licensing | Completely free | Enterprise restrictions (>250 employees) |
| 🎓 Educational Value | Real, transferable Linux skills | Abstraction hiding complexity |
| 🔧 Control | Complete configuration control | Limited configuration |
┌─────────────────────────────────────────────────────────────────────────────────┐
│ WINDOWS 10/11 HOST │
│ │
│ ┌────────────────┐ ┌────────────────┐ ┌────────────────┐ ┌────────────┐ │
│ │ Wireshark │ │ Browser │ │ PowerShell/ │ │ VS Code │ │
│ │ (Native Win │ │ (Portainer │ │ Terminal │ │ (IDE) │ │
│ │ Analyser) │ │ :9000) │ │ Windows │ │ │ │
│ └───────┬────────┘ └───────┬────────┘ └───────┬────────┘ └─────┬──────┘ │
│ │ │ │ │ │
│ │ ┌──────────────┴──────────────┬─────┴──────────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌───────────────────────────────────────────────────────────────────────────┐ │
│ │ vEthernet (WSL) — Virtual Network │ │
│ │ Bridge interface between Windows and Linux │ │
│ │ Dynamic IP: 172.x.x.x │ │
│ └───────────────────────────────────────────┬───────────────────────────────┘ │
│ │ │
│ ┌───────────────────────────────────────────┴───────────────────────────────┐ │
│ │ WSL2 (Lightweight Virtual Machine) │ │
│ │ ┌─────────────────────────────────────────────────────────────────────┐ │ │
│ │ │ Ubuntu 22.04 LTS │ │ │
│ │ │ User: stud | Password: stud │ │ │
│ │ │ ┌───────────────────────────────────────────────────────────────┐ │ │ │
│ │ │ │ Docker Engine 28.2.2 │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │ │ │ │
│ │ │ │ │ Container │ │ Container │ │ Portainer CE │ │ │ │ │
│ │ │ │ │ Lab 1 │ │ Lab 2 │ │ (Port 9000) │ │ │ │ │
│ │ │ │ │ 10.0.X.Y │ │ 10.0.X.Z │ │ stud/studstudstud │ │ │ │ │
│ │ │ │ └─────────────┘ └─────────────┘ └─────────────────────┘ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ ┌─────────────────────────────────────────────────────────┐│ │ │ │
│ │ │ │ │ Docker Networks (bridge) ││ │ │ │
│ │ │ │ │ week1net, week2net, ... week14net (10.0.X.0/24) ││ │ │ │
│ │ │ │ └─────────────────────────────────────────────────────────┘│ │ │ │
│ │ │ └───────────────────────────────────────────────────────────────┘ │ │ │
│ │ └─────────────────────────────────────────────────────────────────────┘ │ │
│ └───────────────────────────────────────────────────────────────────────────┘ │
│ │
│ WSL2 ↔ WINDOWS BOUNDARY │
│ ══════════════════════════════════════════════════════════════════════════ │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ vEthernet (WSL) │ │
│ │ ← Wireshark captures WSL traffic here → │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌───────────────────────┐ │
│ │ Windows Network Stack │ │
│ │ (Internet Access) │ │
│ └───────────────────────┘ │
│ │
└──────────────────────────────────────────────────────────────────────────────────┘
netENwsl/
│
├── 📁 00-startAPPENDIX(week0)/ # ⚠️ READ FIRST! Prerequisites & Python Guide
│ ├── .github/workflows/ # CI configuration for appendix
│ ├── 00BEFORE_ANYTHING_ELSE/ # Essential setup instructions
│ ├── 00LECTURES/ # Lecture materials (S1-S14 HTML)
│ ├── 00PREREQUISITES/ # Prerequisites HTML guide
│ │ ├── PREREQUISITES_EN.html # Interactive HTML guide
│ │ └── wireshark_capture_example.png
│ ├── PYTHON_self_study_guide/ # Python for Networking (self-study)
│ │ ├── PRESENTATIONS_EN/ # 10 HTML presentations
│ │ │ ├── 01_introduction_setup.html
│ │ │ ├── 02_reading_python_code.html
│ │ │ ├── 03_data_types_networking.html
│ │ │ ├── 04_socket_programming.html
│ │ │ ├── 05_code_organisation.html
│ │ │ ├── 06_cli_interfaces.html
│ │ │ ├── 07_packet_analysis.html
│ │ │ ├── 08_concurrency.html
│ │ │ ├── 09_http_protocols.html
│ │ │ └── 10_debugging_best_practices.html
│ │ ├── cheatsheets/ # Quick reference guides
│ │ ├── examples/ # Python code examples
│ │ └── PYTHON_NETWORKING_GUIDE.md # Complete guide (~80KB)
│ ├── docs/ # Pedagogical documentation
│ ├── formative/ # Formative assessment tools
│ ├── Makefile # Automation targets
│ └── LIVE_CODING_INSTRUCTOR_GUIDE.md
│
├── 📁 00PROJ/ # 📋 Course Projects (Teams of 2)
│ ├── .github/workflows/ # CI for projects
│ ├── PROJECTS/ # 15 main projects (P01-P15)
│ │ ├── P01_SDN_Firewall_Mininet.md
│ │ ├── P02_Hybrid_Network_Mininet_Docker.md
│ │ ├── ... (P03-P14)
│ │ └── P15_IoT_Edge_Computing_MQTT.md
│ ├── RESERVE_individual/ # 5 reserve/individual projects (P16-P20)
│ │ ├── P16_HTTP_Analysis_Wireshark.md
│ │ ├── P17_LAN_NAT_DHCP_Network.md
│ │ ├── P18_TCP_Chat_Client_Server.md
│ │ ├── P19_Port_Scanner_Security.md
│ │ └── P20_IoT_Smart_Home_Security.md
│ ├── docs/common/ # Shared project documentation
│ │ ├── code_quality_standards.md
│ │ ├── git_workflow_detailed.md
│ │ ├── pair_programming_guide.md
│ │ └── presentation_guide.md
│ ├── formative/ # Project-level formative tools
│ │ ├── exports/ # LMS export files
│ │ ├── parsons/ # Parsons problems
│ │ └── results/ # Quiz results storage
│ ├── templates/ # Starter templates
│ │ └── starter_kit/ # Project starter code
│ ├── ACKNOWLEDGMENTS.md # Contributors and credits
│ ├── learning_objectives_matrix.md # Cross-project LO mapping
│ └── README.md
│
├── 📁 01enWSL/ # Week 1: Fundamentals of Computer Networks
├── 📁 02enWSL/ # Week 2: Architectural Models and Socket Programming
├── 📁 03enWSL/ # Week 3: Introduction to Network Programming
├── 📁 04enWSL/ # Week 4: Physical Layer, Data Link Layer & Custom Protocols
├── 📁 05enWSL/ # Week 5: Network Layer – IP Addressing, Subnetting, VLSM
├── 📁 06enWSL/ # Week 6: NAT/PAT, Network Support Protocols & SDN
├── 📁 07enWSL/ # Week 7: Packet Interception, Filtering and Defensive Port Probing
├── 📁 08enWSL/ # Week 8: Transport Layer — HTTP Server Implementation and Reverse Proxies
├── 📁 09enWSL/ # Week 9: Session Layer and Presentation Layer
├── 📁 10enWSL/ # Week 10: Application Layer Protocols
├── 📁 11enWSL/ # Week 11: Application Protocols – FTP, DNS, SSH & Load Balancing
├── 📁 12enWSL/ # Week 12: Email Protocols and Remote Procedure Call
├── 📁 13enWSL/ # Week 13: IoT and Security in Computer Networks
├── 📁 14enWSL/ # Week 14: Integrated Recap and Project Evaluation
│
├── 📄 README.md # Main documentation (this file)
├── 📄 LICENCE.md # Restrictive Educational Licence
├── 📄 CONTRIBUTING.md # Contribution guidelines for collaborators
├── 📄 SPECIAL_REPORT.md # Comparative analysis with top universities
├── 📄 TRANSFORMATION_LOG.json # Automated transformation history
└── 📄 TRANSFORMATION_SUMMARY.md # Summary of kit transformations
netROwsl/
│
├── 📁 00-startAPPENDIX(week0)/ # ⚠️ READ FIRST! Prerequisites
│ ├── CERINTE_PRELIMINARE_RO.html # Interactive HTML guide
│ ├── CerintePrelimRO.md # Markdown guide
│ └── exemplu_captura_wireshark.png # Example screenshot
│
├── 📁 01roWSL/ # Week 1: Network Fundamentals
├── 📁 02roWSL/ # Week 2: Models & Sockets
├── 📁 03roWSL/ # Week 3: Network Programming
├── 📁 04roWSL/ # Week 4: Physical & Data Link
├── 📁 05roWSL/ # Week 5: IP Addressing & Subnets
├── 📁 06roWSL/ # Week 6: NAT/PAT, SDN
├── 📁 07roWSL/ # Week 7: Filtering & Security
├── 📁 08roWSL/ # Week 8: Transport & HTTP
├── 📁 09roWSL/ # Week 9: Session & Presentation
├── 📁 10roWSL/ # Week 10: Application Protocols
├── 📁 11roWSL/ # Week 11: Load Balancing
├── 📁 12roWSL/ # Week 12: Email & RPC
├── 📁 13roWSL/ # Week 13: IoT & Security
├── 📁 14roWSL/ # Week 14: Review
│
├── 📄 READMEro.md # Main documentation (RO)
└── 📄 LICENCE.md # Restrictive Educational Licence
| Aspect | netENwsl (English) | netROwsl (Romanian) |
|---|---|---|
| Naming Convention | <N>enWSL |
<NN>roWSL (with zero for 01-09) |
| Documentation | README.md, docstrings EN | READMEro.md, comments RO |
| Script Names | start_lab.py, stop_lab.py |
porneste_lab.py, opreste_lab.py |
| Console Messages | English | Romanian |
| Internal Structure | Identical | Identical |
| Compatibility | Complete | Complete |
| Component | Minimum | Recommended |
|---|---|---|
| Processor | Intel Core i5 / AMD Ryzen 5 | Intel Core i7 / AMD Ryzen 7 |
| Memory RAM | 8 GB | 16 GB |
| Disk Space | 20 GB free | 50 GB free (SSD) |
| Virtualisation | VT-x / AMD-V enabled | VT-x / AMD-V + IOMMU |
| Software | Minimum Version | Verification |
|---|---|---|
| Windows | 10 (build 19041+) or 11 | winver |
| WSL2 | Kernel 5.15+ | wsl --status |
| Ubuntu | 22.04 LTS | lsb_release -a |
| Docker Engine | 24.0+ | docker --version |
| Docker Compose | 2.20+ | docker compose version |
| Python | 3.11+ | python3 --version |
| Wireshark | 4.0+ | About → Wireshark |
| Git | 2.40+ | git --version |
| Service | Username | Password | URL/Access | Notes |
|---|---|---|---|---|
| Ubuntu WSL | stud |
stud |
WSL Terminal | User with sudo privileges |
| Portainer | stud |
studstudstud |
http://localhost:9000 | Min. 12 character password |
⚠️ IMPORTANT: Portainer uses EXCLUSIVELY port 9000. No other laboratory service should use this port!
💭 PREDICTION: What minimum Docker Compose version is required? What will
docker compose versiondisplay on your system?
Open PowerShell as Administrator and run:
# ═══════════════════════════════════════════════════════════════════════════════
# INSTALL_WSL2
# ═══════════════════════════════════════════════════════════════════════════════
wsl --install -d Ubuntu-22.04
# ═══════════════════════════════════════════════════════════════════════════════
# SET_DEFAULT_VERSION
# ═══════════════════════════════════════════════════════════════════════════════
wsl --set-default-version 2
# ═══════════════════════════════════════════════════════════════════════════════
# RESTART_REQUIRED
# ═══════════════════════════════════════════════════════════════════════════════
# Restart your computer after installationAfter restarting, open Ubuntu from the Start Menu:
# ═══════════════════════════════════════════════════════════════════════════════
# CREATE_USER
# ═══════════════════════════════════════════════════════════════════════════════
# When prompted, create user: stud
# Password: stud
# ═══════════════════════════════════════════════════════════════════════════════
# UPDATE_SYSTEM
# ═══════════════════════════════════════════════════════════════════════════════
sudo apt update && sudo apt upgrade -y# ═══════════════════════════════════════════════════════════════════════════════
# INSTALL_DEPENDENCIES
# ═══════════════════════════════════════════════════════════════════════════════
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
# ═══════════════════════════════════════════════════════════════════════════════
# ADD_DOCKER_REPOSITORY
# ═══════════════════════════════════════════════════════════════════════════════
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# ═══════════════════════════════════════════════════════════════════════════════
# INSTALL_DOCKER
# ═══════════════════════════════════════════════════════════════════════════════
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
# ═══════════════════════════════════════════════════════════════════════════════
# CONFIGURE_USER_PERMISSIONS
# ═══════════════════════════════════════════════════════════════════════════════
sudo usermod -aG docker $USER
# ═══════════════════════════════════════════════════════════════════════════════
# START_DOCKER_SERVICE
# ═══════════════════════════════════════════════════════════════════════════════
sudo service docker start# ═══════════════════════════════════════════════════════════════════════════════
# CREATE_PORTAINER_VOLUME
# ═══════════════════════════════════════════════════════════════════════════════
docker volume create portainer_data
# ═══════════════════════════════════════════════════════════════════════════════
# INSTALL_PORTAINER
# ═══════════════════════════════════════════════════════════════════════════════
docker run -d \
--name portainer \
--restart=always \
-p 9000:9000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer-ce:lts
# ═══════════════════════════════════════════════════════════════════════════════
# ACCESS_PORTAINER
# ═══════════════════════════════════════════════════════════════════════════════
# Open browser: http://localhost:9000
# Create account: stud / studstudstudCreate and run this script in Ubuntu:
#!/bin/bash
# verify_lab_environment.sh
# Complete laboratory environment verification script
# ═══════════════════════════════════════════════════════════════════════════════
# DEFINE_COLOURS_AND_COUNTERS
# ═══════════════════════════════════════════════════════════════════════════════
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Colour
ERRORS=0
WARNINGS=0
# ═══════════════════════════════════════════════════════════════════════════════
# DISPLAY_BANNER
# ═══════════════════════════════════════════════════════════════════════════════
echo ""
echo "╔═══════════════════════════════════════════════════════════════════════════╗"
echo "║ COMPUTER NETWORKS LABORATORY ENVIRONMENT VERIFICATION ║"
echo "║ © 2019–2026 Antonio Clim, Andrei Toma ║"
echo "╚═══════════════════════════════════════════════════════════════════════════╝"
echo ""
# ═══════════════════════════════════════════════════════════════════════════════
# DEFINE_CHECK_FUNCTIONS
# ═══════════════════════════════════════════════════════════════════════════════
check_required() {
if eval "$2" &>/dev/null; then
echo -e " ${GREEN}✓${NC} $1"
else
echo -e " ${RED}✗${NC} $1"
((ERRORS++))
fi
}
check_optional() {
if eval "$2" &>/dev/null; then
echo -e " ${GREEN}✓${NC} $1"
else
echo -e " ${YELLOW}○${NC} $1 (optional)"
((WARNINGS++))
fi
}
# ═══════════════════════════════════════════════════════════════════════════════
# DISPLAY_SYSTEM_INFORMATION
# ═══════════════════════════════════════════════════════════════════════════════
echo -e "${BLUE}▶ SYSTEM INFORMATION${NC}"
echo " Hostname: $(hostname)"
echo " Ubuntu: $(lsb_release -d 2>/dev/null | cut -f2)"
echo " Kernel: $(uname -r)"
echo " User: $(whoami)"
echo ""
# ═══════════════════════════════════════════════════════════════════════════════
# CHECK_MAIN_COMPONENTS
# ═══════════════════════════════════════════════════════════════════════════════
echo -e "${BLUE}▶ MAIN COMPONENTS${NC}"
check_required "Python 3.11+" "python3 --version | grep -E 'Python 3\.(1[1-9]|[2-9][0-9])'"
check_required "pip3" "pip3 --version"
check_required "Git" "git --version"
check_required "curl" "curl --version"
check_required "wget" "wget --version"
echo ""
# ═══════════════════════════════════════════════════════════════════════════════
# CHECK_DOCKER
# ═══════════════════════════════════════════════════════════════════════════════
echo -e "${BLUE}▶ DOCKER${NC}"
check_required "Docker Engine" "docker --version"
check_required "Docker Compose" "docker compose version"
check_required "Docker daemon active" "docker info"
check_required "Docker without sudo" "docker ps"
echo ""
# ═══════════════════════════════════════════════════════════════════════════════
# CHECK_PORTAINER
# ═══════════════════════════════════════════════════════════════════════════════
echo -e "${BLUE}▶ PORTAINER (Port 9000)${NC}"
if docker ps | grep -q portainer; then
echo -e " ${GREEN}✓${NC} Portainer running on port 9000"
else
echo -e " ${YELLOW}○${NC} Portainer not running (start manually if needed)"
((WARNINGS++))
fi
echo ""
# ═══════════════════════════════════════════════════════════════════════════════
# CHECK_NETWORK_TOOLS
# ═══════════════════════════════════════════════════════════════════════════════
echo -e "${BLUE}▶ NETWORK TOOLS${NC}"
check_required "tcpdump" "which tcpdump"
check_optional "tshark" "which tshark"
check_required "netcat" "which nc"
check_optional "nmap" "which nmap"
check_optional "iperf3" "which iperf3"
echo ""
# ═══════════════════════════════════════════════════════════════════════════════
# CHECK_PYTHON_LIBRARIES
# ═══════════════════════════════════════════════════════════════════════════════
echo -e "${BLUE}▶ PYTHON LIBRARIES${NC}"
check_required "docker" "python3 -c 'import docker'"
check_required "scapy" "python3 -c 'import scapy.all'"
check_required "dpkt" "python3 -c 'import dpkt'"
check_required "requests" "python3 -c 'import requests'"
check_required "flask" "python3 -c 'import flask'"
check_optional "paramiko" "python3 -c 'import paramiko'"
check_optional "pyftpdlib" "python3 -c 'import pyftpdlib'"
check_optional "paho-mqtt" "python3 -c 'import paho.mqtt.client'"
check_optional "dnspython" "python3 -c 'import dns.resolver'"
check_optional "grpcio" "python3 -c 'import grpc'"
echo ""
# ═══════════════════════════════════════════════════════════════════════════════
# DISPLAY_SUMMARY
# ═══════════════════════════════════════════════════════════════════════════════
echo "═══════════════════════════════════════════════════════════════════════════"
if [ $ERRORS -eq 0 ]; then
echo -e "${GREEN}✅ ALL REQUIRED COMPONENTS ARE CORRECTLY INSTALLED!${NC}"
if [ $WARNINGS -gt 0 ]; then
echo -e "${YELLOW} ($WARNINGS optional components missing)${NC}"
fi
else
echo -e "${RED}❌ $ERRORS REQUIRED COMPONENT(S) MISSING${NC}"
fi
echo "═══════════════════════════════════════════════════════════════════════════"
echo ""
exit $ERRORS- Open Wireshark on Windows
- Select the vEthernet (WSL) interface and start capture
- In the Ubuntu terminal, run:
docker run --rm alpine ping -c 5 8.8.8.8- In Wireshark, apply the filter:
icmp - Verify that you can see Echo request and Echo reply packets
┌──────────────────────────────────────────────────────────────────────────────┐
│ STANDARD LABORATORY WORKFLOW │
├──────────────────────────────────────────────────────────────────────────────┤
│ │
│ 1. CLONE 2. VERIFY 3. START │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ git clone │ ──▶ │ python │ ──▶ │ python │ │
│ │ repository │ │ verify_ │ │ start_ │ │
│ │ │ │ environment │ │ lab.py │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │ │
│ ▼ │
│ 6. CLEANUP 5. ANALYSIS 4. EXERCISES │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ python │ ◀── │ Wireshark │ ◀── │ Python │ │
│ │ stop_ │ │ PCAP files │ │ Exercises │ │
│ │ lab.py │ │ │ │ │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │
│ ⚠️ NOTE: Portainer (port 9000) remains ALWAYS active between laboratories! │
│ │
└──────────────────────────────────────────────────────────────────────────────┘
# ═══════════════════════════════════════════════════════════════════════════════
# VERIFY_ENVIRONMENT
# ═══════════════════════════════════════════════════════════════════════════════
python3 setup/verify_environment.py
# ═══════════════════════════════════════════════════════════════════════════════
# START_LAB_SERVICES
# ═══════════════════════════════════════════════════════════════════════════════
python3 scripts/start_lab.py
# ═══════════════════════════════════════════════════════════════════════════════
# CHECK_SERVICE_STATUS
# ═══════════════════════════════════════════════════════════════════════════════
python3 scripts/start_lab.py --status
# ═══════════════════════════════════════════════════════════════════════════════
# RUN_DEMONSTRATIONS
# ═══════════════════════════════════════════════════════════════════════════════
python3 scripts/run_demo.py --demo 1
# ═══════════════════════════════════════════════════════════════════════════════
# CAPTURE_TRAFFIC
# ═══════════════════════════════════════════════════════════════════════════════
python3 scripts/capture_traffic.py --duration 30 --output pcap/capture.pcap
# ═══════════════════════════════════════════════════════════════════════════════
# STOP_SERVICES
# ═══════════════════════════════════════════════════════════════════════════════
python3 scripts/stop_lab.py
# ═══════════════════════════════════════════════════════════════════════════════
# COMPLETE_CLEANUP
# ═══════════════════════════════════════════════════════════════════════════════
python3 scripts/cleanup.py --complete💭 PREDICTION: After
ping -c 4 google.com, how many packets will be sent and how many received under normal conditions?
EN Directory: 1enWSL/ | RO Directory: 01roWSL/
Docker Network: 10.0.1.0/24
Introduction to essential network diagnostic tools and foundational network concepts through hands-on exploration of the Linux network stack within Docker containers.
| Bloom Level | Verb | Specific Objective |
|---|---|---|
| Remember | Recall | Essential Linux commands: ip addr, ip route, ss, ping, netcat |
| Understand | Explain | Purpose of network interfaces, routing tables and socket states |
| Apply | Demonstrate | Connectivity testing using ICMP and latency measurement interpretation |
| Apply | Implement | Basic TCP/UDP channels using netcat and Python sockets |
| Analyse | Examine | Network captures to identify protocol behaviour |
| Analyse | Compare | TCP vs UDP communication patterns through packet examination |
| Evaluate | Diagnose | Common connectivity issues using systematic troubleshooting |
ip, ss, ping, traceroute, netcat, tcpdump, tshark, Python sockets
| No. | Title | Duration | Description |
|---|---|---|---|
| 1 | Network Interface Inspection | 15 min | Interface enumeration, IP examination, routing documentation |
| 2 | Connectivity Testing | 20 min | Progressive ping tests, latency measurement |
| 3 | TCP Communication with netcat | 25 min | Bidirectional sessions, connection state observation |
| 4 | Traffic Capture and Analysis | 30 min | TCP handshake, field identification, CSV export |
| 5 | Statistical PCAP Analysis | 20 min | Programmatic Python processing of captures |
💭 PREDICTION: When creating a TCP socket, which socket type will you use:
SOCK_STREAMorSOCK_DGRAM?
EN Directory: 2enWSL/ | RO Directory: 02roWSL/
Docker Network: 10.0.2.0/24
OSI and TCP/IP reference models as analytical frameworks, followed by practical TCP/UDP socket programming in Python including concurrent server architectures.
socket, threading, selectors, TCP/UDP sockets, concurrent servers, Python socket API
💭 PREDICTION: If you send a UDP broadcast packet, how many devices on the local network will receive it?
EN Directory: 3enWSL/ | RO Directory: 03roWSL/
Docker Network: 172.20.0.0/24
Laboratory introduces advanced programming patterns including UDP broadcast/multicast, TCP tunnelling and application-level protocol design.
UDP multicast, broadcast sockets, socket options (SO_BROADCAST, IP_ADD_MEMBERSHIP), struct
💭 PREDICTION: An Ethernet frame has a CRC field. What happens if the calculated CRC does not match the received one?
EN Directory: 4enWSL/ | RO Directory: 04roWSL/
Docker Network: 172.28.0.0/16
Laboratory descends to the lowest accessible layers, examining Ethernet framing, MAC addressing and binary protocol construction with CRC32.
struct, binascii, zlib.crc32, Ethernet frames, MAC addressing, binary protocols
💭 PREDICTION: How many usable IP addresses are in the network
192.168.1.0/24? (Hint: it's not 256)
EN Directory: 5enWSL/ | RO Directory: 05roWSL/
Docker Network: 10.5.0.0/24
Complete coverage of IP addressing, subnetting methodologies (CIDR, FLSM, VLSM) and IPv6 fundamentals.
ipaddress module, CIDR notation, FLSM, VLSM, IPv4, IPv6, subnet calculators
💭 PREDICTION: What happens to a packet's source IP address when it passes through NAT? Does it stay the same or change?
EN Directory: 6enWSL/ | RO Directory: 06roWSL/
Docker Network: Custom topology with multiple segments
Network Address Translation, essential support protocols (ARP, DHCP, ICMP, NDP) and introduction to Software-Defined Networking.
iptables, NAT/PAT, ARP, DHCP, ICMP, NDP, Open vSwitch, os-ken (Ryu fork), Mininet
💭 PREDICTION: What packets will
tcpdump -i any port 80capture? Only HTTP or others too?
EN Directory: 7enWSL/ | RO Directory: 07roWSL/
Docker Network: 10.0.7.0/24
Essential security and forensic skills through packet filtering, firewall configuration and defensive port scanning.
tcpdump, tshark, Wireshark, iptables, nmap, BPF filters, Scapy
💭 PREDICTION: In TCP 3-way handshake, what is the flag order: SYN → ? → ?
EN Directory: 8enWSL/ | RO Directory: 08roWSL/
Docker Network: 10.8.0.0/24
Detailed examination into TCP mechanics, HTTP/1.1 server implementation from scratch and Nginx as reverse proxy.
TCP handshake, HTTP/1.1, http.server, Nginx, reverse proxy, load balancing, Docker Compose
💭 PREDICTION: In FTP, which mode (active or passive) works better when the client is behind a firewall?
EN Directory: 9enWSL/ | RO Directory: 09roWSL/
Docker Network: 172.29.9.0/24
Session management and data presentation, with focus on FTP (active/passive modes) and binary serialisation.
FTP (active/passive), ftplib, pyftpdlib, binary framing, struct, session state management
💭 PREDICTION: What port does HTTPS use by default and why isn't it the same as HTTP?
EN Directory: 10enWSL/ | RO Directory: 10roWSL/
Docker Network: 172.20.0.0/24
Survey of critical protocols: HTTP/HTTPS, REST API, DNS, SSH. TLS exploration and programmatic operations.
HTTP/HTTPS, TLS/SSL, REST APIs, requests, DNS, dnspython, SSH, paramiko
💭 PREDICTION: With round-robin load balancing and 3 backends, which server will the 4th request reach?
EN Directory: 11enWSL/ | RO Directory: 11roWSL/
Docker Network: week11net (10.0.11.0/24)
Ports: 8080 (Load Balancer), 8081-8083 (Backends)
This laboratory explores load balancing strategies in distributed systems in depth, implementing and comparing round-robin, weighted round-robin, least connections and IP hash algorithms using Nginx as load balancer. Students will configure health checks for automatic failover and analyse traffic distribution in real time.
Nginx load balancing, round-robin, weighted round-robin, least connections, IP hash, health checks
💭 PREDICTION: How many bytes minimum do you need for a protocol header containing: message type, length and checksum?
EN Directory: 12enWSL/ | RO Directory: 12roWSL/
Docker Network: week12net (10.0.12.0/24)
Ports: 2525 (SMTP), 5000 (JSON-RPC), 5001 (XML-RPC), 50051 (gRPC)
This laboratory covers two fundamental domains of network communication: email protocols (SMTP for sending, POP3/IMAP for receiving) and Remote Procedure Call (RPC) models that enable calling functions on remote servers as if they were local.
SMTP, smtplib, JSON-RPC, XML-RPC, gRPC, grpcio, Protocol Buffers
💭 PREDICTION: How many potential vulnerabilities do you think exist in an MQTT setup without authentication?
EN Directory: 13enWSL/ | RO Directory: 13roWSL/
Docker Network: week13net (10.0.13.0/24)
Ports: 1883 (MQTT), 8883 (MQTT/TLS), 9001 (MQTT WebSocket)
Internet of Things protocols with security focus. MQTT publish/subscribe architecture, TLS integration, authentication mechanisms.
MQTT, Mosquitto, paho-mqtt, TLS certificates, ACL, IoT security patterns
💭 PREDICTION: How many different protocols have you studied this semester? Can you name at least 10?
EN Directory: 14enWSL/ | RO Directory: 14roWSL/
Docker Networks: week14_backend_net (172.20.0.0/24), week14_frontend_net (172.21.0.0/24)
Ports: 8080 (Load Balancer), 8001-8002 (Backends), 9090 (Echo Server)
⚠️ IMPORTANT NOTE: The Echo Server uses port 9090, NOT 9000! Port 9000 is reserved exclusively for Portainer.
Synthesis laboratory — building a complete multi-tier application with load balancing, reverse proxy and complete validation. This week integrates all concepts studied throughout the semester into a complex practical project.
┌─────────────────────────────────────────────┐
│ FRONTEND NETWORK 172.21.0.0/24 │
│ │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ CLIENT │ │ LB │ ◄──── Port 8080
│ │ 172.21.0.2 │ │ 172.21.0.10 │ │
│ └─────────────┘ └──────┬──────┘ │
└──────────────────────────────┼──────────────┘
│
┌──────────────────────────────┼──────────────┐
│ BACKEND NETWORK 172.20.0.0/24 │
│ │ │
│ ┌─────────────┐ ┌──────▼──────┐ │
│ │ APP1 │◄───┤ LB │ │
│ │ 172.20.0.2 │ │ 172.20.0.10 │ │
│ └─────────────┘ └──────┬──────┘ │
│ │ │
│ ┌─────────────┐ │ │
│ │ APP2 │◄──────────┘ │
│ │ 172.20.0.3 │ │
│ └─────────────┘ │
│ │
│ ┌─────────────┐ │
│ │ ECHO │ ◄──────────────── Port 9090
│ │ 172.20.0.20 │ (NOT 9000!) │
│ └─────────────┘ │
└─────────────────────────────────────────────┘
Portainer (Global Management): http://localhost:9000
Each weekly kit follows this enhanced standard structure, incorporating formative assessment tools, continuous integration, and automation:
<N>enWSL/
│
├── .github/ # CI/CD Configuration
│ └── workflows/
│ └── ci.yml # GitHub Actions (lint, test, build)
│
├── artifacts/ # Generated outputs (captures, logs)
│ └── .gitkeep
│
├── docker/ # Container configuration
│ ├── configs/ # Service configurations (nginx.conf, etc.)
│ ├── volumes/ # Persistent data
│ ├── web1/, web2/... # Backend content (varies by week)
│ └── docker-compose.yml # Multi-container orchestration
│
├── docs/ # Documentation (15+ standard files)
│ ├── ci_setup.md # CI configuration guide
│ ├── code_tracing.md # Code tracing exercises
│ ├── commands_cheatsheet.md # Quick command reference
│ ├── concept_analogies.md # Real-world analogies
│ ├── further_reading.md # Additional resources
│ ├── glossary.md # Technical terms
│ ├── images/ # Diagrams and screenshots
│ ├── learning_objectives.md # LO definitions and traceability matrix
│ ├── misconceptions.md # Common misconceptions
│ ├── pair_programming_guide.md # Pair programming instructions
│ ├── parsons_problems.md # Parsons problems
│ ├── peer_instruction.md # Peer instruction questions
│ ├── theory_summary.md # Theory summary
│ └── troubleshooting.md # Troubleshooting guide
│
├── formative/ # Formative Assessment Tools
│ ├── quiz.yaml # Quiz questions (YAML format, LO-mapped)
│ ├── quiz.json # LMS export format (Moodle, Canvas)
│ ├── run_quiz.py # Interactive CLI quiz runner
│ ├── parsons/ # Parsons problems (some weeks)
│ └── README.md # Assessment documentation
│
├── homework/ # Assignments
│ ├── exercises/ # hw_NN_XX_*.py
│ ├── solutions/ # Reference solutions (instructor only)
│ └── README.md
│
├── pcap/ # Packet captures
│ ├── .gitkeep
│ └── README.md
│
├── scripts/ # Automation scripts (Python)
│ ├── utils/ # Utility modules
│ │ ├── docker_utils.py
│ │ ├── network_utils.py
│ │ └── logger.py
│ ├── start_lab.py # Start laboratory environment
│ ├── stop_lab.py # Stop laboratory environment
│ ├── run_demo.py # Run demonstrations
│ ├── capture_traffic.py # Packet capture automation
│ └── cleanup.py # Environment cleanup
│
├── setup/ # Environment setup
│ ├── install_prerequisites.py
│ ├── configure_docker.py
│ ├── verify_environment.py
│ └── requirements.txt
│
├── src/ # Source code
│ ├── apps/ # Complete applications
│ ├── exercises/ # Exercise implementations (ex_NN_*.py)
│ └── utils/ # Common utilities
│
├── tests/ # Automated tests
│ ├── smoke_test.py # Quick sanity tests
│ ├── test_exercises.py # Exercise validation
│ └── expected_outputs.md
│
├── CHANGELOG.md # Version history
├── LICENSE # Week-specific licence
├── Makefile # Make automation targets
├── pyproject.toml # Python project configuration (ruff, pytest)
└── README.md # Week documentation
💭 PREDICTION: Looking at this structure, which folder do you think contains the most Python files in a typical week?
Each weekly kit includes interactive formative assessment tools in the formative/ directory. These are designed to reinforce learning objectives through self-evaluation, providing immediate feedback without grading pressure.
What's included:
| Component | File | Purpose |
|---|---|---|
| Quiz YAML | quiz.yaml |
Questions with LO mapping, difficulty levels, explanations |
| Quiz JSON | quiz.json |
LMS-compatible export (Moodle, Canvas, Blackboard) |
| Quiz Runner | run_quiz.py |
Interactive command-line quiz interface |
| Parsons Problems | parsons/ |
Code ordering exercises (selected weeks) |
Running a formative quiz:
# ═══════════════════════════════════════════════════════════════════════════════
# RUN_FORMATIVE_QUIZ
# ═══════════════════════════════════════════════════════════════════════════════
cd 01enWSL
# Option 1: Direct Python execution
python3 formative/run_quiz.py
# Option 2: Using Make (recommended)
make quiz
# Option 3: With options (randomise, limit questions)
python3 formative/run_quiz.py --random --limit 5Quiz features at a glance:
| Feature | Description |
|---|---|
| LO Mapping | Each question linked to specific Learning Objectives (LO1, LO2, etc.) |
| Difficulty Levels | basic → intermediate → advanced progression |
| Immediate Feedback | Correct answers shown with explanations |
| Misconception References | Links to docs/misconceptions.md for common errors |
| Progress Tracking | Score percentage and pass/fail status (default: 70% to pass) |
| LMS Export | JSON format compatible with major learning management systems |
Sample quiz.yaml structure:
metadata:
week: 1
topic: "Network Fundamentals"
passing_score: 70
lo_coverage: [LO1, LO2, LO3]
questions:
- id: q1
type: multiple_choice
lo_ref: LO1
difficulty: basic
stem: "Which OSI layer is responsible for IP addressing?"
options:
a: "Data Link"
b: "Network"
c: "Transport"
d: "Session"
correct: b
explanation: "The Network layer (Layer 3) handles logical addressing..."
misconception_ref: "docs/misconceptions.md#osi-layer-confusion"💭 PREDICTION: Before running the Week 1 quiz, how many questions do you expect will cover the OSI model specifically?
Each weekly kit includes GitHub Actions CI configuration in .github/workflows/, enabling automated quality checks whenever code is pushed or pull requests are opened.
CI workflow components:
| Check | Tool | Purpose |
|---|---|---|
| Syntax Validation | py_compile |
Python syntax verification |
| Linting | ruff |
Code style and quality enforcement |
| Unit Tests | pytest |
Automated test execution |
| Smoke Tests | Custom scripts | Environment sanity checks |
| Docker Build | docker-compose |
Container build verification |
When CI runs automatically:
- Push to
mainordevelopbranches - Pull requests targeting
main
Sample CI workflow:
# .github/workflows/ci.yml (simplified)
name: Lab CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: pip install -r setup/requirements.txt
- name: Lint with ruff
run: make lint
- name: Run tests
run: make testFor detailed CI setup instructions, see docs/ci_setup.md in each weekly kit.
Each kit includes a Makefile providing standardised targets for common operations. This simplifies the workflow and ensures consistency across all weeks.
Available targets:
# ═══════════════════════════════════════════════════════════════════════════════
# MAKEFILE_QUICK_REFERENCE
# ═══════════════════════════════════════════════════════════════════════════════
make help # Show all available targets with descriptions
# === Environment Management ===
make setup # Install Python dependencies from requirements.txt
make verify # Verify environment configuration
make docker-build # Build Docker images
make docker-up # Start containers (detached mode)
make docker-down # Stop and remove containers
make docker-logs # View container logs (follow mode)
# === Development & Quality ===
make lint # Run ruff linter
make format # Auto-format code with ruff --fix
make test # Run pytest suite
make smoke # Run smoke tests only
# === Formative Assessment ===
make quiz # Run interactive formative quiz
make quiz-export # Export quiz to LMS JSON format
# === Cleanup ===
make clean # Remove artifacts and caches
make clean-all # Full cleanup including Docker volumesExample usage:
cd 05enWSL
# Quick start: verify environment, start lab, run quiz
make verify
make docker-up
make quiz
# After finishing: cleanup
make docker-down
make clean💡 Tip: Running
make helpin any weekly kit displays all available targets with brief descriptions.
| Week | Docker Network | Subnet | Gateway | Available Hosts |
|---|---|---|---|---|
| 1 | week1net | 10.0.1.0/24 | 10.0.1.1 | 10.0.1.2-254 |
| 2 | week2net | 10.0.2.0/24 | 10.0.2.1 | 10.0.2.2-254 |
| 3 | week3net | 172.20.0.0/24 | 172.20.0.1 | 172.20.0.2-254 |
| 4 | week4net | 172.28.0.0/16 | 172.28.0.1 | 172.28.0.2-65534 |
| 5 | week5net | 10.5.0.0/24 | 10.5.0.1 | 10.5.0.2-254 |
| 6 | week6net | Custom | Variable | Variable |
| 7 | week7net | 10.0.7.0/24 | 10.0.7.1 | 10.0.7.2-254 |
| 8 | week8net | 10.8.0.0/24 | 10.8.0.1 | 10.8.0.2-254 |
| 9 | week9net | 172.29.9.0/24 | 172.29.9.1 | 172.29.9.2-254 |
| 10 | week10net | 172.20.0.0/24 | 172.20.0.1 | 172.20.0.2-254 |
| 11 | week11net | 10.0.11.0/24 | 10.0.11.1 | 10.0.11.2-254 |
| 12 | week12net | 10.0.12.0/24 | 10.0.12.1 | 10.0.12.2-254 |
| 13 | week13net | 10.0.13.0/24 | 10.0.13.1 | 10.0.13.2-254 |
| 14 | week14_* | 172.20-21.0.0/24 | Variable | Variable |
| Port | Service | Status |
|---|---|---|
| 9000 | Portainer CE | PERMANENTLY RESERVED |
| 22 | SSH (if enabled) | Reserved |
| 80 | HTTP (Windows) | Avoid |
| 443 | HTTPS (Windows) | Avoid |
| Week | Main Ports | Services |
|---|---|---|
| 1 | 9090, 9091 | TCP Server, UDP Server |
| 2 | 8080, 8081 | Echo Server, Concurrent Server |
| 3 | 5000, 5001 | Multicast Demo, Tunnel |
| 4 | 7000 | Binary Protocol Server |
| 5 | - | No exposed services |
| 6 | 8080 | NAT Demo |
| 7 | - | Internal filtering only |
| 8 | 8080, 8081, 8082 | Nginx, Backend1, Backend2 |
| 9 | 2121, 8021 | FTP Server (active/passive) |
| 10 | 8080, 8443, 5353 | HTTP, HTTPS, DNS |
| 11 | 8080, 8081-8083 | Load Balancer, Backends |
| 12 | 2525, 5000, 5001, 50051 | SMTP, JSON-RPC, XML-RPC, gRPC |
| 13 | 1883, 8883, 9001 | MQTT, MQTT/TLS, WS |
| 14 | 8080, 8001-8002, 9090 | LB, Backends, Echo |
| Technology | Version | Purpose |
|---|---|---|
| Python | 3.11+ | Primary programming language |
| Docker | 28.2.2+ | Containerisation |
| Docker Compose | 2.20+ | Multi-container orchestration |
| Portainer CE | 2.33.6 LTS | Visual container management |
| Nginx | 1.25+ | Web server, reverse proxy, load balancer |
| Wireshark | 4.4.x | Packet analysis |
| Library | Purpose |
|---|---|
socket |
Low-level networking |
threading |
Concurrent servers |
struct |
Binary data packing |
scapy |
Packet crafting and analysis |
requests |
HTTP client |
flask |
Web applications |
paramiko |
SSH client |
paho-mqtt |
MQTT client |
grpcio |
gRPC support |
dnspython |
DNS queries |
Problem: Docker daemon not running
# ═══════════════════════════════════════════════════════════════════════════════
# CHECK_DOCKER_STATUS
# ═══════════════════════════════════════════════════════════════════════════════
sudo service docker status
# ═══════════════════════════════════════════════════════════════════════════════
# START_DOCKER
# ═══════════════════════════════════════════════════════════════════════════════
sudo service docker start
# Password: studProblem: Permission denied
# ═══════════════════════════════════════════════════════════════════════════════
# ADD_USER_TO_DOCKER_GROUP
# ═══════════════════════════════════════════════════════════════════════════════
sudo usermod -aG docker $USER
# ═══════════════════════════════════════════════════════════════════════════════
# LOGOUT_AND_LOGIN_AGAIN
# ═══════════════════════════════════════════════════════════════════════════════
exit
# Then reopen UbuntuProblem: "Address already in use"
# ═══════════════════════════════════════════════════════════════════════════════
# FIND_PROCESS_USING_PORT
# ═══════════════════════════════════════════════════════════════════════════════
ss -tulpn | grep <port>
# ═══════════════════════════════════════════════════════════════════════════════
# STOP_CONFLICTING_CONTAINERS
# ═══════════════════════════════════════════════════════════════════════════════
docker ps
docker stop <container_name>Problem: Cannot see container traffic
# ═══════════════════════════════════════════════════════════════════════════════
# USE_TCPDUMP_IN_WSL
# ═══════════════════════════════════════════════════════════════════════════════
sudo tcpdump -i any port <port> -w capture.pcap
# Then open the .pcap file in Windows Wireshark# ═══════════════════════════════════════════════════════════════════════════════
# CONTAINER_MANAGEMENT
# ═══════════════════════════════════════════════════════════════════════════════
docker ps # List running containers
docker ps -a # List all containers
docker logs <container> # View container logs
docker exec -it <container> bash # Enter container shell
docker stop <container> # Stop container
docker rm <container> # Remove container
# ═══════════════════════════════════════════════════════════════════════════════
# COMPOSE_COMMANDS
# ═══════════════════════════════════════════════════════════════════════════════
docker compose up -d # Start services in background
docker compose down # Stop and remove services
docker compose logs -f # Follow logs
docker compose ps # List compose services
# ═══════════════════════════════════════════════════════════════════════════════
# NETWORK_COMMANDS
# ═══════════════════════════════════════════════════════════════════════════════
docker network ls # List networks
docker network inspect <network> # Network details# ═══════════════════════════════════════════════════════════════════════════════
# INTERFACE_INFORMATION
# ═══════════════════════════════════════════════════════════════════════════════
ip addr # Show interfaces
ip route # Show routing table
# ═══════════════════════════════════════════════════════════════════════════════
# CONNECTIVITY_TESTING
# ═══════════════════════════════════════════════════════════════════════════════
ping -c 4 <host> # ICMP ping
traceroute <host> # Trace route
# ═══════════════════════════════════════════════════════════════════════════════
# SOCKET_INFORMATION
# ═══════════════════════════════════════════════════════════════════════════════
ss -tulpn # TCP/UDP listening sockets
ss -tan # All TCP connections💭 PREDICTION: What do you think are the most important criteria for choosing a load balancing algorithm?
Task: Conduct a security assessment of a provided Docker Compose setup.
Deliverables:
- Identified vulnerabilities list
- Risk assessment (High/Medium/Low)
- Remediation recommendations
- Improved
docker-compose.yml
Task: Compare and evaluate different load balancing strategies for a given scenario.
Deliverables:
- Test methodology
- Performance metrics
- Recommendation with justification
Task: Design and implement a custom binary protocol for sensor data transmission.
Requirements:
- Header: message type, length, sequence number, checksum
- At least 3 message types
- Error detection
- Python implementation
Deliverables:
- Protocol specification document
- Server implementation
- Client implementation
- Test cases
Task: Create an original docker-compose.yml for a "URL Shortener" type application.
Mandatory components:
- API Gateway (Nginx) on port 8080
- 2 backend instances (Python/Flask or Node.js)
- Database (Redis or SQLite in volume)
- Health checks for all services
Deliverables:
- Complete and functional
docker-compose.yml - Backend source code
README.mdwith usage instructions- Architectural choices justification (1 page)
Live coding is a teaching technique where the instructor writes code in front of students, explaining each step. It is fundamentally different from presenting pre-written code.
┌─────────────────────────────────────────────────────────────────────────────┐
│ LIVE CODING CYCLE (15-20 minutes) │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ 1. CONTEXT (2 min) Present the problem and objective │
│ │ │
│ ▼ │
│ 2. STRUCTURE (2 min) Sketch the general solution structure │
│ │ │
│ ▼ │
│ 3. INCREMENTAL Write code in 2-5 line steps │
│ IMPLEMENTATION ┌──────────────────────────────────────┐ │
│ (10-15 min) │ a) Write 2-5 lines │ │
│ │ b) ASK: "What will this display?" │ │
│ │ c) Run and verify │ │
│ │ d) Repeat │ │
│ └──────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ 4. RECAP (2 min) Summarise what we built and why │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
- MAKE MISTAKES INTENTIONALLY — Make a mistake and show how to debug it
- ASK FOR PREDICTIONS — Before each
python3 script.py, ask "What will it display?" - TALK WHILE TYPING — Explain each line
- DON'T RUSH — Better to cover less, but students understand
- USE COMMENTS — Add explanatory comments on the spot
# STEP 1: "Let's create a simple TCP socket"
import socket
# QUESTION: "What socket type do we use for TCP?"
# Expected answer: SOCK_STREAM
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print("Socket created!")
# RUN → verify output
# STEP 2: "Now let's connect to a server"
# QUESTION: "What happens if the server isn't running?"
sock.connect(('localhost', 8080))
print("Connected!")
# RUN → probably error! → DEBUG TOGETHER- Have I tested all the code beforehand?
- Have I prepared 2-3 intentional mistakes to demonstrate?
- Have I prepared prediction questions for each step?
- Is the terminal font large enough (min 18pt)?
- Have I disabled on-screen notifications?
Q: I get "Address already in use" when starting the laboratory.
A: Another process is already using the port. Identify and stop it:
# Find the process ss -tulpn | grep <port> # Or on Windows netstat -ano | findstr <port>Then stop the process or change the port in
docker-compose.yml.
Q: Docker won't start in WSL. What do I do?
A: Start the service manually:
sudo service docker start # Password: studIf it persists, verify WSL2 is configured correctly:
wsl --status
Q: Portainer won't open at http://localhost:9000.
A: Check if the Portainer container is running:
docker ps | grep portainerIf not running, start it:
docker start portainer # Or recreate it per Section 7 instructions
Q: I don't have disk space for Docker images.
A: Clean unused resources:
docker system prune -a # WARNING: Deletes ALL unused images!
Q: Container starts but service doesn't respond.
A: Check container logs:
docker logs <container_name> # Or in Portainer: click on container → Logs
Q: Wireshark can't see traffic from containers.
A: In WSL, Docker traffic goes through the
docker0interface or specific bridge. Use:# In Wireshark on Windows, select "Adapter for loopback traffic capture" # Or use tcpdump in WSL: sudo tcpdump -i any port <port> -w capture.pcap
Q: How do I completely reset a laboratory?
A: Use the cleanup script:
python3 scripts/cleanup.py --complete # Then restart: python3 scripts/start_lab.py --rebuild
Q: What's the difference between Docker and a virtual machine?
A: Docker containers share the kernel with the host and are much lighter (~MB vs ~GB). VMs have their own kernel and offer complete isolation but with higher overhead.
Q: Why do we use WSL2 and not Docker Desktop?
A: WSL2 offers:
- Better performance (native Linux kernel)
- Lower resource consumption
- Complete configuration control
- Transferable Linux skills
- Completely free licensing
Q: Is port 9000 for the laboratory?
A: NO! Port 9000 is PERMANENTLY RESERVED for Portainer. Laboratories use other ports (8080, 8081, 9090, etc.).
This project is licensed under a Restrictive Educational Licence (v5.0.0).
© 2019–2026 Antonio Clim, Andrei Toma. All rights reserved.
The Materials are protected under Romanian law (Law No. 8/1996), EU Directive 2001/29/EC and applicable international treaties.
| Permitted | Description |
|---|---|
| ✓ | Personal Study — Viewing, reading and studying for your own educational benefit |
| ✓ | Code Execution — Running code examples on personal devices for learning purposes |
| ✓ | Local Modification — Modifying code locally for personal experimentation and learning |
| ✓ | Personal Notes — Creating derivative notes and annotations for personal reference only |
| ✓ | Academic Citation — Quoting brief excerpts in academic works with proper attribution |
| Prohibited | Description |
|---|---|
| ✗ | Publication — Uploading, posting, publishing or sharing on any platform |
| ✗ | Teaching — Using in courses, workshops, seminars or training without authorisation |
| ✗ | Presentation — Presenting, demonstrating or displaying to audiences |
| ✗ | Redistribution — Distributing copies in any form, modified or not |
| ✗ | Derivative Works — Creating and distributing derivative works |
| ✗ | Commercial Use — Any commercial purpose |
Educational institutions wishing to incorporate these Materials into their curricula may apply for an institutional licence. Open an issue with the [LICENCE] tag for details.
When citing these Materials in academic works:
Clim, A., & Toma, A. (2026). Computer Networks — Complete Laboratory Kits
(WSL Edition, v5.0.0). Bucharest University of Economic Studies.
https://github.com/antonioclim/netENwsl
BibTeX Format:
@misc{clim2026networks,
author = {Clim, Antonio and Toma, Andrei},
title = {{netENwsl}: Computer Networks — Complete Laboratory Kits},
year = {2026},
version = {5.0.0},
institution = {Bucharest University of Economic Studies},
howpublished = {\url{https://github.com/antonioclim/netENwsl}},
note = {Educational curriculum materials for computer
networks laboratory}
}Complete Licence: LICENCE.md
Disclaimer: Materials are provided "AS IS" without warranty of any kind.
If you have followed this guide and configured the environment correctly, you are ready to:
- ✅ Run isolated network experiments with Docker containers
- ✅ Capture and analyse network traffic with Wireshark
- ✅ Manage containers through the Portainer web interface (http://localhost:9000)
- ✅ Automate network tasks with Python
- ✅ Understand in depth how network protocols work
- ✅ Avoid port conflicts (port 9000 = Portainer!)
- ✅ Test your understanding with interactive formative quizzes (
make quiz) - ✅ Use CI/CD to validate your code quality automatically
- ✅ Follow standardised workflows with Makefile automation
This document has been updated to reflect:
- Restrictive Educational Licence — Replacing MIT with restrictive licence for materials protection
- Correct Attribution — © 2019–2026 Antonio Clim, Andrei Toma
- 18 PREDICTION Questions — Prediction prompts for each week (active learning)
- Two Separate Repositories — netENwsl (English) and netROwsl (Romanian)
- Distinct Naming Conventions —
<N>enWSLvs<NN>roWSL - Student Directory Structure —
D:\NETWORKS\WEEK<N>\<N>enWSL - Port 9000 PERMANENTLY RESERVED for Portainer
- Subgoal Labels — Structured comments in code for pedagogy
- Specific Wireshark Filters for each week
- BibTeX Format for academic citations
- Formative Assessment Tools — Interactive quizzes in all 14 weeks (
formative/) - GitHub Actions CI/CD — Automated quality checks in
.github/workflows/ - Makefile Automation — Standardised
maketargets for common operations - Extended Documentation — 15+ docs files per week including
learning_objectives.md
| Metric | Count |
|---|---|
| Total files | ~1,200 |
| Python files (.py) | ~500 |
| Markdown files (.md) | ~360 |
| HTML presentations | 30 |
| docker-compose.yml | 14 |
| Formative quizzes | 14 |
| CI workflows | 15 |
| Makefiles | 15 |
Source Code (src/) ████████████████████ ~35%
Documentation (docs/) ██████████████ ~25%
Scripts (scripts/) ████████ ~15%
Tests (tests/) ██████ ~10%
Formative (formative/) █████ ~8%
Other ████ ~7%
© 2019–2026 Antonio Clim, Andrei Toma
Computer Networks Laboratory — ASE Bucharest, CSIE
Documentation Version: January 2026