Zero Touch Provisioning on Juniper devices using Windows

In this article we will see how you can use Windows OS to perform ZTP on Juniper devices. There was a previous article, Zero Touch Provisioning on Juniper devices using Linux,  where we saw how ZTP works when Linux is used.

The principle of ZTP is the same one: the network device with no configuration gets an IP address from the DHCP server and few options are pushed from the DHCP server with the help of which the device will upgrade its software and install a predefined configuration.

Using Linux is very easy to use suboptions of option43. But it’s not that easy on Windows. We need suboptions to specify the image file, the config file, the transfer mode.

And this is what we are going to see here. How you can make use of suboptions on Windows.

Let’s recap what we know about options 43 and its suboptions:

Option43:
Suboption 00: image filename
Suboption 01: config filename
Suboption 03: transfer mode

We will use a tool to convert the image and config filenames and the transfer mode into something that is understood by the DHCP server where option43 will be configured.

So this is our network:

ZTP_WindowsOn the Windows server create a reservation to make sure that the device with a specific MAC address will get a specific IP address. The reservation name here is the S/N of the device:

reservation

Once the device is zeroized, it will get the IP address:

leased_ip

To add the option43, we need the tool that will convert the suboptions into something that the DHCP server can work with.
The tool is opt43builder and it’s available on multiple platforms.

We will run the tool like this on Windows:

 

C:\Users\Administrator\Downloads>opt43builder_windows_386.exe -options="0:jinstall-qfx-5-flex-14.1X53-D25.2-domestic-signed.tgz,1:QFX5100,3:ftp"

 

The output is the following one:

option43_generation

And we need to take the output for the section “Hex (Spaces)”:

 

Hex (Spaces): 00 35 6a 69 6e 73 74 61 6c 6c 2d 71 66 78 2d 35 2d 66 6c 65 78 2d
31 34 2e 31 58 35 33 2d 44 32 35 2e 32 2d 64 6f 6d 65 73 74 69 63 2d 73 69 67 6e
 65 64 2e 74 67 7a 01 07 51 46 58 35 31 30 30 03 03 66 74 70

 

This output will be used to configure option43 on the DHCP server.

Select option43 from the list of available options and then insert the string generated.

Unfortunately, there is no way to do copy-paste, so you need to be careful when you insert the string. The smallest mistake might cause the device that is under ZTP to be attempted to be upgraded to an unexisting software for instance.

option43

You should have the following options:

options

Once these options are configured, the device will get upgraded and configured as you need.

I hope you found this article useful and now you can perform ZTP using Windows servers as well.

 

 

 

References

  1. opt43builder

 

 

 

The following two tabs change content below.

Paris ARAU

Paris ARAU is a networking professional with strong background on routing and switching technologies. He is a holder of CCIE R&S and dual JNCIE(SP and ENT). The day to day work allows him to dive deeply in networking technologies. Part of the continuously training, he is focusing on Software Defined Network and cloud computing.

Comments

This post currently has 2 responses

  • Hi it is nice, but unfortunately I am able to Update my JUNOS OS but it does not push my config file. please help me

    • Hi,

      What do you mean it does not push the config file?

      How are you trying to upgrade Junos? Isn’t the config file preserved during upgrade?

      Or is it during ZTP?

      Thanks,
      Paris

Leave a Reply

Your email address will not be published. Required fields are marked *

Sidebar



%d bloggers like this: