When using ZTP, the DHCP option has a length limitation. When the total length is over this limitation, the ZTP will fail.
On the EX3200 and EX3300 platforms, when you process ZTP, if the length of the config-file-name or image-file-name option is greater than 256 characters, then the AIU will fail.
option ztp-server code 150 = ip-address; option JUNOS-ZTP.image-file-name code 0 = text; option JUNOS-ZTP.config-file-name code 1 = text; option JUNOS-ZTP.image-file-type code 2 = text; option JUNOS-ZTP.transfer-mode code 3 = text; option JUNOS-ZTP.alt,g-image-file-name code 4 = text; option JUNOS-ZTP.jloader-file code 5 = text; option JUNOS-ZTP-encap code 43 = encapsulate JUNOS-ZTP; subnet x.x.x.x netmask 255.255.255.0 { option routers x.x.x.x; option subnet-mask 255.255.255.0; option ztp-server x.x.x.x; option JUNOS-ZTP.transfer-mode "http"; option JUNOS-ZTP.image-file-type "symlink"; pool { range x.x.x.x y.y.y.y; } host juniper123 { hardware ethernet x:x:x:x:x:x; option JUNOS-ZTP.config-file-name "path for config-file"; <----- option JUNOS-ZTP.image-file-name "path for image file"; <----- }
"/bin/sh /usr/sbin/image_load -G 10.0.0.102 -I me0 -O install_reboot -D /var/tmp -C /tftpboot/aaa.conf -E symlink -F /tftpboot/jinstall-ex-3200-12.3R9-domestic-signed.tgz -T tftp"
"/bin/sh /usr/sbin/image_load -G 10.0.0.102 -I me0 -O install_reboot -D /var/tmp -C /tftpboot/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.conf -E symlink -F /tftpboot/jinstall-ex-3200-12.3R9-domestic-s"
The total length of AIU cannot be over 256 bytes; otherwise, the ZTP will fail.
In Junos EX3200 or EX3300 platform on version 12.3, the maximum length of AIU is 256, including option 150, option 43, source interface, and some fix bytes. If the total length is over 256, it will be cut off and the ZTP will fail.
"/bin/sh /usr/sbin/image_load -G" " -I " " -O install_reboot -D /var/tmp -C " " -E " " -F "
Use a shorter filename for the config-file-name or image-file-name options.