{"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
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 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 Actions > Create new template<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\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 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 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 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 > Add Policy<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t Select the new created policy ADD_TAG_TO_INTERFACE<\/strong><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t It’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 – 450.<\/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 Deploy the config via Actions > Deploy<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t 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 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 Deploy the config. \ud83d\ude80<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\tCreation 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
Deployment of new custom templates via UI<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t