Next Steps for ZTP operations with Cisco NSO

Next Steps for ZTP operations with Cisco NSO

Following previous articles explaining how i could register automatically some Cisco and Juniper network devices thanks to embedded python librairies, let's dive deeper into how these devices will now recover their final day-1 configurations. This article is intended to be a long-term article. It will be updated on a per day/week basis depending on the blockers/surprise i will be facing.

In this lab, we will cover two possible scenarios from which will study how to provision automatically the final configuration of Cisco Systems and Juniper Networks devices.

To let you have a better understanding of this ZTP journey, please let me remind you the previous articles written on that topic :

Table of Contents:

  • List of materials used for this lab.
  • Overview of protocols and features for each device (Device Matrix)
  • Enumeration & description of both scenarios which will be studied
  • Current state of situation and Goal
  • Diagram of both scenarios
  • Review of the first scenario
  • Review of the second scenario

__________________________________________________________________________

Here is the list of the materials used to perform this lab :

  • NID : NSO in Docker Instance > i thought it could be a fancy way to install and operate NSO ;-).
  • A Proxmox host and its Ubuntu VM on which is installed ISC-DHCP-Server
  • A Juniper Networks SRX300 with an "out of the box" junos version of 20.2R1-S2.1
  • A ESXi Server hosting a Ubuntu VM acting as a webserver from which the python scripts, Junos firmware and temporarly configuration files are downloadable.
  • Two Cisco ISR routers, ISR 1111-4P & ISR 4321 with an out of the box IOS-XE Version 17.0X.

__________________________________________________________________________

Overview of protocols and features for each device (Device Matrix)

Aucun texte alternatif pour cette image

__________________________________________________________________________

Enumeration & description of both scenarios which will be studied

This article will mainly rely on python scripts that will integrate some Restconf calls. However, i currently have two different scenarios in mind to perform this lab.

The first scenario will aim to let the several devices which are part of this lab to download by themselves their final configuration from NSO. In this scenario, the device will download and execute a python script from a remote server so it can fetch its day-1 configuration from NSO server.

A second scenario will aim to code a python script which will parse NSO CDB for new devices. From there, and depending on the device role (CPE or PE), the script will push the remaining configurations to each device.

__________________________________________________________________________

Current state of situation and Goal:

At this step, we have several devices in the network which are synchronized with NSO CDB. Three new devices are going to be added.

The initial python script used in previous articles was managing the uniqueness of hostnames. The new version of the script will handle a new hostname naming design as well as the assignment of a specific category for each device depending on the device function in the network (CE or PE).

Initial State:

  • CDB with a certain number of device:

Aucun texte alternatif pour cette image

  • New devices are to be added with a day-0 configuration according to the following schema:

Aucun texte alternatif pour cette image

New Features:

  1. Device needs to be categorized > CE or PE --> initial ZTP python script has to be modified so each device can be sorted according to its role/category.
  2. Depending on the category new python script will apply specific configuration templates to each device

Aucun texte alternatif pour cette image
Maina Wanjau

Network | Security | Automation | Web Services

1 年

Hi Jeremie Rouzet, Have you been able to make further progress with this? I have an idea for incorporating Jinja templating that would receive specific inputs like management IP's from an IPAM server. I believe such Jinja templates would be able to perform "custom" ZTP configuration per device that would have plug-n-play aspects with existing production environments.

Added some more details about the design and scenarios ;-)

回复

This article is not related to a particular project i have to handle but is more here to share some new experiences related to network programmability.

回复

Again, this article is not finished yet but it aims to be fullfiled until we reach the final result. Moreover, i have identified two possible scenarios which will be described along this journey ! Please do not hesitate to review, comment, share your tricks and advises. Thanks in advance for your contributions !

回复

要查看或添加评论,请登录

Jeremie Rouzet的更多文章

社区洞察

其他会员也浏览了