Managing Templates

A template is a container of configurations, which can be applied to a target such as a router.

Cisco VTS supports the following template types:
  • Route templates—A route template is a template that lets you configure static routes and route targets. This template can be applied to a tenant or a router. When it is applied to a tenant, all the routers within that tenant inherit the static route and route target configuration. When it is applied to a router, it overrides the route template that was inherited from the tenant. It is supported in a set up that has only Cisco ASR 9000 Series Aggregation Services Routers as DCI.

    Only integrated DCI mode is supported. VRF-peering mode is not supported.

  • L3 Service Extension templates—An L3 Service Extension template allows you to extend Cisco VTS Layer 3 service configuration on routers or tenants.

    The configuration you define in the service extension template, along with the out-of-the-box Cisco VTS L3 configuration, will be pushed to the device to get the combined configuration on the device. Service extension templates do not allow you to configure any parameter that Cisco VTS configures out-of-the-box.

    Multiple L3 Service Extension templates can be attached to a tenant or router. The admin has to ensure that the templates do not have conflicting configuration.

    Currently, L3 Service Extension templates are applicable only for Cisco Nexus 9000 series devices.

The template is stored in the Cisco VTS database, and can be used with multiple routers or tenants. You can either associate the template while you create the router or tenant. Or associate a template to a tenant or router you have already created, while you edit the tenant or router.

When you detach the template from the tenant, it cleans up the configuration on the device.


Note


For route templates, you can have only one instance of a template type per tenant/router. For example, let the template types be Temp A and Temp B, and the instance of Temp A be Ins A and that of Temp B be Ins B. Now, Ins A and Ins B can be applied to a tenant/router. However, Ins A and Ins A’, where Ins A’ is a second instance of Temp A, cannot be applied at the same time on the tenant/router.


The following sections provide more details about working with templates:

Creating Route Templates

