Note: This is not a tutorial, but a kind of journal where I’m sharing my journey.

Netmiko is another popular library when it comes to network automation, and it is actually based on Paramiko, but it makes everything easy by handling low level details behind the scenes and it also supports to automate multi-vendor devices. It is something that is specifically designed for network engineers.

I’m using the same topology that I was using during my automation with Paramiko. I have two routers in my network and they are reachable from my laptop which I will be using for programming. Both routers are configured with SSHv2 and local users are created for accessing them. As Netmiko handles all low level details, It has really made very easy to automate anything, like when I was using Paramiko, I was the one who was taking care of managing SSH, disabling of paging, managing the timer after sending the commands, and manipulating the output to remove unnecessary things, and so on. But this time, I don’t really need to deal with any of these things.

As network automation provides the countless possibilities, this time I made a program to check the users that are logged in on my router like what is the username, what is the source IP address of the user and what is the IP address of the router on which it is logged-in. And, based on the output, We can send these details to Admin via Email or we can perform an action based on the output, as I said that possibilities to do anything are countless. The snapshot of the result is attached in next line. LoggedinUsers

As you can see, best thing about the automation is that you can literally do anything you can think of.

Signing off for today… Auto