Author: nschmura

Using Visual Studio Code for creating Network Code

When I started on my network automation journey, I didn’t pay too much attention to what I was using when creating my code. I knew that programmers used Integrated Development Environments (IDEs), but since I was mostly editing smaller text files I kept to simple text editors like Nano or Vi. I attended Red Hat’s AnsibleFest in Austin, TX and saw that many people in the network world (both vendor reps and other network engineers) would use much more advanced text editors. One of the most popular ones being used was Atom. I ended up having a conversation with some other co-workers and a few Red Hat reps, and some suggested trying out Microsoft’s Visual Studio Code (commonly referred to VS Code). After having some time to try out both, I have chosen to stick with VS Code. While this blog post isn’t going to do a side by side comparison of text editors, it will show some of the highlights that led me to choose VS Code when creating network code.

Continue reading “Using Visual Studio Code for creating Network Code”

Policy Based Routing Using Source Address

In a typical network, routing is done on a hop by hop basis with each router making a forwarding decision based on the destination address of a packet. However, certain scenarios can occur that require routing based on something other than the destination. Policy based routing (PBR) can be used to modify how packets are handled by a router. This blog post will demonstrate how to perform policy based routing on Cisco IOS devices using the source address as the policy to route by.

Continue reading “Policy Based Routing Using Source Address”

Fixing Dynamips in Fedora 26 64-bit

GNS3 Problems in Fedora 25

In my first blog post, I setup a Fedora 25 machine running Fedora Server version and GNS3 for network simulation. Unfortunately, during a “dnf update” on the system GNS3 stopped working. This was possibly an issue with the version of GNS3 I was running (1.5.3) and the aiohttp python library. I did see that GNS version 2.1 was supposed to fix the aiohttp library issue (this post), but it was only available on the Fedora 26 repositories. Upgrading from Fedora 25 to 26 is simple, as detailed by this Fedora Magaizne article. In short, all you need to do is run the following commands:

Continue reading “Fixing Dynamips in Fedora 26 64-bit”

Network Configuration Templates with Ansible and Jinja2

In a previous blog post I showed how to utilize Python to create a script that will generate network configurations from templates utilizing Jinja2. While the solution did work, creating scripts from scratch using a programming language can be a daunting task for network engineers. Luckily for us, there are already tools in place that we can leverage to do the heavy lifting for us. Today we will look at Ansible to generate network device configurations from templates.

Continue reading “Network Configuration Templates with Ansible and Jinja2”

Commit to Git

Introduction

Git is one of the most popular version control systems out today. With network automation and scripting becoming more and more popular, there needs to be a way to store and track changes made to scripts and configuration files. Not only will Git allow you to do that, but it can also help collaborate with colleagues (via a private Git system) or with the rest of the world (GitHub). GitHub is a site that you can go to and upload your own creations, as well as browse through the work of others. GitHub is built on Git. Let’s go ahead and dive right into the world of Git and GitHub. First, I will upload the code I created in my last post, and after that I will download some code written by Ivan Pepelnjak and shared on his GitHub page.

Continue reading “Commit to Git”

Network Automation: Template Configurations with Jinja2 and YAML

Introduction

Network automation and programmability is one of the hot topics in networking today. It is one area that I want to focus on this year and become very familiar with. One of the best resources that I found was the book “Network Programmability and Automation, 1st Edition” by Jason Edelman, Scott Lowe, and Matt Oswalt. Although it is only available in a pre-release (incomplete) version, if you have a Safari Books subscription I highly recommend checking it out. This book not only is extremely easy to ready, but it gives the high level ideas and theory that I feel is desperately needed for us network engineers. This whole programming idea is foreign to a lot of us, and just jumping right into coding can be a very daunting and intimidating task. This book is what gave me the clarity to feel confident enough to dive into automation.

In this blog post I will utilize a code example from the book that will allow you to automate network configuration templates. We will be using Python, Jinja2, and YAML. It is easy, low hanging fruit that will allow you to get your feet wet, and at the same time actually put this whole progamming and automation to practical use that every engineer can relate to.

Continue reading “Network Automation: Template Configurations with Jinja2 and YAML”

How ARP works

Introduction

Learning and mastering the fundamentals are key to becoming a successful network engineer. In this blog post, I will be showing how ARP works. ARP is one of the fundamental protocols when dealing with today’s networks. While ARP itself works automatically and without any configuration, knowing how it works will help you really understand how traffic flows through the network. Before we go into the technical details, we first need to know why ARP is even required.

Continue reading “How ARP works”