Learning Python - A Network Engineer’s Journey with Python

/, Python/Learning Python - A Network Engineer’s Journey with Python

Learning Python - A Network Engineer’s Journey with Python


As I reflected on my career as an engineer and laid out my goals for 2016, I realized that one of the areas I really needed to focus on was my ability to automate network tasks. Not only can network automation lead to large increases in efficiency, but there are multiple compliance benefits to automating the network.

Take, for instance, the task of updating enable secrets on 150 switch stacks, firewalls, or routers. This is a fairly menial task and can be done manually over the course of a couple of days without too much trouble. However, the manual process itself is troublesome. How do you track that each device was updated for compliance reports? Are you sure that every device was updated? Did you fat finger a password somewhere? The opportunity for mistakes is endless. Aside from mistakes, how often does your certifying body require the passwords be updated? How long does it take? As Operations begins to adopt Agile/Lean methodologies it is important that we eliminate muda (waste) from our work. This is only one use case for network automation, but it is where I will begin my endeavor.

As an aside-

I find it vital to plan my professional development for several reasons. First, the chance for success is much greater when the path is planned. Second, it keeps me focused. Wandering off is easy to do when you do not have a map in front of you. Finally, and probably most important, it gives the end goal a reason. How many times have you set out to learn something just because? I used to do this all of the time (see my CCNP Datacenter posts). Over the past year I have had a chance to learn a bit about college curriculum development and as a result my philosophy toward professional development has shifted. This series on automating with Python is my first attempt at putting those new views into practice.


Part of my time developing courses has taught me that it is best to start with the end. I have laid out the following goals/capstones for myself:

  1. Develop a tool that will automatically change the enable secret on a series of switches and provide a report with the results
  2. Automate the practice of adding a device into a NMS via SNMPv3

With my limited scripting experience I feel that these goals are lofty enough, yet still attainable.

The Process:

The initial idea for this endeavor, learning Python and automating all the thing, came from two Packet Pusher’s podcasts. Some time ago, Ethan produced a podcast about Automation for Network Engineers. More recently, in their Design and Build series, Jeremy Filliben discussed the benefits of automating with Python. These two podcasts were the jump off point for me.

From there I looked for peer suggestions and reviewed some of the training opportunities I already had available. I settled on the following courses -

And also picked up the following book - Automate the Boring Stuff with Python. I typically prefer to stick with video/face-to-face training, but believe in this particular case a reference book will be helpful.

The Schedule

I am going to attempt to post weekly about what I have learned and how I have applied it. Although I know the basics of scripting, I will be forcing myself to start at the beginning - really hammering home the basic concepts. With work and family commitments, I am allowing ample time to work through this material. My goal is to wrap up and complete my two projects/goals by the end of April 2016.

Wrap Up:

That sums it up - by the end of April 2016 I hope to have a solid understanding of Python. To prove my understanding, I want to complete two projects:

  1. Develop a tool that will automatically change the enable secret on a series of switches and provide a report with the results
  2. Automate the practice of adding a device into a NMS via SNMPv3

And to do so, I will be hitting the books and working through a couple of training courses.

If you made it this far, I hope you will return to see my progress. If you happened upon this post in hopes of learning Python yourself, please dig in with me - we will all be better engineers in the end.

By | 2016-01-13T13:38:35+00:00 January 13th, 2016|Automation, Python|1 Comment

About the Author:

I am a Network Engineer with about five years of experience. Currently I'm working towards my CCNP Data Center and training for a marathon!

One Comment

  1. Pete January 18, 2016 at 1:21 pm - Reply

    Great goals as I have similar ones.. ! I am going to be starting off with learning good ole BASH first. Yep I said it. good ole BASH. Let me know how your python comes along as i was looking at that same book but I figured I would like to get the BASH fundamentals out of the way first. Let me know what resource you are going to be using the most and was the most helpful for your python.

Leave A Comment