The Pivot: Transitioning from Manual CLI Engineer to Python Automation
The moment I realized typing 'show ip route' on 50 routers manually was obsolete. How I learned Python to automate network operations at scale.
βI spent four hours on a Saturday night manually logging into 40 Cisco routers via PuTTY to change a single NTP server address. I swore I would never do that again.β
In early 2017 at Wipro, I recognized that manual CLI interaction was the single largest bottleneck in enterprise network engineering.
I shifted my focus from manual terminal commands to Python Network Automation, leveraging libraries like netmiko and paramiko.
The Paradigm Shift: Scripting Network Tasks
Instead of opening multiple terminal windows, I wrote a multi-threaded Python script that established SSH sessions concurrently across 50 devices, parsed output strings, and validated configurations.
# # Concurrent Cisco IOS Configuration Update via Netmiko
from netmiko import ConnectHandler
import concurrent.futures
devices = [
{'device_type': 'cisco_ios', 'host': '10.1.1.1', 'username': 'admin', 'password': 'Secr3tPassword'},
{'device_type': 'cisco_ios', 'host': '10.1.1.2', 'username': 'admin', 'password': 'Secr3tPassword'}
]
def update_ntp(device):
net_connect = ConnectHandler(**device)
config_commands = ['ntp server 10.100.1.50', 'clock timezone UTC 0']
output = net_connect.send_config_set(config_commands)
net_connect.disconnect()
return f"Completed on {device['host']}"
with concurrent.futures.ThreadPoolExecutor() as executor:
results = executor.map(update_ntp, devices)
for res in results:
print(res)
[!NOTE] Netmiko: A specialized Python library built on top of Paramiko that handles SSH connection maintenance, prompt waiting, and configuration mode handling for multi-vendor network operating systems.
The Verdict
Key Takeaway
Automate Repetitive Tasks Immediately.
If you execute a CLI task manually more than twice, write a script. Learning Python for Network Automation shifts your engineering role from manual operator to systems architect.
Sachin Kumar Sharma
Associate Director (Infrastructure & Cloud Architecture Strategy) | 20+ Yrs Exp
Architecting resilient multi-cloud enterprise landing zones, SDN overlay fabrics, DevSecFinOps automation pipelines, and autonomous Agentic AI platforms.