Thank You for sharing this.
Added some more for the DHCP Option on some of the CX switches.
### Begin Config for ISC DHCP Server dhcpd.conf #####
#############################
# Aruba CX ZTP provisions #
# #
#############################
#
https://www.arubanetworks.com/techdocs/AOS-CX/10.07/HTML/5200-7852/Content/Chp_ZTP/ztp-sup-aos-cx-10.htm##############################
option space ArubaCX;
option ArubaCX.config-file-name code 144 = text;
option ArubaCX.image-file-name code 145 = text;
option ArubaCX.CentralOnPrem-FQDN code 146 = text;
option ArubaCX-encapsulation code 43 = encapsulate ArubaCX;
#Class to Match Option 60
class "Vendor-Class" {
match option vendor-class-identifier;
}
subnet 10.202.0.0 netmask 255.255.255.0 {range 10.202.0.10 10.202.0.200;option routers 10.202.0.1;option subnet-mask 255.255.255.0;
#######################
#SubClass Definiions
#######################
##################
# To Get Vendor Class for Switch CLI command on switch:
# show dhcp client vendor-class-identifier
#################
# Aruba CX Lab OVA
subclass "Vendor-Class" "Aruba ABC123 ArubaOS" {
vendor-option-space ArubaCX;
option ArubaCX.config-file-name "CXLab.cfg";
option ArubaCX.image-file-name "filename.swi";
option tftp-server-name "172.18.20.51";
}
# Aruba 6200F 48 Port
subclass "Vendor-Class" "Aruba JL728A 6200F" {
vendor-option-space ArubaCX;
option ArubaCX.config-file-name "6200F-24Port.cfg";
option ArubaCX.image-file-name "ArubaOS-CX_6200_10_09_0002.swi";
option tftp-server-name "172.18.20.51";
}
# Aruba 6200F 24 Port
subclass "Vendor-Class" "Aruba JL725A 6200F" {
vendor-option-space ArubaCX;
option ArubaCX.config-file-name "6200F-48Port.cfg";
option ArubaCX.image-file-name "ArubaOS-CX_6200_10_09_0002.swi";
option tftp-server-name "172.18.20.51";
}
# Aruba 6300 48 Port
subclass "Vendor-Class" "Aruba JL659A 6300" {
vendor-option-space ArubaCX;
option ArubaCX.config-file-name "6300-48Port.cfg";
option ArubaCX.image-file-name "ArubaOS-CX_6300_10_09_0002.swi";
option tftp-server-name "172.18.20.51";
}
}
### End Config for ISC DHCP Server dhcpd.conf #####
Original Message:
Sent: Jan 26, 2018 03:34 AM
From: Oscar Bengtsson
Subject: Zero Touch Provisioning, image problems
Hello, found the solution. The DHCP sub-option 145 needs to be encapsulated inside DHCP option 43. Sub-option 144 can also be used to specify configuration file.
Here is the DHCP configuration file:
option space NEW_OP;
option NEW_OP.image-file-name code 145 = text;
option NEW_OP-encapsulation code 43 = encapsulate NEW_OP;
subnet 10.202.0.0 netmask 255.255.255.0 {
range 10.202.0.10 10.202.0.200;
option routers 10.202.0.1;
option subnet-mask 255.255.255.0;
option tftpserver "172.18.20.51";
subclass "vendor-class" "HP J9774A 2530-8G-PoEP Switch dslforum.org" {
option vendor-class-identifier "HP J9774A 2530-8G-PoEP Switchdslforum.org";
option NEW_OP.image-file-name "YA_16_04_0011.swi";