Efficient network management is crucial for scaling and securing modern networks. Cisco Catalyst Center (formerly DNA Center) offers powerful tools for automating the deployment of device configurations using templates, composite templates, and Jinja2 scripting. In this guide, we will walk through creating and deploying templates, including interface configurations, NTP, SNMP, ACLs, and more, for Cisco IOS-XE and IOS devices. We'll also cover using CSV imports for bulk deployments, ensuring a best-practice approach.
Templates in Catalyst Center offer a standardized way to configure devices, making it easier to maintain consistency and reduce human error. Key benefits include:
Getting Started with Templates
Start by creating a basic template for common network settings like interface configurations, NTP servers, and SNMP settings. Here's a simple Jinja2 example for configuring an Ethernet interface:
interface
description
switchport mode access
switchport access vlan
spanning-tree portfast
no shutdown
Save this as Basic_Interface_Template in Catalyst Center.
To make the template reusable, add variables for key parameters. This allows you to dynamically configure interfaces based on device-specific data:
interface
description
ip address
no shutdown
Create a CSV file to import device-specific values for these variables. For example:
This file can be imported into the Catalyst Center template to quickly deploy configurations across multiple devices.
Composite templates allow you to group multiple smaller templates into a single, reusable package. This is ideal for deploying complete device configurations, including:
For composite templates, CSV imports can greatly simplify bulk deployments. To use CSV imports effectively:
Sample CSV for a composite template:
Tip: Depending on the Catalyst Center version, csv field requirements may differ. To create the correct csv, deploy the template to the point where the variables need to be provided (either through the GUI or csv import). Export the configuration parameters first which will provide a csv download with the required information needed. That csv can now be use as a base.
Using templates and composite templates in Catalyst Center can significantly reduce the time and effort required for network configuration. By leveraging Jinja2, CSV imports, and best practices, you can create scalable, secure, and automated network configurations that reduce operational complexity and improve consistency.
Happy Automating!
LookingPoint offers multiple IT services if you’re interested. Want more information, give us a call! Please reach out to us at sales@lookingpoint.com and we’ll be happy to help!