I was just going to watch the BGP series without taking notes on NAPALM, but its been so long since I've configured it from scratch I figured I could knock the rust off, below is a quick review of the configs in my Multi-AS BGP Topology I've created for this lab. Note - This … Continue reading Python3 Network Promgramming – Quick BGP configuration and demo of using NAPALM to get BGP information from network devices!
I'm going to build out this lab a little bit more using Netmiko scripting to push configs to SW1 so we get a bit more output to review, and we will also be using JSON within the script as well to make it more readable that a big mashed up blob of output! 🙂 First … Continue reading Python3 Network Programming – Building lab with Netmiko, using JSON formatting within the Py3 scripts for readability!
Time to burn through Multi-Vendor Environments using Python with NAPALM! I've spun up a new network, as I believe I am going to wade into the waters of doing some router configuration using NAPALM scripting coming up in later posts! Napalm is short for "Network Automation and Programmability Abstraction Layer with Multivendor Support" which is … Continue reading Python3 Network Programming – Review of NAPALM (what it is), some links with additional resources, and configuring a new lab for use with NAPALM configs!
To round off the Netmiko section of Python3, I'd like to show a script that will standardize the entire network here with NTP and Buffered Logging, as those two things should be absolutely configured on a network for troubleshooting purposes. The configs shown are very minimal, and definitely not best practice for production networks, which … Continue reading Python3 Network Programming – Deploying base NTP / Logging across entire network, best practices, and the raw script at the very end of the post!
Finally the power to Automate Network Device Standardization!!! In this demo I will actually be starting small, adding SW4 and SW5 to write a script similar to the last lab, only instead of sending config line by line, it will open a file on the NetAuto Host that will contain configs to be written. This … Continue reading Python3 Network Programming – Writing a script that calls a file to use within the script (and a lot of troubleshooting the script itself)!
Being as I have been tanking through just touching network devices with Python, I wanted to take a step back, and look at the components within the script that call out each others to function properly and how to start thinking about writing scripts freestyle that suits your needs and begin thinking diving deeper into … Continue reading Python3 Network Programming – Review of a Netmiko Python Script, Python Terminology, and how different pieces reference each other in a script!
Now that I have secured SSH in my previous post on this lab, I will continue forward using Netmiko that utilizes SSH for connections, so I will get right to it here. First to prep your NetAuto Host for Netmiko (this requires Internet Connection) The NetAuto host in GNS3 does not come with Netmiko modules … Continue reading Python3 Network Programming – Installing Python3-pip / Netmiko Module, writing Netmiko script, and executing it on the multi-switch lab / working through troubleshooting!
It is time to ditch the SSH and move onto Netmiko that would actually be used in most production networks, which involves a bit more than "enable ssh" if you have not turned it on before / turned off telnet, but I will demo it here of course via Automation! I am still continuing on … Continue reading Python3 Network Programming – Enabling SSHv2 and Disabling Telnet using Automation, and how to secure your network by enabling SSHv2 and disabling Telnet (very carefully)!
This will be a shorter demo, using the same Topology from the previous lab, to demonstrate writing a script for the NetAuto Host to telnet to switches to backup the running configs and in this demo writing them to the local NetAuto Host. This will be a pretty quick lab as the steps for using … Continue reading Python3 Network Programming – Creating a script to Automate getting backup configs from multiple network devices using my previous Topology!
I will be automating the three switches in the above Topology with a single script! But first an important note before reading: This simple demo took all of an hour or so to lab up and post here, Network Automation with Python is SUCH a powerful skillset to have at your disposal, it is ridiculous … Continue reading Python3 Network Programming – Creating a very simple script that automates unlimited devices, nesting loops within loops, and labs to demo how absolutely powerful Network Automation is!
I have created a new Topology consisting of just a switch to demonstrate using "Loops" and "Concatenation" to demonstrate how to create a ton of VLANs, using the Loop to define the "Iterations" or number of times the function is run, and using Concatenation to allow "Integers" and "Strings" in Python to play well together. … Continue reading Python3 Network Programming – Using loops to script VLAN configuration, explanation of Python terminology, and lab demo to see it work!
I honestly hope this is a really boring post as its been a long day / weekend for me! I do hope this is a very boring demonstration of my work just working this blog, as I spent Friday into Saturday AM making most of it, and have mostly been taking advantage of the beautiful … Continue reading Python3 Network Programming – Demonstrating Python script execution, link to this GNS3 Topology shown, and other useful links for GNS3 setup! (Part 2/2)
Its not too deep into complex configurations, but turning it up a notch 🙂 I am still do some no-no's like setting the "enable secret" password in plain text in the code templates, which will be something I address down the road, I've decided to add a few devices and a few old friends from … Continue reading Python3 Network Programming – Configuring a larger, more complex Topology using Python 3! All code / scripts used, devices explained, and some troubleshooting! (Part 1/2)
This is history in the making - My first ever Python network configuration!!! As it appears, it is only logging into R1 via Telnet to add an interface lo0, then adding an IP Address of 18.104.22.168/32 and writing mem / exiting the router and it worked! I start with the Telnet Example that can be … Continue reading Python3 Network Programming – History in the making! My first ever Network Configuration using Python!!! 😀
I've deleted the entire contents of this post to re-write why you need to learn Automation using Python if you plan to get into Network Engineering! I want to say on thing first, do yourself a huge favor, click the link below and buy this course by David Bombal for $40 on Udemy to invest … Continue reading THE GRIND IS BACK – Starting with David Bombals Python for Network Engineers course, and some links to help prepare for the CCNA DevNet (and beyond)!