To create templates:


    Step 1   Go to Templates > Template Management. The Templates / Template Management page appears.
    Step 2   Click +. The New Template page appears.
    Step 3   Enter a name for the template in the Template Name field. Only alphabets, numbers, and special characters ., _ and - are allowed. The maximum character limit is 128.
    Step 4   Enter a description for the template, in the Description field. This is optional.
    Step 5   Select the template type from the Template Type. For route templates, select Route.
    Step 6   Click Add Configuration. The New Template page appears.
    Step 7   Enter a route target seed. This can be an integer value in the range of 1-16777215. Route Target with seed is pushed to DCI, and Leaf if eBGP is enabled.
    Step 8   Enable or Disable the Auto Route Target option. By default, it is enabled. See Disabling Auto Route Target Configuration for details.
    Step 9   Add Static Routes. See Adding Static Routes for details.
    Step 10   Add Route Targets. See Adding Route Targets for details.
    Step 11   Click Save. The template is saved and listed in the Template Management page.

    Adding Static Routes

    You can add static routes to a template while you create the template.


      Step 1   In the Template Management page, while you create or modify a template, click the Static Route tab.
      Step 2   Click +. The Add Static Route(s) pop-up appears.
      Step 3   Add a Destination IP address and netmask.
      Step 4   Add the Next Hop IP address and netmask. Netmask is optional.
      Step 5   Click Add. The static routes get added to the template.

      You can add five static routes at a time.


      Adding Route Targets

      You can add route targets to be imported / exported to the leafs or DCI.

      Adding Fabric Internal Route Targets

      To add Fabric Internal route targets:
         Command or ActionPurpose
        Step 1Click Fabric Internal RT tab.    
        Step 2If you want to use system defined RT, choose Auto RT- System Defined from the dropdown. Else, choose Auto RT - Custom. You must add at least four custom route targets.    
        Step 3Click +. The Add Route Target(s) pop-up appears.  
        Note    You can add five route targets at a time.

        Enter the route targets to be shared across the different VRFs. The valid route target formats are:

        • ASN2:NN4

        • ASN4:NN2

        • IPv4:NN2

        Where:
        • NN2 and ASN2 has a range of 1-65535

        • NN4 and ASN4 has a range of 1-4294967295

        • IPv4 is an IPv4 address in the dotted decimal format

         
        Step 4Specify whether route targets are to be imported or exported. To do this, select the desired value from the Direction drop-down.    
        Step 5Specify following from the Type drop-down:  
        • Internal— To import / export on leafs.

        • Stitching— To import / export on DCI.

         
        Step 6Click Add. You can add five route target at once.    

        Adding Fabric External Route Targets

        To add Fabric Eternal route targets to import /export route targets to the DCI:

           Command or ActionPurpose
          Step 1Click Fabric External RT tab.    
          Step 2If you want to use system defined RT, choose Auto RT- System Defined from the dropdown. Else, choose Auto RT - Custom. You must add at least two custom route targets.    
          Step 3Click +. The Add Route Target(s) pop-up appears.  
          Note    You can add five route targets at a time.

          Enter the route targets to be shared across the different VRFs. The valid route target formats are:

          • ASN2:NN4

          • ASN4:NN2

          • IPv4:NN2

          Where:
          • NN2 and ASN2 has a range of 1-65535

          • NN4 and ASN4 has a range of 1-4294967295

          • IPv4 is an IPv4 address in the dotted decimal format

           
          Step 4Specify whether route targets are to be imported or exported. To do this, select the desired value from the Direction drop-down.  

          The type will be Fabric External, by default

           
          Step 5Click Add.    

          Disabling Auto Route Target Configuration

          To enable or disable automatic route target configuration, use the Auto Route Target toggle switch in the New Template screen while you create route templates. By default, Auto Route Target (RT) is enabled. When this is enabled, Cisco VTS adds route target configurations automatically, in addition to any static / manual route targets you have defined in route template, while the template configuration is pushed to the VTEPS.
          If you choose to disable Auto Route Target, ensure that:
          1. At least one import route target and one export route target are defined for internal devices (that is, for leaf switches controlled by Cisco VTS) in the same route template where auto RT gets disabled.
          2. When a DCI is present in Admin Domain, and you choose to disable Auto Route Target, ensure that:
            • At least one import route target and one export route target are defined for external devices.

            • At least one import route target and one export route target are defined for "both".

          This is to make sure that when auto RT is disabled, the static route targets defined in the template (which will then be pushed to the DCI) are sufficient to enable the DCI to communicate with the TORs properly.

          Whenever you enable Auto Route Target again the route targets created using the route target seed (if provided) or ASN# will be pushed to devices. In addition, the RT seed textbox will be enabled again.

          Creating L3 Extension Templates

          To create L3 Extension templates:


            Step 1   Go to Templates > Template Management. The Templates / Template Management page appears.
            Step 2   Click +. The New Template page appears
            Step 3   Enter a name for the template in the Template Name field. Only alphabets, numbers, and special characters ., _ and - are allowed. The maximum character limit is 128.
            Step 4   Enter a description for the template, in the Description field. This is optional.
            Step 5   Choose L3 Extension as the template type.
            Step 6   Choose the Device Platform. Currently only Cisco Nexus 9000 Series devices are supported.
            Step 7   Click Add Configuration to add configuration to the template. The Author Template window appears.
            Step 8   Click Configuration icon to get the Add Configuration menu. The flyout menu displays all the configuration options that are available at the root level. You can search for the desired configuration in the Search field.
            Note   

            Configuration options available are limited to configuration that Cisco VTS does not provide out of the box. The User Interface(UI) is schema driven and shows the configuration tree based on the device platform selected and the service extension template type, for example, L3 Service Extension Template.

            Step 9   Choose the desired configuration. The configuration you chose gets added as a child node in the Config tree, on the left pane.

            You may add further configuration to the node that you have added by clicking the Configuration icon. If you want to delete the configuration, click the delete (X) icon.

            For configuration items which can take multiple instances, the Add Instance button appears in the authoring pane. You can add an instance by clicking Add Instance. Click Add after you add the configuration for the instance.

            Note   

            For certain configurations, some of the options that are available for selection have the %v suffix (for example, %vVRF_NAME %vTENANT_NAME, when you choose config > vrf > context and add a new instance). The %v suffix denotes that it is a system variable. If you select a system variable, the value will be resolved in the template when the template is attached to the router. Tenant name, VRF name, and VLAN ID are the supported system variables.

            Step 10   Click Save Template.

            The template gets added to the Template Management screen. You can click on the template to get a summary of the template, in the Template Summary page. You can expand the Config node to view the template configuration. You can edit the template from the Summary screen, by clicking Edit Template Config.


            Editing Templates

            You can modify a template that you have created.


              Step 1   Go to Templates > Template Management. The Templates / Template Management page lists all the templates you have created.
              Step 2   Select the check box corresponding to the template you need to edit, and click the edit icon.
              Note   

              You can also edit a template from the Template Summary screen. Click Edit Template Config button to edit a template.

              Based on the template type, the edit template page is displayed. For a Route template, the edit page for that route template is displayed. For a L3 Service Extension templates, the Edit Template page is displayed. You may change the Template Description, if required. Then click Edit Configuration to modify the service extension configuration.
              Step 3   Make the desired changes, then click Save.

              Copying a Template

              You can copy a template and save it with a different name. You can also modify the parameters while you copy.


                Step 1   Go to Templates > Template Management. The Templates / Template Management page lists all the templates you have created.
                Step 2   Select the check box corresponding to the template you need to copy, and click the copy icon.
                Step 3   Modify the details if required, then click Save.

                Deleting Templates

                You can delete a template that you have created.

                Note


                You can delete a template only if it is not attached to either a tenant or router. If it is attached to a tenant or router, an error is displayed when you try to delete. You need to detach the template from tenant or router before deleting the template.

                  Step 1   Go to Templates > Template Management. The Templates / Template Management page lists all the templates you have created.
                  Step 2   Select the check box corresponding to the template you need to delete, and click the X.

                  The Delete pop-up appears.

                  Step 3   Click Delete to delete the template.

                  Attaching Templates to Tenants

                  You can attach template to tenants when you create or edit tenants.

                  Attaching Template while Adding Tenants

                  You can attach templates to a Tenant while you add a tenant.


                    Step 1   When you are adding a new tenant, click the find icon in the Template field. The Select Template pop-up appears.
                    Step 2   Select the template type, then select the desired template. If you want to create a new template and attach that, click Create New Template.
                    Step 3   Click Select Devices(s) to select the devices.
                    Step 4   Click Apply Template(s).
                    Step 5   Click Save.

                    Attaching Template while Editing a Tenant

                    You can also modify an existing tenant to attach a template.

                      Step 1   Go to Tenants > Tenant Management. The Tenants / Tenant Management page lists all the tenants you have created.
                      Step 2   Select the check box corresponding to the tenant you need to modify, then click the edit icon.
                      Step 3   Click the find icon in the Template field. The Select Template pop-up appears.
                      Step 4   Select the template type from the Template Type drop down list.

                      If you want to create a new template and attach that, click Create New Template.

                      Step 5   Select the desired template. Then click Select Device(s), to select the devices.
                      Step 6   From the Select Device(s) popup window, select the devices, then click Apply Template(s)..
                      Step 7   Click Save in the Edit Tenant page.

                      Detaching Template from Tenants

                      You can detach a template that you had attached to a Tenant. When you detach a template from a tenant, all the template configuration is removed from the routers that inherited the template.

                      To detach the template:


                        Step 1   Go to Tenants > Tenant Management. The Tenants / Tenant Management page lists all tenants.
                        Step 2   Select the tenant from which you want to detach the template, then click the Edit icon.
                        Step 3   Click the Find icon in the Templates field. The Select Template popup is displayed.
                        Step 4   Check the check box.
                        Step 5   Click Save.

                        Attaching Templates to Routers

                        You can attach templates to routers while adding a router or while modifying an existing router. By default, router inherits the template from the tenant. You can override an inherited template while you create or modify a router, by selecting a different template, or creating a new template and attaching to the router.


                        Note


                        The configuration is pushed to the device only when Port Attach is done. If a router is created and template is applied to the tenant or router, but port is not attached, then the template configuration is not pushed. See Creating a Network using Cisco VTS GUI for details about attaching port.

                        Attaching Templates while Adding Routers

                        While you add the router, by default, the router inherits the template from the tenant. The template field displays <template name> (Inherited). You may inherit the template from the tenant or may chose to select a template of your choice.


                          Step 1   Click the Find icon in the Template selection box. The Select Template popup is displayed.
                          Step 2   Uncheck the Inherit from Tenant check box. The popup lists all the available templates.
                          Step 3   Select the desired template, then click Apply. The template gets applied to the router.

                          If you want to create a new template, click Create New Template. You will be redirected to the Templates > Template Management > New Template page. After you create the new template, you must select the new template from the Select Template pop up, as described in Step 2 and 3.

                          Step 4   Click Save after you complete the router creation procedure.

                          Attaching Template while Editing a Router

                          You can attach a template to a router while you edit a router.


                            Step 1   Go to Overlay > Router. The Overlay / Router page lists all the routers.
                            Step 2   Select the Router that you need to modify, then click the edit icon. The template field lists the template that the router has inherited from the tenant.
                            Step 3   Click the Find icon in the Template selection box. The Select Template popup is displayed.
                            Step 4   Uncheck the Inherit from Tenant check box. The popup lists all the available templates.
                            Step 5   Select the template type from the Template Type drop down list.
                            Step 6   Select the desired template, then click Select Device(s)

                            If you want to create a new template, click Create New Template. You will be redirected to the Templates > Template Management > New Template page. After you create the new template, you must select the new template from the Select Template pop up, as described in Step 2 and 3.

                            Step 7   From the Select Devices popup window, select the device(s) on which you want to apply the template, click Apply Template(s)..
                            Step 8   Click Save.