{"id":1963,"date":"2023-12-20T22:06:11","date_gmt":"2023-12-20T20:06:11","guid":{"rendered":"http:\/\/192.168.1.213:8088\/?p=1963"},"modified":"2024-08-18T17:18:38","modified_gmt":"2024-08-18T15:18:38","slug":"deploying-custom-templates-with-ndfc","status":"publish","type":"post","link":"http:\/\/192.168.1.213:8088\/deploying-custom-templates-with-ndfc\/","title":{"rendered":"Deploying custom templates with NDFC"},"content":{"rendered":"\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t

\n\t\t\t\tTable of Contents\t\t\t<\/h4>\n\t\t\t\t\t\t\t
<\/i><\/div>\n\t\t\t\t
<\/i><\/div>\n\t\t\t\t\t<\/div>\n\t\t
\n\t\t\t
\n\t\t\t\t<\/i>\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t
Introduction<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

In the realm of network design and customization, the ability to adapt and tailor solutions to specific needs is crucial.<\/p>

I’m currently working on a BGP EVPN project leveraging Cisco’s Network Data Platform Fabric Controller (NDFC). The core challenge?<\/strong> The predefined fabric templates and other out-of-the-box solutions fall short of meeting all the unique optimizations our customers desire.<\/p>

This gap in capabilities has led us to explore the creation of custom templates. Custom templates stand as a vital solution for customization, allowing for precise adjustments and configurations that align with customer’s specific objectives.\u00a0<\/p>

In this blog post, you will explore the steps and strategies involved in deploying custom templates with NDFC, ensuring that even the customizations are met efficiently and effectively.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t
Creation of new custom templates<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

To address the customer’s requirement of tracking point-to-point links for effective troubleshooting, we need to create a new custom policy in NDFC.<\/p>

This policy will enable us to tag fabric interfaces used for point-to-point links, a functionality not automatically provided by NDFC as it does for loopback interfaces in the underlay.<\/p>

Let’s start with the creation of the new policy:<\/p>

Fabric > Operations > Templates<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\"\"\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

Actions > Create new template<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\"\"\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

We want to create a policy that is on the device level and has CLI config as content.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\"\"\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

To ensure the policy is reusable and user-friendly, we’ll integrate variables into the CLI commands. These variables will be presented as fields in a form, allowing the customer to effortlessly input parameters when assigning the policy to a device. The syntax is very easy to understand and adopt.\u00a0<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\"\"\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

Please make sure to set the right datatype for the variables!<\/p>

For more information about the possible template options, datatypes etc. , have a look at the guide from Cisco:<\/p>

https:\/\/www.cisco.com\/c\/dam\/en\/us\/td\/docs\/dcn\/ndfc\/1213\/articles\/ndfc-templates-lan\/templates-lan.pdf<\/a><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t##template variables\n\n@(DisplayName=\"Interface Name\", Description=\"Interfacename e.g Ethernet1\/1\")\nstring INTERFACE;\n\n@(DisplayName=\"IP address\", Description=\"Interface IP address e.g 10.1.1.1\/32\")\nstring INTERFACE_IP;\n\n@(DisplayName=\"TAG\", Description=\"Enter a tag e.g 98765\")\ninteger TAG;\n\n##\n##template content\n\ninterface $$INTERFACE$$\n  ip address $$INTERFACE_IP$$ tag $$TAG$$\n\n##<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-00e38f9 elementor-widget elementor-widget-heading\" data-id=\"00e38f9\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h5 class=\"elementor-heading-title elementor-size-default\">Deployment of new custom templates via UI<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c5a3496 elementor-widget__width-initial elementor-widget elementor-widget-text-editor\" data-id=\"c5a3496\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>After the creation of the template, it is time to assign the policy to a switch and deploy it. Select the switch and go to Policies. Next, go to Actions &gt; Add Policy<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-699f440 elementor-widget elementor-widget-image\" data-id=\"699f440\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_005.png\" data-elementor-open-lightbox=\"yes\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTk4MiwidXJsIjoiaHR0cDpcL1wvMTkyLjE2OC4xLjIxMzo4MDg4XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDIzXC8xMlwvZGVwbG95aW5nX2N1c3RvbV90ZW1wbGF0ZXNfd2l0aF9uZGZjXzAwNS5wbmcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"554\" src=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_005-1024x709.png\" class=\"attachment-large size-large wp-image-1982\" alt=\"\" srcset=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_005-1024x709.png 1024w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_005-300x208.png 300w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_005-768x532.png 768w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_005-1536x1064.png 1536w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_005.png 1671w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9ef63ef elementor-widget elementor-widget-text-editor\" data-id=\"9ef63ef\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Select the new created policy <strong>ADD_TAG_TO_INTERFACE<\/strong><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-40dc9a1 elementor-widget elementor-widget-image\" data-id=\"40dc9a1\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_006.png\" data-elementor-open-lightbox=\"yes\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTk4MywidXJsIjoiaHR0cDpcL1wvMTkyLjE2OC4xLjIxMzo4MDg4XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDIzXC8xMlwvZGVwbG95aW5nX2N1c3RvbV90ZW1wbGF0ZXNfd2l0aF9uZGZjXzAwNi5wbmcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"553\" src=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_006-1024x708.png\" class=\"attachment-large size-large wp-image-1983\" alt=\"\" srcset=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_006-1024x708.png 1024w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_006-300x207.png 300w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_006-768x531.png 768w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_006-1536x1061.png 1536w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_006.png 1673w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4fb1a25 elementor-widget elementor-widget-text-editor\" data-id=\"4fb1a25\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>It&#8217;s important to note that we want to override the existing config by adding the tag. Therefore, priority is crucial. In this case, a high priority means that the config will be deployed last. 500 is a good choice as most of the NDFC-generated config is between 10 &#8211; 450.<\/p><p>The next three important fields are the one that we defined in the template and these needs to be filled out.\u00a0<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-79e6b1a elementor-widget elementor-widget-image\" data-id=\"79e6b1a\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_007.png\" data-elementor-open-lightbox=\"yes\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTk4NCwidXJsIjoiaHR0cDpcL1wvMTkyLjE2OC4xLjIxMzo4MDg4XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDIzXC8xMlwvZGVwbG95aW5nX2N1c3RvbV90ZW1wbGF0ZXNfd2l0aF9uZGZjXzAwNy5wbmcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"555\" src=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_007-1024x711.png\" class=\"attachment-large size-large wp-image-1984\" alt=\"\" srcset=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_007-1024x711.png 1024w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_007-300x208.png 300w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_007-768x533.png 768w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_007-1536x1067.png 1536w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_007.png 1672w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8893481 elementor-widget elementor-widget-text-editor\" data-id=\"8893481\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Deploy the config via Actions &gt; Deploy<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7dd9da0 elementor-widget elementor-widget-image\" data-id=\"7dd9da0\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_008.png\" data-elementor-open-lightbox=\"yes\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTk4NSwidXJsIjoiaHR0cDpcL1wvMTkyLjE2OC4xLjIxMzo4MDg4XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDIzXC8xMlwvZGVwbG95aW5nX2N1c3RvbV90ZW1wbGF0ZXNfd2l0aF9uZGZjXzAwOC5wbmcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"554\" src=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_008-1024x709.png\" class=\"attachment-large size-large wp-image-1985\" alt=\"\" srcset=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_008-1024x709.png 1024w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_008-300x208.png 300w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_008-768x531.png 768w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_008-1536x1063.png 1536w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_008.png 1672w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4125225 elementor-widget elementor-widget-text-editor\" data-id=\"4125225\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Make sure that the changes are correct by reviewing the 9 changed lines.\u00a0<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-76ed80a elementor-widget elementor-widget-image\" data-id=\"76ed80a\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_009.png\" data-elementor-open-lightbox=\"yes\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTk4NiwidXJsIjoiaHR0cDpcL1wvMTkyLjE2OC4xLjIxMzo4MDg4XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDIzXC8xMlwvZGVwbG95aW5nX2N1c3RvbV90ZW1wbGF0ZXNfd2l0aF9uZGZjXzAwOS5wbmcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"555\" src=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_009-1024x710.png\" class=\"attachment-large size-large wp-image-1986\" alt=\"\" srcset=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_009-1024x710.png 1024w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_009-300x208.png 300w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_009-768x533.png 768w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_009-1536x1065.png 1536w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_009.png 1673w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ee9831f elementor-widget elementor-widget-text-editor\" data-id=\"ee9831f\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Here you can see that the order is crucial and is applied correctly. The IP address statement will be added at the end with the tag and will override the previous one.\u00a0<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-35557c1 elementor-widget elementor-widget-image\" data-id=\"35557c1\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_010.png\" data-elementor-open-lightbox=\"yes\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTk4NywidXJsIjoiaHR0cDpcL1wvMTkyLjE2OC4xLjIxMzo4MDg4XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDIzXC8xMlwvZGVwbG95aW5nX2N1c3RvbV90ZW1wbGF0ZXNfd2l0aF9uZGZjXzAxMC5wbmcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"552\" src=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_010-1024x707.png\" class=\"attachment-large size-large wp-image-1987\" alt=\"\" srcset=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_010-1024x707.png 1024w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_010-300x207.png 300w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_010-768x530.png 768w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_010-1536x1061.png 1536w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_010.png 1675w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0753159 elementor-widget elementor-widget-text-editor\" data-id=\"0753159\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Deploy the config. \ud83d\ude80<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c6e4d80 elementor-widget elementor-widget-image\" data-id=\"c6e4d80\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_011.png\" data-elementor-open-lightbox=\"yes\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTk4OCwidXJsIjoiaHR0cDpcL1wvMTkyLjE2OC4xLjIxMzo4MDg4XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDIzXC8xMlwvZGVwbG95aW5nX2N1c3RvbV90ZW1wbGF0ZXNfd2l0aF9uZGZjXzAxMS5wbmcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"555\" src=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_011-1024x711.png\" class=\"attachment-large size-large wp-image-1988\" alt=\"\" srcset=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_011-1024x711.png 1024w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_011-300x208.png 300w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_011-768x533.png 768w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_011-1536x1066.png 1536w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2023\/12\/deploying_custom_templates_with_ndfc_011.png 1668w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-44ca0dd elementor-widget elementor-widget-heading\" data-id=\"44ca0dd\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h5 class=\"elementor-heading-title elementor-size-default\">Deployment of new custom templates via Ansible<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-086d39c elementor-widget__width-initial elementor-widget elementor-widget-text-editor\" data-id=\"086d39c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>It&#8217;s not all about clicking and dragging in the UI world, right? \ud83d\ude1c<\/p><p>Here&#8217;s how we can use an Ansible module to deploy the template with variables:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c542471 elementor-widget__width-initial elementor-widget elementor-widget-code-highlight\" data-id=\"c542471\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"9-11\" class=\"highlight-height language-markup line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-markup\">\n\t\t\t\t\t<xmp>- name: Create policy including required variables\n  cisco.dcnm.dcnm_policy:\n    fabric: \"{{ ansible_fabric }}\"\n    config:\n      - name: ADD_TAG_TO_INTERFACE       # This must be a valid template name\n        create_additional_policy: false  # Do not create a policy if it already exists\n        priority: 500\n        policy_vars:\n          INTERFACE: Ethernet1\/1\n          INTERFACE_IP: 10.14.0.5\/30\n          TAG: 12345\n\n      - switch:\n          - ip: \"{{ ansible_switch }}\"\n<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-89c8a13 elementor-widget elementor-widget-text-editor\" data-id=\"89c8a13\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>You can find more documentation about the Ansible module on the following page:<\/p><p><a href=\"https:\/\/github.com\/CiscoDevNet\/ansible-dcnm\/blob\/main\/docs\/cisco.dcnm.dcnm_policy_module.rst\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/CiscoDevNet\/ansible-dcnm\/blob\/main\/docs\/cisco.dcnm.dcnm_policy_module.rst<\/a><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2289cb8 elementor-widget elementor-widget-heading\" data-id=\"2289cb8\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h5 class=\"elementor-heading-title elementor-size-default\">Deployment of new custom templates via API<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3f597dc elementor-widget__width-initial elementor-widget elementor-widget-text-editor\" data-id=\"3f597dc\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Do you like more API calls? No problem I have that ready as well:<\/p><p><span style=\"text-decoration: underline;\"><strong>POST<\/strong><\/span>: <strong>https:\/\/{{NDFC-IP}}\/appcenter\/cisco\/ndfc\/api\/v1\/lan-fabric\/rest\/control\/policies\/bulk-create<\/strong><\/p><p>JSON payload:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c71d4c4 elementor-widget__width-initial elementor-widget elementor-widget-code-highlight\" data-id=\"c71d4c4\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"3-5\" class=\"highlight-height language-markup line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-markup\">\n\t\t\t\t\t<xmp>{\n    \"nvPairs\": {\n        \"INTERFACE\": \"Ethernet1\/1\",\n        \"INTERFACE_IP\": \"10.14.0.5\/30\",\n        \"TAG\": \"12345\"\n    },\n    \"entityName\": \"SWITCH\",\n    \"entityType\": \"SWITCH\",\n    \"source\": \"\",\n    \"priority\": 500,\n    \"description\": \"\",\n    \"templateName\": \"ADD_TAG_TO_INTERFACE\",\n    \"serialNumber\": \"{{serialNumber}}\"\n}<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fa68d06 elementor-widget elementor-widget-heading\" data-id=\"fa68d06\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h5 class=\"elementor-heading-title elementor-size-default\">Conclusion<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2521ba3 elementor-widget__width-initial elementor-widget elementor-widget-text-editor\" data-id=\"2521ba3\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>In conclusion, navigating the intricate world of NDFC to tailor network configurations for specific needs can be both challenging and rewarding.<\/p><p>We&#8217;ve explored the importance of creating custom templates. By incorporating variables into CLI commands and utilizing forms for easy input, we&#8217;ve made these templates both reusable and user-friendly.<\/p><p>Diving into the Ansible playbook adds another layer of efficiency and customization, showcasing how automation can simplify complex tasks.\u00a0<\/p><p>Remember, the network world is not just about predefined paths; it&#8217;s about carving out your own route with the right tools and a dash of creativity.<\/p><p>Stay curious, keep experimenting, and never hesitate to tailor your approach to meet those unique network challenges! \ud83d\ude80\u00a0<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Table of Contents Introduction In the realm of network design and customization, the ability to adapt and tailor solutions to specific needs is crucial. I&#8217;m currently working on a BGP EVPN project leveraging Cisco&#8217;s Network Data Platform Fabric Controller (NDFC). The core challenge? The predefined fabric templates and other out-of-the-box solutions fall short of meeting [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1478,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[11,14,1],"tags":[],"class_list":["post-1963","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-automation","category-cisco-technologies","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/posts\/1963"}],"collection":[{"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/comments?post=1963"}],"version-history":[{"count":22,"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/posts\/1963\/revisions"}],"predecessor-version":[{"id":2005,"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/posts\/1963\/revisions\/2005"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/media\/1478"}],"wp:attachment":[{"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/media?parent=1963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/categories?post=1963"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/tags?post=1963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}