GNS3 Talks: Python for Network Engineers with GNS3 (Part 1). Network programmability made easy.
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. In this video we program a Cisco IOSv router using Python on an Ubuntu Docker container.
The script used in this video is available on GitHub here: https://github.com/davidbombal/pythonvideos/blob/master/pythonR1script1.py
Transcription:
This is one of multiple videos discussing Python programming. Now there's a lot of information on the internet with regards to Python programming, but in these series of videos I'm going to concentrate solely on the use of Python with networking devices and specifically with gns3 .
I'm a very strong believer in practical learning. Think about it, when you were a child, did you go to university or school to learn how to ride a bike? Typically you learnt how to ride a bike by riding a bike and falling off a few times, making mistakes. But as you practiced you got better and better at riding a bike.
I think the same is true for any other skill that you want to gain and any other knowledge that you want to obtain. The best way to do it is to just do it , make mistakes, pick yourself up and try again. And with that in mind I'm going to show you how quickly you can get programming a Cisco network using Python.
In Google I've done a search for Python telnet and my first hitch is the telnet library or telnet client available in Python 2.7. Now there's a large debate in Python community about which version of Python you should learn. Python 2.7 is being replaced by Python 3. But notice on the Python website you can still download Python 2.7 and a lot of operating systems and network devices have version 2.7 by default. I'm going to show you both Python 2.7 and python 3 as part of these videos or as part of my GNS3 Python course. You may only have Python 2.7 available so it's good to know that but you should also learn Python 3 for the future.
So notice the simple script that we can copy from the Python documentation. We'll start off with a script and start programming our GNS3 topology.
In GNS3, I'm going to drag a iOS router to the workspace as well as an iOSv switch. These devices take a while to boot up, so to allow my docker containers to connect to the Internet quickly, I'm going to use a layer 2 switch. One of the docker containers available is in a blue 2 container and that's what I'm going to use in this topology rather than trying to get python running on your Windows PC or trying to get Python working on other operating systems. It's going to ... https://www.youtube.com/watch?v=IhroIrV9_7w
68763468 Bytes