Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Zero Touch Provisioning DHCP Options for Junos OS Evolved

With Zero Touch Provisioning (ZTP), you can provision Juniper Networks devices in your network automatically, with minimal manual intervention. You can use either the management interface (re0:mgmt-0 for all devices; additionally re0:mgmt-1 for PTX10003) or WAN interface ports, depending on your device, to connect to the network. You use a Dynamic Host Configuration Protocol (DHCP) server on the network to control provisioning. You configure DHCP options for provisioning in the DHCP configuration file [dhcpd.conf (for IPv4 addressing) or dhcpd6.conf (for IPv6 addressing).]

When you physically connect a device to the network and boot the device with a factory-default configuration, ZTP starts and detects that the device has a factory-default configuration. ZTP then uses the DHCP client on the device to request provisioning information from the DHCP server. The DHCP server reads the parameters from the DHCP configuration file and sends the provisioning information to the device. ZTP uses this information to install the configured version of the Junos OS Evolved software image and the configuration file. The configuration file installed can be either a Junos OS Evolved configuration file or a script. With scripts, you can create device-specific configuration files and perform HTTP request operations to web servers to download specific configuration files or software images. After a reboot, ZTP applies the configuration to the device. You can monitor progress by issuing the show system ztp operational mode command.

DHCP option parameters are used in priority order if the same parameter is specified in two places in the DHCP configuration file.

IPv4 DHCP Options

The base DHCP packet contains the IPv4 address of the management or WAN interface.

For DHCP option 43 (vendor-specific options), you can configure the following parameters in the DHCP configuration file (dhcpd.conf) on the DHCP server:

  • image-file-name (Junos OS Evolved software package name)
  • configuration-file-name (Junos OS Evolved configuration file name)
  • image-file-type (symbolic link)
  • transfer-type (for example, FTP, HTTP, HTTPS, TFTP)
  • ftp-ip (IP address of the FTP server)
  • alt-image (If you do not configure the image-file-name parameter, ZTP uses the file name specified for the alt-image parameter. )

DHCP options sent by ZTP to the DHCP server, which are derived from the hardware information encoded on the device:

  • Option 60 (vendor class identifier)—make-serial_num-sw_version (For example, Juniper-serial-number-software-version; uses the character - as a delimiter.)
  • Option 61 (DHCP client identifier)—serial number
  • Option 77 (user class)—make:model:serial_number (For example, Juniper:qfx5220-128c-serial-number; uses the character : as a delimiter.)

DHCP options received from the DHCP server, which you configure in the DHCP configuration file (dhcpd.conf) on the DHCP server:

  • Option 1—subnet mask
  • Option 3—device's subnet address
  • Option 7—log server
  • Option 12—host name
  • Option 42—NTP server arguments
  • Option 150—FTP server IP address
  • Option 66—TFTP server or FTP server IP address
  • Option 67—URL for the bootfile name

Order of Priority for Configuration and Script Management

In general, for configuring location, port, and transfer method, option 67 is primary and option 43 is secondary, except if the transfer type is HTTP. If the transfer type is HTTP, the port chosen for HTTP is configured from the information specified with option 43. If option 43 does not specify an HTTP port, the port is configured from the information specified with option 67.

Management Interface Address Configuration

The management interface address is configured based on the value for ip_address in the DHCP packet. The management interface address can be configured as one of the following:

  • A fixed address for a device in the device-specific configuration, matched on the device's MAC address.
  • An address from the specified subnet pool specified by the range parameter.

Order of Priority for Transfer Address

ZTP prefers to choose the transfer address from option 150. If not specified in option 150, ZTP chooses the address specified in option 66 instead. If not specified in either of these options, ZTP chooses the address specified for the ftp-ip parameter in option 43.

Order of Priority for Transfer Type

ZTP prefers to choose the transfer type from option 43. If not specified in option 43, ZTP uses the transfer type in option 67.

Order of Priority for Port Number

ZTP uses the HTTP or HTTPS port number from the option 43 image-file-name parameter for the image type and from the alt-image-file-name parameter for the alternate image type. For the configuration-file-name parameter, ZTP prefers to read the port number from the configuration file argument in option 43. However, if not specified in option 43, ZTP reads the port number from the image URL in option 67.

IPv6 DHCP Options

The base DHCP packet contains both the IPv6 address of the management or WAN interface and the IPv6 prefix length.

For DHCP option 17 (vendor-specific options), you can configure the following parameters in the DHCP configuration file (dhcpd6.conf) on the DHCP server:

  • image-file (Junos OS Evolved software package name, URL, or path)
  • configuration-file (Junos OS Evolved configuration file name, URL, or path)
  • image-file-type (symbolic link)
  • transfer-type (for example, FTP, HTTP, HTTPS, TFTP)
  • alt-image (If you do not configure the image-file-name parameter, ZTP uses the file name specified for the alt-image parameter. )
  • port-number (configuration port number)

DHCP options sent by ZTP to the DHCP server, which are derived from the hardware information encoded on the device: dhcp6.vendor-class-identifier (For example, Juniper:platform_type:serial_num:sw_version; uses the character : as a delimiter.)

DHCP options received from the DHCP server, which you configure in the DHCP configuration file (dhcpd6.conf) on the DHCP server:

  • Option 59—bootfile-url parameter. This parameter can be configured in one of two formats:
    • <TransferMode>://<FTP Server IP>.<PortNumber>/<ImagePath/ConfigPath/ScriptPath>
    • <TransferMode>://<FTP Server IP>
  • IPv6 address—IP6ADDR
  • IPv6 prefix length—IP6PREFIXLEN

Order of Priority for Configuration and Script Management

ZTP prefers to use the fully-formed URL specified in option 17; otherwise it uses the other configuration and script parameters specified in option 17. If these parameters are not specified in option 17, ZTP uses the URL specified in option 59.

Management Interface Address Configuration

The management interface address is configured based on the value for ip6_address in the DHCP packet.

Order of Priority for Transfer Address

ZTP prefers to use the vendor-specific URL from option 17. If not specified in option 17, ZTP uses the URL specified with the bootfile-url parameter in option 59.

Order of Priority for Transfer Type

ZTP prefers to use the transfer type from option 17, If not specified there, ZTP uses the transfer type from the argument for the bootfile-url parameter in option 59.

Order of Priority for Port Number

ZTP prefers to read the port number from the portnum parameter in option 17. If not specified there, ZTP uses the port number from the argument for the bootfile-url parameter in option 59.