03-09-2022 01:18 AM
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
Solved! Go to Solution.
03-09-2022 05:56 AM
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.
03-09-2022 05:10 AM
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".
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.
03-09-2022 05:23 AM
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
03-09-2022 05:56 AM
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.
03-28-2022 01:30 AM - edited 03-28-2022 01:30 AM
Hi,
Maybe you can give it a try with the help of these two articles :
https://www.linkedin.com/pulse/ztp-juniper-networks-srx300-device-using-dhcp-vendor-specific-rouzet/
Regards,
Jerems
03-09-2022 06:26 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide