Skip to content

GARJE-01/Enterprise-Network-Automation-Platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Python Netmiko Cisco GNS3 Status

๐ŸŒ Enterprise Network Automation & Operations Platform

A multi-branch enterprise network built in GNS3 and fully automated end-to-end with Python & Netmiko.

Covering OSPF routing, VLAN segmentation, SSH-based management, configuration backups, compliance auditing, configuration drift detection, and a unified HTML Network Operations Dashboard.


๐Ÿ“– Table of Contents


๐Ÿš€ Overview

What started as a standard CCNA-level lab has evolved into a fully-fledged Network Operations Platform. Instead of manually logging into devices to verify state, a robust suite of Netmiko scripts automatically connects to every router and switch, retrieves live operational data, and renders it into a sleek, unified dashboard.

The Lab Scenario (ABC Company):

  • HQ Site and two Branch Offices connected via OSPF (Area 0).
  • Each site is segmented into specific VLANs for Users, Servers, and Management.
  • A Python automation layer handles day-2 operations: config pushes, backups, drift detection, and compliance auditing against baselines.
๐Ÿ–ฅ๏ธ Environment โš™๏ธ Details
Lab Platform GNS3 (inside GNS3 VM on VMware Workstation)
Devices 3x Cisco IOSv Routers, 2x Cisco IOSvL2 Switches, 4x VPCS
Routing & Switching OSPF (Area 0) | VLAN 10 (Users), 20 (Servers), 99 (Mgmt)
Management SSH via Netmiko (cisco_ios_telnet initially, SSH pushed later)

๐Ÿ–ง Network Topology

Network topology diagram

Network Subnets:

๐Ÿ“ Site ๐ŸŒ Subnet ๐Ÿšช Gateway
Headquarters (HQ) 192.168.10.0/24 192.168.10.1
Branch 1 192.168.20.0/24 192.168.20.1
Branch 2 192.168.30.0/24 192.168.30.1

(Note: A GNS3 Cloud node bridges the Windows host machine to the lab for script access. More details in docs/phase3_topology_build.md)


โœจ Key Features

  • ๐Ÿ” Automated Device Inventory: Automatically collects and categorizes all routers and switches.
  • ๐Ÿ’พ Scheduled Backups: Reliable, timestamped configuration backups.
  • โค๏ธ OSPF Health Checks: Monitors neighbor adjacencies with clear pass/fail reporting.
  • ๐Ÿ›ก๏ธ Compliance Auditing: Enforces baselines (hostnames, local admins, SSH v2, OSPF presence, encrypted passwords).
  • ๐Ÿ”Œ Interface Monitoring: Tracks real-time up/down status per interface.
  • ๐Ÿš€ VLAN Deployment: Automated zero-touch VLAN provisioning via Netmiko send_config_set.
  • ๐Ÿ“Š Drift Detection: Automatically spots configuration drift between any two backup periods.
  • ๐Ÿ–ฅ๏ธ Unified Operations Dashboard (V2): A dark-themed, responsive HTML dashboard featuring live status cards, health scoring, compliance tables, drift viewer, and an interactive device explorer.

๐Ÿ› ๏ธ Tech Stack

Cisco IOSv Python 3 Netmiko GNS3 VMware HTML5 CSS3 JavaScript

๐Ÿ“ธ Dashboard Preview

The flagship component of this project is the Unified Network Operations Dashboard V2. It runs asynchronously across all devices, pulling everything it needs, and outputs a stunning static HTML dashboard.

Click to expand Dashboard Screenshots
1. Overview & Status Cards

Status Cards

2. Switch Compliance & OSPF Health

Switch Compliance

3. VLAN, Backups & Drift Analysis

VLAN and Backups

4. Device Search & Explorer

Device Explorer


๐Ÿ“‚ Repository Structure

