Automatic ZTP upgrade

For most vendors it is possible to do a firmware upgrade at initial boot/ZTP so that every switch that is added to the network will have a certain baseline of firmware and features that you can use in templates.

Arista

For Arista devices this is accomplished by pointing the DHCP options to a simple script instead of a plain text config file.

This is an example dhcp-init-script for older style 32-bit only installations:

#!/usr/bin/Cli -p2
enable
copy http://<nms-ip>templates/eos/dhcp-init.j2 flash:startup-config
copy https://<front-ip>/firmware/EOS-stable.swi flash:EOS-stable.swi
config
boot system flash:EOS-stable.swi

This script should be saved as "eos/dhcp-init-script" in the templates repository. Make sure eos/dhcp-init.j2 in the script matches your plain text initial config file. For new installations with both 32/64bit there is a longer python script available in some template repositories, that script also needs to be updated with correct IP address before deploying on a new customer

After you commit and push this script, make sure that you restart the cnaas_nms-httpd container so that it will refresh the templates.

You will also need to create a symlink for "EOS-stable.swi" pointing to some EOS version of your preference in the cnaas_nms-httpd container:

docker exec -ti cnaas_nms-httpd-1 bash
cd /opt/cnaas/www/firmware/
ln -s EOS-4.32.5M.swi EOS-stable.swi
ln -s EOS64-4.32.5M.swi EOS64-stable.swi

Next you have to change in the dhcpd/dhcpd.conf file in the etc reposity, it should now point to dhcp-init-script instead of dhcp-init.j2:

  option bootfile-name "http://<nms-ip>/templates/eos/dhcp-init-script";

And remember to also restart the cnaas_dhcpd container after you commit and push so that it will use the new dhcpd.config file.

Cisco

Separate DHCP option?

Juniper

?

Contact us

Please contact info@sunet.se

  • No labels