cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2700
Views
10
Helpful
4
Replies

ZTP and Python - Downloading Configs

ehayric1320
Level 1
Level 1

Need to deploy hundreds of Cat 9300 switches and I am trying to automate configuration generation as well as configuration deployment. I am reading about ZTP (zero touch provision) for the config deployment. I am not interested in sending individual cli.configure commands through the Python script but would rather download an entire configuration from a TFTP server and then just load it into the startup configuration.

I have no idea what this Python script would look like or how each switch will know which config it needs to retrieve (they will be named by hostname most likely). Any suggestion or links would be greatly appreciated!

4 Replies 4

Francesco Molino
VIP Alumni
VIP Alumni
Hi

You can use Cisco APIC-EM (free) to push all configs on your switches.
Some references:
https://developer.cisco.com/site/network-plug-n-play/

https://community.cisco.com/t5/automation-and-analytics/apic-em-zero-touch-deployment-api-manual/td-p/3427616

https://www.cisco.com/c/en/us/td/docs/solutions/Enterprise/Plug-and-Play/software/guide/pnp_apic_em_config_guide_rel1_3_x/pnp_apic_em_config_guide_chapter_01.html

This part is to push all configs. Now to prepare them, you can use a Python script with Jinja library. This will build a full config you can import into startup.

It's not mandatory to user apic-em to push them but if you start with Python it could help.

For the Python and Jinja part, sure you got responses of you google it. It's not very difficult.

Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

Thank you very much. Yes I have already put something together using Ansible + JIinja for generating the configs.

So will the APIC-EM automatically hand out a device IP like ZTP? We first need to get the switches online and given an IP from our lab environment where the APIC-EM vm will be installed I guess.

Apic will need to know about serial Numbers and your devices will be connected to any port getting an io through a dhcp server with a dedicated option to let him know what is the ip of the apic-em server

Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

Leo Laohoo
Hall of Fame
Hall of Fame

Don't forget to look at CSCvo75523.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: