A comprehensive Docker-based network monitoring laboratory environment featuring real MikroTik RouterOS instances and Linux servers configured for SNMP monitoring, network administration training, and system monitoring development.
This repository contains two complete laboratory environments:
Network Monitoring Lab Suite/
βββ π₯οΈ Linux Server Lab/ # SNMP-enabled Linux server environment
β βββ π³ docker-compose.yml # Docker configuration
β βββ π Dockerfile # Custom Linux container build
β βββ π§ config/ # SNMP and SSH configurations
β βββ π scripts/ # Startup and automation scripts
β βββ π README.md # Linux lab documentation
β
βββ π MikroTik Router Lab/ # Real RouterOS environment
β βββ π³ docker-compose.yml # RouterOS container setup
β βββ π§ config/ # RouterOS configurations and OID references
β βββ π Mikrotik Router Admin Website/ # Flask web management interface
β βββ π Management Scripts/ # Automation and testing tools
β βββ π Documentation/ # Comprehensive guides
β
βββ π README.md # This main documentation
- Real SNMP Agent: Pre-configured
snmpdwith custom OIDs - SSH Access: Secure shell with custom users and configurations
- System Monitoring: CPU, memory, disk, and network interface monitoring
- Load Simulation: Built-in stress testing for realistic metrics
- Custom Network: Isolated Docker network for lab testing
- Authentic RouterOS: Real MikroTik CHR (Cloud Hosted Router) instance
- Full SNMP Support: Complete MIB-II + MikroTik Enterprise MIBs
- Web Management Interface: Modern Flask-based administration panel
- Multiple Access Methods: SSH, Web, WinBox, SNMP, API
- Traffic Generation: Built-in tools for testing and simulation
- Monitoring Ready: Pre-configured for Zabbix, PRTG, LibreNMS, Prometheus
- π Network Administration Training
- π¬ SNMP Monitoring Development
- π§ͺ Network Management System Testing
- π Monitoring Tool Development
- π οΈ DevOps Network Labs
- π― Certification Practice (CCNA, MTCNA, etc.)
# Install Docker and Docker Compose
sudo apt-get update
sudo apt-get install docker.io docker-compose-plugin
# Install SNMP tools for testing
sudo apt-get install snmp snmp-mibs-downloader
# Add your user to docker group
sudo usermod -aG docker $USERcd "Linux Server Lab"
docker-compose up -d --build
# Test SNMP monitoring
snmpwalk -v2c -c public localhost:161 1.3.6.1.2.1.1
# Test SSH access
ssh -p 2222 root@localhost # password: labpasswordcd "Mikrotik Router Lab"
chmod +x *.sh
./setup.sh
# Test SNMP functionality
./test-snmp.sh
# Access web interface
# Browser: http://localhost:8000# Start Linux Server Lab
cd "Linux Server Lab"
docker-compose up -d --build
# Start MikroTik Router Lab
cd "../Mikrotik Router Lab"
./setup.sh
# Both labs are now running!| Service | Access Method | Credentials |
|---|---|---|
| SNMP | localhost:161 |
Community: public |
| SSH (root) | ssh -p 2222 root@localhost |
Password: labpassword |
| SSH (user) | ssh -p 2222 labuser@localhost |
Password: labpass123 |
| Service | Access Method | Credentials |
|---|---|---|
| Web Interface | http://localhost:8000 | admin / (no password) |
| Secure Web | https://localhost:8443 | admin / (no password) |
| SSH | ssh admin@localhost -p 2222 |
admin / (no password) |
| SNMP | localhost:161 |
Community: public |
| WinBox | localhost:8291 |
admin / (no password) |
| Admin Website | http://localhost:5000 | Router credentials |
A containerized Linux environment specifically designed for network monitoring testing:
- SNMP Daemon: Full SNMPv2c support with custom community strings
- SSH Server: Secure access with multiple user accounts
- System Monitoring: Real-time CPU, memory, and network metrics
- Load Generation: Built-in stress testing for realistic monitoring data
- SNMP monitoring tool development
- Linux system administration practice
- Network monitoring system testing
- DevOps infrastructure simulation
# System information
snmpwalk -v2c -c public localhost:161 1.3.6.1.2.1.1
# CPU and memory statistics
snmpwalk -v2c -c public localhost:161 1.3.6.1.4.1.2021
# Network interfaces
snmpwalk -v2c -c public localhost:161 1.3.6.1.2.1.2
# Disk usage
snmpwalk -v2c -c public localhost:161 1.3.6.1.4.1.2021.9A complete MikroTik RouterOS environment with web management interface:
- Real MikroTik CHR: Authentic RouterOS experience
- Complete SNMP Support: Standard + Enterprise MIBs
- Multiple Interfaces: Ethernet, wireless, VPN capabilities
- Routing & Firewall: Full networking feature set
- User Management: PPP, Hotspot, DHCP user control
Built with Flask and Bootstrap 5, featuring:
- Dashboard: System health, interface status, user analytics
- User Management: PPP/Hotspot user administration
- Monitoring: Real-time bandwidth and system metrics
- Security: Session-based auth with CSRF protection
- Mobile Responsive: Works on all devices
The lab includes ready-to-use configurations for:
- Zabbix: Templates and host configurations
- PRTG: Sensor definitions and device setup
- LibreNMS: Device discovery and monitoring setup
- Prometheus: SNMP exporter configuration
- Nagios: Service checks and host definitions
System Information:
βββ 1.3.6.1.2.1.1.1.0 # System description
βββ 1.3.6.1.2.1.1.3.0 # System uptime
βββ 1.3.6.1.2.1.1.5.0 # System name
CPU & Memory (UCD-SNMP-MIB):
βββ 1.3.6.1.4.1.2021.11.9.0 # CPU user %
βββ 1.3.6.1.4.1.2021.11.10.0 # CPU system %
βββ 1.3.6.1.4.1.2021.4.5.0 # Total RAM
βββ 1.3.6.1.4.1.2021.4.6.0 # Available RAM
Network Interfaces:
βββ 1.3.6.1.2.1.2.2.1.2 # Interface descriptions
βββ 1.3.6.1.2.1.2.2.1.8 # Interface status
βββ 1.3.6.1.2.1.2.2.1.10 # Bytes in
βββ 1.3.6.1.2.1.2.2.1.16 # Bytes out
System Health:
βββ 1.3.6.1.4.1.14988.1.1.3.10.0 # CPU usage
βββ 1.3.6.1.4.1.14988.1.1.3.11.0 # Memory usage
βββ 1.3.6.1.4.1.14988.1.1.3.12.0 # Disk usage
βββ 1.3.6.1.4.1.14988.1.1.3.13.0 # Temperature
Interface Statistics:
βββ 1.3.6.1.4.1.14988.1.1.1.1.1.2 # Interface names
βββ 1.3.6.1.4.1.14988.1.1.1.1.1.3 # Interface types
βββ 1.3.6.1.4.1.14988.1.1.1.1.1.6 # RX bytes
βββ 1.3.6.1.4.1.14988.1.1.1.1.1.7 # TX bytes
User Management:
βββ 1.3.6.1.4.1.14988.1.1.5.1.1.2 # PPP user names
βββ 1.3.6.1.4.1.14988.1.1.5.1.1.4 # PPP user status
βββ 1.3.6.1.4.1.14988.1.1.6.1.1.2 # Hotspot users
<!-- Host configuration for MikroTik Router -->
<host>
<name>MikroTik Lab Router</name>
<interfaces>
<interface>
<ip>172.20.0.3</ip>
<port>161</port>
<type>SNMP</type>
</interface>
</interfaces>
<templates>
<template>Template Net MikroTik SNMPv2</template>
</templates>
</host># prometheus.yml
scrape_configs:
- job_name: 'mikrotik-snmp'
static_configs:
- targets:
- 172.20.0.3 # MikroTik router IP
metrics_path: /snmp
params:
module: [mikrotik]
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: localhost:9116 # SNMP exporter address# Add device to LibreNMS
./addhost.php 172.20.0.3 public v2c
# Force discovery
./discovery.php -h 172.20.0.3
# Poll device
./poller.php -h 172.20.0.3cd "Linux Server Lab"
./test-lab.shcd "Mikrotik Router Lab"
./test-snmp.sh # SNMP functionality test
./generate-traffic.sh # Traffic generation for monitoring# Test basic SNMP connectivity
snmpget -v2c -c public localhost:161 1.3.6.1.2.1.1.1.0
# Test community string
snmpwalk -v2c -c public localhost:161 1.3.6.1.2.1.1
# Test wrong community (should fail)
snmpwalk -v2c -c wrong localhost:161 1.3.6.1.2.1.1# Test SSH connectivity
ssh -o ConnectTimeout=5 -p 2222 root@localhost 'uptime'
# Test user authentication
ssh -o ConnectTimeout=5 -p 2222 labuser@localhost 'whoami'# Test web interface availability
curl -I http://localhost:8000
curl -I http://localhost:5000
# Test HTTPS (ignore cert warnings)
curl -k -I https://localhost:8443# Edit docker-compose.yml environment section
environment:
- SSH_ROOT_PASSWORD=your_password
- SNMP_COMMUNITY=your_community
- CONTAINER_TIMEZONE=America/New_York# Create .env file
echo "ROUTER_PASSWORD=your_admin_password" > .env
echo "SNMP_COMMUNITY=your_community" >> .env
echo "WEB_PORT=8080" >> .env# Edit Linux server SNMP config
vim "Linux Server Lab/config/snmpd.conf"
# Edit RouterOS initial config
vim "Mikrotik Router Lab/config/initial-config.rsc"# Custom network settings in docker-compose.yml
networks:
netmon-lab:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.20.0.0/24
gateway: 172.20.0.1# Check for port conflicts
sudo netstat -tulpn | grep -E ":(161|2222|8000|5000)"
# Stop conflicting services
sudo systemctl stop snmpd # If SNMP is running on host# Check container logs
docker-compose logs mikrotik
docker-compose logs server
# Rebuild containers
docker-compose down
docker-compose up -d --build --force-recreate# Check SNMP service in container
docker exec -it mikrotik-router /system health print
docker exec -it netmon-server systemctl status snmpd
# Test from inside container
docker exec -it mikrotik-router ping 8.8.8.8# Check Flask application logs
docker-compose -f "Mikrotik Router Admin Website/docker-compose.yml" logs
# Restart web interface
cd "Mikrotik Router Admin Website"
docker-compose restart# Add resource limits to docker-compose.yml
services:
mikrotik:
deploy:
resources:
limits:
memory: 1G
cpus: '1.0'
reservations:
memory: 512M
cpus: '0.5'# Add volumes for data persistence
volumes:
- ./data/mikrotik:/opt/routeros
- ./logs:/var/log- SNMP Protocol Understanding: Learn OIDs, communities, and MIB structures
- Network Monitoring: Implement monitoring solutions with real devices
- RouterOS Administration: Master MikroTik configuration and management
- Docker Networking: Understand containerized network environments
- System Administration: Practice Linux and network device management
- SNMP Protocol Documentation
- MikroTik RouterOS Manual
- Docker Networking Guide
- Network Monitoring Best Practices
- SNMP Browsers: iReasoning SNMP Browser
- MIB Compilers: Net-SNMP Tools
- Network Monitors: Zabbix, LibreNMS
- WinBox: MikroTik WinBox
We welcome contributions to improve this network monitoring lab suite!
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please use the GitHub Issues tab to report:
- Bug reports with detailed reproduction steps
- Feature requests with clear use cases
- Documentation improvements
- Performance issues
- Additional monitoring tool integrations
- New OID examples and use cases
- Performance optimizations
- Security enhancements
- Additional test scenarios
- Documentation translations
This project is licensed under the MIT License - see the LICENSE file for details.
- MikroTik for providing excellent network equipment and RouterOS
- Docker Community for containerization tools and best practices
- Net-SNMP Project for SNMP implementation and tools
- Flask Community for the excellent web framework
- Bootstrap Team for the responsive UI framework
If you encounter any issues or need help with the lab setup:
- π Check the documentation in each lab's README
- π Search existing GitHub Issues
- π Create a new Issue with detailed information
- π¬ Join the discussion in the repository
Made with β€οΈ for network administrators, developers, and students worldwide
Transform your network monitoring skills with real-world lab environments!
π PacketPatrol β A comprehensive Docker-based network monitoring laboratory environment featuring real MikroTik RouterOS instances and Linux servers configured for SNMP monitoring, network administration training, and system monitoring development.