Managing Templates

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

VTS 2.1.5 supports Route templates.

Template management feature is supported in a non-VMM set up, that is not via OpenStack or VMware vCenter, but via Cisco VTS GUI. 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.

A route template is a template that lets you specify 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 configurations. When it is applied to a router, it overrides the route template that was inherited from the tenant.


Note


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 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 with the Static Route addition option selected by default.
    Step 3   Select the template type from the Template Type drop-down. By default, it is Route.
    Step 4   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 5   Enter a description for the template, in the Description field. This is optional.
    Step 6   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 7   Add Static Routes. See Adding Static Routes for details.
    Step 8   Add Route Targets. See Adding Route Targets for details.
    Step 9   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. To modify the static routes you have added to a template, you can use the edit option.


      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. You can add more static routes using the Edit option.


      Adding Route Targets


        Step 1   In the Template Management page, while you create or modify a template, click the Route Target tab.
        Step 2   Click +. The Add Route Target(s) pop-up appears.
        Note    You can add five route targets at a time. You can add more route targets using the Edit option.

        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 3   Specify whether route targets are to be imported or exported. To do this, select the desired value from the Direction drop-down.
        Step 4   Specify whether the route target should be imported / exported on leafs or DCI. Select one of the following from the Type drop-down:
        • Internal— To import / export on leafs.

        • External— To import / export on DCI.

        • Both

        The following table gives an example of route target configuration based on Type and Direction.

        Direction

        Type

        Internal

        External

        Both (Internal / External)

        Import

        Leaf

        route-target import 8001:8001

        route-target import 8001:8001 evpn

        DCI

        import route-target

        8001:8001

        DCI:

        export route-target

        8001:8001 stitching

        Leaf:

        route-target import 8001:8001

        route-target import 8001:8001 evpn

        Export

        Leaf

        route-target export 8001:8001

        route-target export 8001:8001 evpn

        DCI

        export route-target

        8001:8001

        DCI:

        import route-target

        8001:8001 stitching

        Leaf:

        route-target export 8001:8001

        route-target export 8001:8001 evpn

        • If Type is Internal and Direction is Import/Export—BGP-EVPN Route Targets are pushed to the leaf where router instances exist, based on the your choice of Direction (Import/Export). This can be used for route sharing/distribution using specific route-targets within the DC fabric.

        • If Type is External and Direction is Import/Export— WAN facing L3VPN Route Targets are pushed to DCI for routers which have external gateways attached, based on the your choice of Direction (Import/Export). This can be used for importing or exporting WAN side routes with specific route-targets and stitch it to the DC fabric.

        • If Type is Both and Direction is Import—BGP-EVPN Import Route Targets are pushed to the leaf where router instances exist. Fabric facing Stitching Route Targets are exported on the DCI for routers that have external gateways attached. This enables the user to stitch WAN side routes and redistribute it with specific route-targets towards the DC fabric side.

        • If Type is Both and Direction is Export—BGP-EVPN Export Route Targets are pushed to the leaf where router instances exist. Fabric facing Stitching Route Targets are imported on the DCI for routers that have external gateways attached. This enables you to export routes with specific route-targets from within the DC and stitch it to the WAN side.

        Step 5   Click Add.

        Editing Templates

        You can modify a template that you have created. You can edit the static route and route target details.


        Note


        While adding / deleting the static route and route target, it gets saved only when you click the Save button. Otherwise it just gets added to addition or deletion queue.



          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.
          Step 3   Make the desired changes, then click Save. If the template is already associated with a Tenant/Router, the new configuration will be pushed to the devices. See Creating Templatesfor details about creating template.

          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. Templates can be deleted only if they are not attached to a Tenant / Router.


              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 Route Template 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 desired template, then click Apply. If you want to create a new template and attach that, click Create New Template. See Creating Templates for details.
                Step 3   Click Save in the Add Tenant page.

                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 desired template, then click Apply. If you want to create a new template and attach that, click Create New Template. See Creating Templates for details.
                  Step 5   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   Click Detach Template .
                    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. See Creating Templatesfor details about how to create a new template. 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 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. See Creating Templatesfor details about how to create a new template. 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 6   Click Save after you complete editing the router details.