GNS3 Talks: Python for Network Engineers with GNS3 (Part 17) - Netmiko, SSH, Python Cisco switches
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. Cisco Wired LAN Design Guide: https://goo.gl/k855Vj
Script on Github: https://github.com/davidbombal/pythonvideos/commit/8aa5917f132c3d8956fee9337f24b30067b0413d
Transcription:
This is one of the multiple videos showing you how to use Python to configure Cisco networks. In this example, we're going to use Netmiko to configure a campus network running in GNS3 based on a validated Cisco technology design guide for campus wired local area networks.
Ok so the first thing we need to do is copy our script and this is the script that is using the Cisco design guide. So I'll create a file called Netmiko Cisco design and I'll paste the script into that file.
So here's our Netmiko file. We are connecting to each switch in the topology once again. We are opening up a file called IOSv L2 Cisco design. We are going to apply that to the access switches and then we'll open up a core file and apply that to the core switches. We've actually already applied the configuration to the core switches. So the important file that we need to create now is our access layer switch source files…
So here's the configuration that we want to apply on our access switches. So I'll paste that configuration in. So as you can see it's quite a large configuration. I'll exit and save the file so the following we need to run is the Cisco design file. So Python Netmiko Cisco design. Now again one of the great reasons for using GNS3 is you can test your scripts and make sure that they work properly before you try and deploy this in a production environment.
So there's the configuration that we're going to apply to the access layer switches. So at the moment, on Switch 5, notice we've got a lot of configuration added to the switch. I'll just do something you don't really want to do in production and that is a stop the script and the reason why is I want to show you what the current configuration looks like on a switch like Switch 4.
So notice we have some basic configuration. There is no certificate, we have some trunk port configuration on the access port ports belong to VLAN 2 but that's the only configuration on gigabit 2/0 and notice is not much else configuration.
So let's run that script again. It's connected to Switch 5, so ready on Switch 5. You can see that a certificate exists. Notice all the error disabled options have been added. There's our voice VLAN and our data VLAN trunk ports look the same. W ... https://www.youtube.com/watch?v=9uUK0nwuLrk
55413672 Bytes