Network-Automation-Platform/
โ”œโ”€โ”€ ๐Ÿ“„ Network_Automation.gns3                     # The main GNS3 lab project file
โ”œโ”€โ”€ ๐Ÿ“ configs/           # Router & switch config templates/files
โ”œโ”€โ”€ ๐Ÿ“ scripts/           # Python automation logic
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ inventory/     # Device collection
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ backups/       # Backup automation
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ monitoring/    # OSPF, interfaces, and compliance scripts
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ automation/    # VLAN deploy & config drift scripts
โ”‚   โ””โ”€โ”€ ๐Ÿ“ dashboard/     # Unified Operations Dashboard generator
โ”œโ”€โ”€ ๐Ÿ“ backups/           # โณ Generated at runtime
โ”œโ”€โ”€ ๐Ÿ“ drift_reports/     # โณ Generated at runtime
โ”œโ”€โ”€ ๐Ÿ“ reports/           # โณ Generated at runtime (HTML dashboard lands here)
โ”œโ”€โ”€ ๐Ÿ“ screenshots/       # Project evolution media
โ”œโ”€โ”€ ๐Ÿ“ docs/              # Detailed phase-by-phase documentation
โ”œโ”€โ”€ ๐Ÿ“ topology/          # Architecture diagrams
โ”œโ”€โ”€ ๐Ÿ“„ requirements.txt   # Python dependencies
โ””โ”€โ”€ ๐Ÿ“„ README.md          # You are here!

๐Ÿš€ Getting Started

1๏ธโƒฃ Prerequisites & Lab Setup

  • GNS3 + GNS3 VM running on VMware Workstation.
  • Python 3.11+ installed on your host machine.

2๏ธโƒฃ Import the Lab

  1. Provide Images: You must legally obtain your own Cisco IOSv and IOSvL2 images (e.g., from a CML subscription) and import them into your GNS3 VM.
  2. Open Project: Open the provided Network_Automation.gns3 project file within GNS3 to load the full multi-branch topology. The devices should map to your imported images.
  3. Verify Access: Ensure SSH is enabled with a local admin account configured on every router and switch in the lab.

3๏ธโƒฃ Install Dependencies

pip install -r requirements.txt

3๏ธโƒฃ Update Device Connection Details

Each script inside the scripts/ directory defines its own routers / switches list (host, port, device type). Update these IP addresses and ports to match your GNS3 topology exposures.


๐Ÿ’ป Usage

It is highly recommended to run any script directly from inside the scripts/ folder so that relative paths (../backups, ../reports) resolve perfectly.

cd scripts

# 1. Run Core Operations
python inventory/inventory.py
python backups/backup_configs.py

# 2. Run Audits & Monitoring
python monitoring/ospf_health_check.py
python monitoring/compliance_audit.py
python monitoring/interface_monitor.py

# 3. Run Automation Scenarios
python automation/deploy_vlans.py
python automation/config_drift.py

# 4. Generate the Dashboard
python dashboard/network_operations_dashboard_v2.py

๐ŸŽ‰ Pro Tip: Open the generated reports/network_operations_dashboard_v2.html in your favorite web browser to view the final result!


๐Ÿ›ค๏ธ Project Phases

We documented our journey from zero to automated! Check out the phase docs below:

๐Ÿ“… Phase ๐Ÿ“ Description
Phase 1 GNS3 / VMware setup & Cisco IOSv image installation.
Phase 2 Topology design, IP/VLAN addressing, automation planning.
Phase 3 Building the lab, SSH bring-up, and IP reachability.
Phase 4 The Netmiko automation scripts (backups, OSPF, drift).
Phase 5 Evolution to the Unified Network Operations Dashboard V2.

๐Ÿ”ฎ Future Enhancements

We're always looking to improve! Potential future directions:

  • ๐ŸŒ Live Flask Dashboard with auto-refresh capabilities.
  • ๐Ÿ”” Slack/Email Alerts for compliance drops or OSPF neighbor failures.
  • โฑ๏ธ Scheduled Execution (Cron / Task Scheduler) for zero-touch backups.
  • ๐Ÿ—บ๏ธ Dynamic Topology Visualization layer.
  • ๐Ÿ™ Git-Based Version Control for network configurations.
  • ๐Ÿ”Œ REST API exposing the underlying inventory and health data.

๐Ÿ‘จโ€๐Ÿ’ป Author

Built and documented by Mayur Garje as a flagship CCNA-level network automation project, seamlessly combining Cisco IOS, GNS3, Python, and Netmiko.

If you found this project helpful, don't forget to give it a โญ!

About

Enterprise network automation platform built with Cisco IOS, GNS3, Python & Netmiko featuring OSPF monitoring, compliance auditing, config backups, drift detection, VLAN automation and a unified NOC dashboard.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors