cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
736
Views
30
Helpful
5
Replies

Cisco NSO ZTP for Juniper MX

seavba
Level 1
Level 1

Hello,

Has anyone an example about how to setup ZTP in NSO for Juniper MX devices?
I'm not able to find documentation regarding it.

Thanks in advance

Sergio

1 Accepted Solution

Accepted Solutions

So the question that you have identified above is: How would NSO know that there is a new device to be managed? One way of doing that is for the device to send a notification to announce itself. That is what message 6a does in the diagram above. This could be a RESTCONF call to an NSO service, which then would add the device to CDB and then apply a day-1 config.

View solution in original post

5 Replies 5

KJ Rossavik
Cisco Employee
Cisco Employee

It depends a bit what you mean by ZTP. The traditional interpretation is that you want to add a device to a network without manually configuring it. So you want to be able to ship a device to its target location, plug it in, and then it automatically comes up with the right configuration.

 

The first stage of this is what I call the "core ZTP function".

Screenshot 2022-03-09 at 13.06.08.png

As you can see, this is entirely driven by the PXE script executing on the target device. You could create a package in NSO for the ZTP Status function depicted above. This would be a state machine that is pushed forward by the status updates from the target device.

 

Once this completes, then you may want to apply a day-1 configuration to the device, and this is where NSO automation would play a bigger role. The day-1 config could e.g. require (an) IP address(es) from an IPAM or something. There could also be a need to configure upstream devices as a consequence of adding the new device.

 

Cisco CX have done a number of projects like this.

seavba
Level 1
Level 1

Thanks a lot @KJ Rossavik ,

 

Sorry but now I'm lost. Why I need the PXE script for checking/reporting ZTP status?

 

As you said, my idea is no buy a new Juniper MX device, ship it to the proper Location, plug it in and and then, the device must be able to get the config. 

 

For this process I was thinking of the device will connect to DHCP, DHCP will send the IP and the options, including the base image and config files or scripts for the initial config. 

 

So, my point here is to know how to add the new provisioned device to NSO and then, NSO applies the 1-day config.

 

Is that possible? Does Cisco has technical documentation for doing that?

 

Thanks a lot

 

Regards

So the question that you have identified above is: How would NSO know that there is a new device to be managed? One way of doing that is for the device to send a notification to announce itself. That is what message 6a does in the diagram above. This could be a RESTCONF call to an NSO service, which then would add the device to CDB and then apply a day-1 config.

seavba
Level 1
Level 1

Thanks again @KJ Rossavik ,

 

You are right, my question was wrong. It was because I didn't know what was ZTP and how to add devices in NSO earlier . For this reason I was asking the way to run ZTP from NSO for Juniper devices. After understanding ZTP concepts, I was missing the RESTCONF API, but now I have all clear, I think.

 

Basically, the scenario must be a DNS and a File/Webserver , so when a now device is plug it in, ZTP applies image or config and then runs a script for calling to RESTCONF API with the proper yang file in order to add the device in NSO. After that, NSO will apply the day1 config.

 

I hope this works.

 

Thanks a lot

 

Sergio

 

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: