- Overview
- Features
- Installation
- Configuration
- Usage
- CLI Commands
- Network Topology
- Device Management
- QoS Engines
- Testing & Simulation
- Appendix: QoS Terminology
- Cautions and Disclaimers
A Flask application for managing Quality of Service (QoS) policies on network devices. Provides web-based interface for configuring and monitoring QoS settings. This tool simplifies the complex task of QoS management, making it accessible to network administrators without deep QoS expertise.
📚 New to QoS? Check out our What is QoS and How to Simulate guide for a comprehensive introduction to QoS concepts and testing with GNS3.
Model Series | IOS Version | Notes |
---|---|---|
Catalyst 2960-X/XS | 15.2+ | Full support |
Catalyst 3750-X | 15.2+ | Full support |
Catalyst 3850 | 15.2+ | Full support |
Catalyst 9300 | 16.9+ | Basic functionality |
Requirements:
- SSHv2 access
- SNMP v2c/v3
- QoS capable IOS image
The QoS Bandwidth Optimizer follows a modular architecture:
- Web Interface Layer: Flask-based frontend with Flask-AppBuilder for admin interfaces
- Business Logic Layer: Core QoS policy management and device interaction logic
- Device Communication Layer: SSH and SNMP-based communication with network devices
- Data Persistence Layer: SQLAlchemy ORM with database models for all QoS components
- Centralized inventory of network devices
- Automated discovery of device interfaces via SNMP
- Connection status monitoring (SSH, SNMP, ICMP)
- Bulk operations for multi-device configuration
- Visual policy creation wizards
- Support for CBWFQ, LLQ, and WRED mechanisms
- Traffic classification based on multiple criteria
- Policy validation before deployment
- Automatic CLI command generation
- Real-time interface statistics collection
- Historical bandwidth usage graphs
- Predefined traffic classes for common applications
- Custom traffic class creation
- DSCP marking configuration
- Python 3.8 or higher
- pip and virtualenv
- Network access to managed devices
- SNMP access to devices for monitoring
- SSH access to devices for configuration
# Clone the repository
git clone https://github.com/teal33t/bandwith-optimizer.git
cd bandwith-optimizer
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
# venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env file with your settings
# Initialize database
flask db upgrade
flask initdb
# Start application
flask run
Command | Description | Options |
---|---|---|
flask run |
Start development server | --host , --port , --debug |
flask initdb |
Initialize database | --force to recreate tables |
flask fake-add |
Add test data | --count for number of devices |
flask fake-remove |
Clear test data | --all to remove everything |
flask db upgrade |
Run database migrations | |
flask db downgrade |
Revert database migrations | |
flask translate |
Update translations | --lang for language |
flask routes |
List all application routes |
# Collect bandwidth statistics for all devices
flask collect-stats
# Verify device connectivity
flask check-devices
# Export configuration report
flask export-config --format=pdf
Environment variables (set in .env
file):
Variable | Description | Example |
---|---|---|
SECRET_KEY |
Application secret key | your-secret-key-here |
SQLALCHEMY_DATABASE_URI |
Database connection | sqlite:///app.db |
APP_NAME |
Application name | QoS Optimizer |
APP_THEME |
UI theme | dark or light |
AUTH_TYPE |
Authentication method | local or ldap |
ENCRYPTION_KEY |
Key for credential encryption | fernet-key-here |
MRTG_CFG_BASE_PATH |
Path for MRTG configs | /var/www/mrtg/ |
SUDO_PASSWORD |
For MRTG operations (dev only) | password |
LOG_LEVEL |
Application logging level | INFO |
DEVICE_TIMEOUT |
Device connection timeout | 30 |
The application uses the following core models:
- Device: Network device information
- Connection: SSH/Telnet connection details
- SNMP: SNMP configuration for monitoring
- ICMP: Ping monitoring configuration
- Interface: Network interfaces on devices
- TrafficClass: Application traffic categories
- ClassMap: Traffic matching criteria
- PolicyMap: QoS policy definitions
- PolicyEntry: QoS mechanisms within policies
- PolicyApplication: Association of policies to interfaces
- BandwidthStat: Collected bandwidth statistics
- Access web interface at
http://localhost:3333
- Login with admin credentials (default: admin/admin)
- Add network devices using device credentials
- Verify device connectivity (SSH, SNMP, ICMP)
- Discover device interfaces
- Create traffic classes for your applications
- Define class maps with match criteria
- Create policy maps with QoS mechanisms
- Apply policies to device interfaces
- Verify policy application
- View real-time bandwidth statistics
- Analyze historical usage patterns
- Check for QoS policy effectiveness
- Export reports for capacity planning
- Verify device connectivity status
- Check interface statistics for errors
- Review policy application logs
- Validate QoS configuration on devices
+-------------+
| Bandwidth |
| Optimizer |
+------+------+
|
|
+--------+ +-------+-------+ +--------+
| Router |--------| Core Router |--------| Router |
| Edge1 | | (QoS Policies)| | Edge2 |
+---+----+ +-------+-------+ +----+---+
| | |
+---+----+ +-----+------+ +----+---+
| Host1 | | Host2 | | Host3 |
| (VoIP) | | (Video) | | (Data) |
+--------+ +------------+ +--------+
Traffic class configuration for QoS policies
Device management interface showing connected network devices
Network interfaces available for QoS configuration
Dashboard showing device bandwidth status and utilization
The QoS Bandwidth Optimizer can be tested in a simulated environment before deployment to production networks. This allows you to validate QoS policies and configurations without risking disruption to live network traffic.
GNS3 provides an ideal environment for testing the QoS Bandwidth Optimizer without physical hardware. Our detailed guide walks you through setting up a test environment:
- Creating a test topology with Cisco routers
- Configuring SSH and SNMP access
- Connecting the Bandwidth Optimizer to virtual devices
- Generating test traffic to validate QoS policies
- Troubleshooting common issues
📘 View the complete GNS3 testing guide
- EVE-NG: Similar to GNS3, EVE-NG can be used to create virtual network topologies
- Cisco VIRL/CML: Cisco's virtual labs provide accurate IOS behavior
- Lab Environment: A small physical lab with 2-3 routers is ideal for final validation
- CBWFQ: Class-Based Weighted Fair Queuing
- LLQ: Low Latency Queuing
- WRED: Weighted Random Early Detection
- DSCP: Differentiated Services Code Point
- Bandwidth: Maximum data transfer rate
- Latency: Time delay between packets
- Jitter: Variation in packet delay
- Packet Loss: Percentage of lost packets
- Traffic Class: Logical grouping of traffic flows
- Policy Map: Collection of QoS policies
- Class Map: Traffic classification criteria
- Marking: Tagging packets with QoS info
This application is optimized for small to medium-sized networks** (up to ~50 devices) and is ideal for branch offices, small campuses, or departmental networks.
This software is provided "as is", without warranty of any kind, express or implied. The authors and contributors are not liable for any damages or network outages resulting from the use of this software. Users are responsible for testing and validating all configurations before deployment to production environments.
By using this application, you acknowledge that modifying network device configurations carries inherent risks, and you accept responsibility for changes made to your network infrastructure.