Netmiko

Netmiko
Photo by Alex Chumak / Unsplash

Netmiko is a multi-vendor library in Python that simplifies the process of interacting with network devices, such as routers and switches, through SSH and Telnet connections. It provides a consistent and programmatic interface for automating network device configuration and management tasks.

Netmiko allows you to use Python on devices that do not support Netconf or Restconf APIs. It supports a wide range of network devices from different manufacturers, including Cisco, Juniper, Arista, HP, and basically anything that can expose a port for SSH.

With Netmiko, you can establish SSH or Telnet (although friends don’t let friends use Telnet) connections to network devices, send configuration commands and show commands, so you can check the status of a device. You can use it to perform changes programmatically, abstracting the process of network administration away from the command line and into the code studio. This shift allows for a more collaborative approach as changes to configuration code and be shared and iterated upon with the use of tools such as Github or other code repositories. Netmiko handles the low-level details of establishing and maintaining connections, including authentication, enabling you to focus on the network automation logic and, more importantly, allowing engineers a less manual method (with the hopes of mitigating misconfigurations through monotonous repeat input.

In this video, I will show you that Netmiko works without much headache. It is the automation tool most similar to configuration through the command line interface that I have yet found. It eases the user into the world of possibilities network automation offers. The familiarity a with the configuration and show commands brings a network engineer by the hand, tip-toeing into network programability. I think I mentioned something similar in an earlier post about success breeding success. Netmiko is an easy win that will whet your appetite for more network automation.

As I mentioned before, I am not by any means an expert and have miles to go on this journey into network automation. The video is proof positive that I am not a python expert. I still need to hone those skills, but I have no doubt that using Netmiko more often will expose me to more and more python code, and that will improve my skills with the language in time. 

HTH