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

ZTP and Python - Downloading Configs

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!

Everyone's tags (2)
4 REPLIES 4
VIP Advisor

Re: ZTP and Python - Downloading Configs

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
Beginner

Re: ZTP and Python - Downloading Configs

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.

Highlighted
VIP Advisor

Re: ZTP and Python - Downloading Configs

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
Hall of Fame Community Legend

Re: ZTP and Python - Downloading Configs

Don't forget to look at CSCvo75523.

Everyone's tags (1)
Content for Community-Ad
July's Community Spotlight Awards