Announcements:

Nornir Course starts August 8th.

Sign-up here

Python Network Automation Course starts in September.

Sign-up here
Kirk Byers Image
Kirk Byers Image

Articles:

Email-List:

An Introduction to Nornir

By Kirk Byers

Recently David Barroso and others (including me) have created a new network automation framework named Nornir. The vast majority of the credit belongs to David, however.

Nornir is a Python framework that provides inventory management and concurrency. It belongs in the same category as Ansible and Salt.

I am excited about Nornir and the possibility of an all Python automation framework. Note, while I refer to an all 'Python framework', this is referring to the execution environment. In other words, what you write your program in and what you execute.

Read More

Nornir using an Ansible Inventory (Part1)

By Carl Montanari

Several months ago I presented at the Packet Pushers Virtual Design Clinic (VDC) 3, my session was titled, "CI/CD for Networking".

In this presentation, I demonstrated leveraging Jenkins and Ansible to provide a repeatable and automatable method for managing network device configurations.

I selected Ansible, more specifically NAPALM-Ansible, as the network automation tool of choice for a few reasons:

Read More

Join Email-List

If you are interested in my Python courses or in learning more about network automation—sign up for my email-list.

Starting in September—a free, email-course on Learning Python (More Details)

Using Nornir for OS Upgrades (Part 1)

By Kirk Byers

Previously I wrote an article that Introduces Nornir

In this article, I want to expand on the Nornir introduction and do something more interesting. In particular, I want to use Nornir to Secure Copy files to a set of network devices. I then want to use that file transfer process and some additional code to perform an OS upgrade on two Cisco IOS routers (part 2).

Unfortunately, I am going to switch from using Nornir 1.1 to using Nornir 2.0. There are some meaningful differences between the two versions. Additionally, Nornir 2.0 is not released yet so I am going to be working out of the 2.0 branch in GitHub.

Read More

Using Nornir for OS Upgrades (Part 2)

By Kirk Byers

In Part1, I wrote about Nornir's inventory and about using Nornir and the netmiko_file_transfer plugin to transfer a file to twelve devices across three different platforms.

Now we are going to continue this OS upgrade process. In this article, we are going to do the following: expand the file transfer to select different files (based on the platform); set the boot variable; save of the running configuration; reload the device.

For the first task (expanding the file transfer), we will use all twelve devices. For the remaining three tasks, we will only focus on Cisco IOS. In other words, we will actually perform the OS upgrade on the two Cisco IOS devices.

Read More

Netmiko SSH Proxy Support

By Kirk Byers

Netmiko supports SSH proxies.

By this I mean you can 'bounce' through an intermediate server while connecting to a remote network device.

This article will demonstrate how to use this feature.

Read More

Netmiko and what constitutes done

By Kirk Byers

Screen-scraping suffers from two fundamental problems—the first is that screen-scraping returns unstructured data (i.e. a big, block of text) and the second is that the communication channel has no good notion of being done. While people frequently bring up the former, the latter is probably a bigger issue.

Let's discuss the second issue in some more detail (and what it implies).

The communication channel has no good notion of being done.

Read More

The Python Debugger (pdb)

By Kirk Byers

In order to debug effectively, you need to be able to:

1. Extract information from your system. This information can be messages printed to standard output, logging messages, stack traces, or analysis through using a debugger.

2. Make changes to your program and see how it affects the information extracted in step1.

Read More

Using Ansible to Configure and Verify DHCP Helpers

By Kirk Byers

The problem...

I need to configure a DHCP helper on a set of VLANs across a set of network devices. I also need to ensure that DHCP helpers are not configured on any other VLANs besides the ones specified.

Additional qualifications—the network devices are brownfield. In other words, I can't just load full configurations programmatically (i.e. skip the verification step because I am generating the entire configuration).

Read More

Netmiko and TextFSM

By Kirk Byers

In Netmiko 2.0, I added support for direct integration to TextFSM particularly for ntc-templates.

