GNS3 Talks: Python for Network Engineers with GNS3 (Part 12) - Netmiko, SSH, Python and Cisco
David Bombal
Udemy: Get the course for $10 here: https://goo.gl/QYC988 GNS3 Academy: Get the course for $10 here: https://goo.gl/vnZJhg More free Python videos here: https://www.youtube.com/playlist?list=PLhfrWIlLOoKPn7T9FtvbOWX8GxgsFFNwn
Learn Python programming with GNS3. In this series of videos I will show you how you can quickly and easily program Cisco networks using Python.
================================ Script on GitHub:
https://github.com/davidbombal/pythonvideos/commit/90f349178c9dba5d65a1304c97814505d59be5bb
Install Netmiko:
apt-get update apt-get install python -y apt-get install build-essential libssl-dev libffi-dev -y apt-get install python-pip -y pip install cryptography pip install netmiko
================================ Al's GNS3 community entry:
Transcription:
In the previous video I showed you how to use Paramiko to configure a switch using SSH. Paramiko is a Python implementation of the SSH of version 2 protocol and provides both client and server functionality.
Now Netmiko is a multi-vendor library that was developed to simplify Paramiko SSH connections to network devices. This is one of multiple videos teaching you network programmability using Python and GNS3. You can find out more details about the software on github.
But in brief, it's once again a multi vendor library that allows you to connect to network devices using SSH. It supports Python 2.7, 3.4 and 3.5.
It supports a wide range of devices, devices that are tested on a regular basis include Aresta vEOS, Cisco ASA, Cisco IOS, IOS XE. IOS XR, Nexus OS, the Cisco SG300, HP Comware and Aruba or ProCurve software Juniper and Linux. There's been limited testing on devices from Avaya, Brocade, Dell and other vendors.
There's also experimental testing with yet more devices. The idea once again is to simplify SSH connections in multi vendor environments.
Now multiple devices are supported and you can find the list by clicking on this link. As you can see, there's a wide range of devices that are supported using SSH. Now the way you get started is you use from Netmiko import connect handler then you specify a name for your device and you specify the device type. In this example I'm going to be using Cisco IOS.
Here's a list of device types, we have Cisco IOS, Cisco XE, Cisco ASA, Nexus and a long list of devices are listed here but we're going to start off with Cisco IOS.
You then specify the IP address, username and password to connect to the device. You can specify a port number, default is port 22. You can specify a secret default it is not used, verbose is turned off.
You then connect to the device and you can execute commands such ... https://www.youtube.com/watch?v=GN8aTXMdycY
58431611 Bytes