This project is a Python-based network automation tool that connects to a real Cisco IOS XE device using SSH (via Netmiko) and allows users to run common networking show commands through an interactive command-line menu.
The system is designed to simulate real-world network automation workflows used by network engineers in enterprise environments.
It was tested using the Cisco DevNet Sandbox (Catalyst 8000V Always-On), which provides a real Cisco IOS XE device accessible via SSH.
- Interactive CLI menu for Cisco IOS commands
- SSH connection to real Cisco IOS XE router (DevNet Sandbox)
- Execution of common "show" commands
- Loop-based execution (run multiple commands without restarting script)
- Multi-device structure (easily expandable to multiple routers/switches)
- Automatic logging of command outputs to local files
- Error handling for SSH connection issues
- Python 3
- Netmiko (SSH automation library)
- Cisco IOS XE (DevNet Sandbox)
- VS Code
- SSH (Paramiko backend via Netmiko)
This project was tested using:
- Cisco DevNet Sandbox: Catalyst 8000V Always-On
- Real Cisco IOS XE device
- SSH access provided via dynamically generated credentials
- Public internet-accessible Cisco router instance
Python-Network-Automation/ │ ├── CLI_Automation_Basic.py # Main Python automation script ├── requirements.txt # Required Python packages └── logs/ # Auto-generated command output logs
- User runs the Python script
- Script displays a list of Cisco devices
- User selects a device
- SSH connection is established using Netmiko
- User selects a "show" command from the menu
- Command is executed on the Cisco IOS XE device
- Output is displayed in the terminal
- Output is saved automatically into a log file
- User can repeat without restarting the script
devices = {
"R1": {
"device_type": "cisco_ios",
"host": "devnetsandboxiosxec8k.cisco.com",
"username": "your_username",
"password": "your_password",
"fast_cli": False
}
}menu = {
1: "show version",
2: "show ip interface brief",
3: "show vlan brief",
4: "show spanning-tree",
5: "show cdp neighbors",
6: "show ip route",
7: "exit"
}from netmiko import ConnectHandler
conn = ConnectHandler(**device)
output = conn.send_command(command, delay_factor=2)- SSH automation using Python
- Working with real Cisco IOS XE devices
- Network device interaction using Netmiko
- CLI-based user input systems
- Logging and output capture
- Building scalable automation scripts
- Multi-device parallel execution
- Configuration push (beyond show commands)
- Web dashboard using Flask
- Real-time monitoring system
- RESTCONF / NETCONF integration
- Export outputs to CSV or Excel
Jamill Naipao
Network & Systems Administration
Focus: Network Automation | Cisco Networking | Python Scripting
This project is for educational purposes only.