What does TextFSM and ntc-templates allow you to do?

Simply stated, it allows you to take unstructured data and convert it to structured data. Or worded differently, it takes a block of text and converts it to lists and dictionaries (or some combination thereof).

Read More

Expanding Netmiko's Secure Copy Support

By Kirk Byers

I have recently been working on expanding the Secure Copy file transfer capabilities that are included in Netmiko. Ultimately this code should make OS upgrades and other file transfer operations easier to accomplish.

At this point, I have working and tested code on Cisco IOS, IOS-XE, NX-OS, IOS-XR, Juniper Junos, and Arista EOS. This is for both Secure Copy 'get' and 'put' operations and also includes associated methods that check whether the file exists, that verify disk space is available and that perform an MD5 comparison on the transferred file.

Read More

NAPALM, Ansible, and Cisco IOS

By Kirk Byers

In 2015, David Barroso and Elisa Jasinska created a library called NAPALM (Network Automation and Programmability Abstraction Layer with Multivendor support).

The general idea behind this library is to create a standardized, multivendor interface for certain file and get operations. Last fall, Gabriele Gerbino added Cisco IOS support to NAPALM.

Independent of NAPALM, I have been thinking about and experimenting with programmatic file operations using Cisco IOS. I wrote a proof of concept related to this here. Consequently, I thought it made sense to add/improve the Cisco IOS file operations in NAPALM.

Read More

An Introduction to Nornir

By Kirk Byers

Recently David Barroso and others (including me) have created a new network automation framework named Nornir. The vast majority of the credit belongs to David, however.

Nornir is a Python framework that provides inventory management and concurrency. It belongs in the same category as Ansible and Salt.

I am excited about Nornir and the possibility of an all Python automation framework. Note, while I refer to an all 'Python framework', this is referring to the execution environment. In other words, what you write your program in and what you execute.

Read More

Join Email-List

If you are interested in my Python for Network Engineers courses or in learning more about using Python for network automation—sign up for my email-list.

Starting in September—a free email course on Learning Python (More Details)

Nornir using an Ansible Inventory (Part1)

By Carl Montanari

Several months ago I presented at the Packet Pushers Virtual Design Clinic (VDC) 3, my session was titled, "CI/CD for Networking".

In this presentation, I demonstrated leveraging Jenkins and Ansible to provide a repeatable and automatable method for managing network device configurations.

I selected Ansible, more specifically NAPALM-Ansible, as the network automation tool of choice for a few reasons:

Read More

Using Nornir for OS Upgrades (Part 1)

By Kirk Byers

Previously I wrote an article that Introduces Nornir

In this article, I want to expand on the Nornir introduction and do something more interesting. In particular, I want to use Nornir to Secure Copy files to a set of network devices. I then want to use that file transfer process and some additional code to perform an OS upgrade on two Cisco IOS routers (part 2).

Unfortunately, I am going to switch from using Nornir 1.1 to using Nornir 2.0. There are some meaningful differences between the two versions. Additionally, Nornir 2.0 is not released yet so I am going to be working out of the 2.0 branch in GitHub.

Read More

Using Nornir for OS Upgrades (Part 2)

By Kirk Byers

In Part1, I wrote about Nornir's inventory and about using Nornir and the netmiko_file_transfer plugin to transfer a file to twelve devices across three different platforms.

Now we are going to continue this OS upgrade process. In this article, we are going to do the following: expand the file transfer to select different files (based on the platform); set the boot variable; save of the running configuration; reload the device.

For the first task (expanding the file transfer), we will use all twelve devices. For the remaining three tasks, we will only focus on Cisco IOS. In other words, we will actually perform the OS upgrade on the two Cisco IOS devices.

Read More

Netmiko SSH Proxy Support

By Kirk Byers

Netmiko supports SSH proxies.

By this I mean you can 'bounce' through an intermediate server while connecting to a remote network device.

This article will demonstrate how to use this feature.

Read More

Netmiko and what constitutes done

By Kirk Byers

Screen-scraping suffers from two fundamental problems—the first is that screen-scraping returns unstructured data (i.e. a big, block of text) and the second is that the communication channel has no good notion of being done. While people frequently bring up the former, the latter is probably a bigger issue.

Let's discuss the second issue in some more detail (and what it implies).

The communication channel has no good notion of being done.

Read More

The Python Debugger (pdb)

By Kirk Byers

In order to debug effectively, you need to be able to:

1. Extract information from your system. This information can be messages printed to standard output, logging messages, stack traces, or analysis through using a debugger.

2. Make changes to your program and see how it affects the information extracted in step1.

Read More

Using Ansible to Configure and Verify DHCP Helpers

By Kirk Byers

The problem...

I need to configure a DHCP helper on a set of VLANs across a set of network devices. I also need to ensure that DHCP helpers are not configured on any other VLANs besides the ones specified.

Additional qualifications—the network devices are brownfield. In other words, I can't just load full configurations programmatically (i.e. skip the verification step because I am generating the entire configuration).

Read More

Netmiko and TextFSM

By Kirk Byers

In Netmiko 2.0, I added support for direct integration to TextFSM particularly for ntc-templates.

What does TextFSM and ntc-templates allow you to do?

Simply stated, it allows you to take unstructured data and convert it to structured data. Or worded differently, it takes a block of text and converts it to lists and dictionaries (or some combination thereof).

Read More

Expanding Netmiko's Secure Copy Support

By Kirk Byers

I have recently been working on expanding the Secure Copy file transfer capabilities that are included in Netmiko. Ultimately this code should make OS upgrades and other file transfer operations easier to accomplish.

At this point, I have working and tested code on Cisco IOS, IOS-XE, NX-OS, IOS-XR, Juniper Junos, and Arista EOS. This is for both Secure Copy 'get' and 'put' operations and also includes associated methods that check whether the file exists, that verify disk space is available and that perform an MD5 comparison on the transferred file.

Read More

NAPALM, Ansible, and Cisco IOS

By Kirk Byers

In 2015, David Barroso and Elisa Jasinska created a library called NAPALM (Network Automation and Programmability Abstraction Layer with Multivendor support).

The general idea behind this library is to create a standardized, multivendor interface for certain file and get operations. Last fall, Gabriele Gerbino added Cisco IOS support to NAPALM.

Independent of NAPALM, I have been thinking about and experimenting with programmatic file operations using Cisco IOS. I wrote a proof of concept related to this here. Consequently, I thought it made sense to add/improve the Cisco IOS file operations in NAPALM.

Read More

Join Email-List

If you are interested in my Python for Network Engineers courses or in learning more about using Python for network automation—sign up for my email-list.

Starting in September—a free email course on Learning Python (More Details)

Articles:

An Introduction to Nornir

By Kirk Byers

Recently David Barroso and others (including me) have created a new network automation framework named Nornir. The vast majority of the credit belongs to David, however.

Nornir is a Python framework that provides inventory management and concurrency. It belongs in the same category as Ansible and Salt.

I am excited about Nornir and the possibility of an all Python automation framework. Note, while I refer to an all 'Python framework', this is referring to the execution environment. In other words, what you write your program in and what you execute.

Read More

Nornir using an Ansible Inventory (Part1)

By Carl Montanari

Several months ago I presented at the Packet Pushers Virtual Design Clinic (VDC) 3, my session was titled, "CI/CD for Networking".

In this presentation, I demonstrated leveraging Jenkins and Ansible to provide a repeatable and automatable method for managing network device configurations.

I selected Ansible, more specifically NAPALM-Ansible, as the network automation tool of choice for a few reasons:

Read More

Using Nornir for OS Upgrades (Part 1)

By Kirk Byers

Previously I wrote an article that Introduces Nornir

In this article, I want to expand on the Nornir introduction and do something more interesting. In particular, I want to use Nornir to Secure Copy files to a set of network devices. I then want to use that file transfer process and some additional code to perform an OS upgrade on two Cisco IOS routers (part 2).

Unfortunately, I am going to switch from using Nornir 1.1 to using Nornir 2.0. There are some meaningful differences between the two versions. Additionally, Nornir 2.0 is not released yet so I am going to be working out of the 2.0 branch in GitHub.

Read More

Using Nornir for OS Upgrades (Part 2)

By Kirk Byers

In Part1, I wrote about Nornir's inventory and about using Nornir and the netmiko_file_transfer plugin to transfer a file to twelve devices across three different platforms.

Now we are going to continue this OS upgrade process. In this article, we are going to do the following: expand the file transfer to select different files (based on the platform); set the boot variable; save of the running configuration; reload the device.

For the first task (expanding the file transfer), we will use all twelve devices. For the remaining three tasks, we will only focus on Cisco IOS. In other words, we will actually perform the OS upgrade on the two Cisco IOS devices.

Read More

Netmiko SSH Proxy Support

By Kirk Byers

Netmiko supports SSH proxies.

By this I mean you can 'bounce' through an intermediate server while connecting to a remote network device.

This article will demonstrate how to use this feature.

Read More

Netmiko and what constitutes done

By Kirk Byers

Screen-scraping suffers from two fundamental problems—the first is that screen-scraping returns unstructured data (i.e. a big, block of text) and the second is that the communication channel has no good notion of being done. While people frequently bring up the former, the latter is probably a bigger issue.

Let's discuss the second issue in some more detail (and what it implies).

The communication channel has no good notion of being done.

Read More

The Python Debugger (pdb)

By Kirk Byers

In order to debug effectively, you need to be able to:

1. Extract information from your system. This information can be messages printed to standard output, logging messages, stack traces, or analysis through using a debugger.

2. Make changes to your program and see how it affects the information extracted in step1.

Read More

Using Ansible to Configure and Verify DHCP Helpers

By Kirk Byers

The problem...

I need to configure a DHCP helper on a set of VLANs across a set of network devices. I also need to ensure that DHCP helpers are not configured on any other VLANs besides the ones specified.

Additional qualifications—the network devices are brownfield. In other words, I can't just load full configurations programmatically (i.e. skip the verification step because I am generating the entire configuration).

Read More

Netmiko and TextFSM

By Kirk Byers

In Netmiko 2.0, I added support for direct integration to TextFSM particularly for ntc-templates.

What does TextFSM and ntc-templates allow you to do?

Simply stated, it allows you to take unstructured data and convert it to structured data. Or worded differently, it takes a block of text and converts it to lists and dictionaries (or some combination thereof).

Read More

Expanding Netmiko's Secure Copy Support

By Kirk Byers

I have recently been working on expanding the Secure Copy file transfer capabilities that are included in Netmiko. Ultimately this code should make OS upgrades and other file transfer operations easier to accomplish.

At this point, I have working and tested code on Cisco IOS, IOS-XE, NX-OS, IOS-XR, Juniper Junos, and Arista EOS. This is for both Secure Copy 'get' and 'put' operations and also includes associated methods that check whether the file exists, that verify disk space is available and that perform an MD5 comparison on the transferred file.

Read More

NAPALM, Ansible, and Cisco IOS

By Kirk Byers

In 2015, David Barroso and Elisa Jasinska created a library called NAPALM (Network Automation and Programmability Abstraction Layer with Multivendor support).

The general idea behind this library is to create a standardized, multivendor interface for certain file and get operations. Last fall, Gabriele Gerbino added Cisco IOS support to NAPALM.

Independent of NAPALM, I have been thinking about and experimenting with programmatic file operations using Cisco IOS. I wrote a proof of concept related to this here. Consequently, I thought it made sense to add/improve the Cisco IOS file operations in NAPALM.

Read More