Skip to main content
Cisco SD-WAN
Support
Product Documentation
Viptela Documentation

Use Variable Values in Configuration Templates

An overlay network might have multiple Viptela devices of the same type that have nearly identical configurations. This situation most commonly occurs with vEdge routers, when the routers located in multiple stores or branch locations provide identical services, but each individual router has its own hostname, IP address, GPS location, and other site-specific properties, such as BGP neighbors. This situation also occurs in a network with redundant controller devices, such as vSmart controllers, which must all be configured with identical policies, and vManage NMSs. Again, each controller has its own individual parameters, such as hostname and IP address.

To simplify the configuration process for these devices, you can create a single configuration template that contains both static configuration values and variable values. The static values are common across all the devices, and the variable values apply only to an individual device. You provide the actual values for the variables when you attach the individual device to the device configuration template.

You can configure a variable value for a parameter in a feature configuration template in two ways:

  • Select the parameter scope to be Device Specific—For an individual configuration parameter, select Device Specific to mark the parameter as a variable. Each variable must be identified by a unique text string, which is called a key. When you select Device Specific, an Enter Key box opens and displays the default key. You can use the default key, or you can change it by typing a new string and then moving the cursor out of the Enter Key box.
  • Mark a group of related parameters as optional—For some features in some feature configuration templates, you can mark the entire feature as optional. To do this, you click Mark as Optional Row in a section of a feature configuration template. The variable parameters are then grayed out, and you cannot configure values for them in the feature configuration template.

You enter the device-specific values for the variables when you attach the device to the configuration, in one of the following ways:

  • From a file—When you are attaching a template to a device, you load a file to the vManage NMS. This is an Excel file in CSV format that lists all the variables and defines the variable's value for each device.
  • Manually—When you attach a device template to a device, the vManage NMS prompts you for the values for each of device-specific parameters, and you type in the value for each parameter.

Use a File for Variable Parameters

To load device-specific variable values from a file, you create a template variables file. This is an Excel file in CSV format that lists all the variables in your devices' configurations and defines the values for each variable. You create this file offline and then import it into the vManage server when you attach a device configuration to one or more devices in the overlay network.

It is recommended that you create a template variables CSV file when your overlay network has more than a small number of vEdge routers.

CSV File Format

The CSV file is an Excel spreadsheet that contains one column for each variable required for a device's configuration. The header row contains the variable names (one variable per column), and each row after that corresponds to a device and defines the values of the variables for that device.

You can create a single spreadsheet for all devices in the overlay network—vEdge routers, vManage NMSs, vSmart controllers, and vBond orchestrators—or you can create one spreadsheet for each device type. The Viptela software determines the device type from its serial number.

In the spreadsheet, for each device type and for each individual device, you specify values only for the required variables. When you do not need to specify a value for a variable, simply leave that cell blank.

The first three columns in the spreadsheet must be the following and must be in the order listed below:

Column Column Heading Description
1 csv-deviceId Serial number of the device (used to uniquely identify the device). For vEdge routers, you receive the serial numbers in the vEdge authorized serial number file sent to you from Viptela. For other devices, the serial number is included in the signed certificate you receive from Symantec or from your root CA.
2 csv-deviceIP System IP address of the device (used to populate the system ip address command).
3 csv-host-name Hostname of the device (used to populate the system hostname command).

The headings for the remaining columns must be unique variable keys that are defined in the Enter Key box of a feature configuration template. These remaining columns can be in any order.

Generate a Skeleton CSV File

You can create a template variables CSV file manually, with the format described in the previous section, or you can have the vManage NMS generate a skeleton CSV file that contains all the required columns and column headings. This generated CSV file has one row for each Viptela device type, and it has the column headings for each of the variables required by all the feature templates included in the device configuration. The column heading text corresponds to the key string that identifies a device-specific parameter. Then you populate the rows with values for each variable.

To have the vManage NMS generate a skeleton CSV file:

  1. In vManage NMS, select the Configuration ► Templates screen.
  2. From the Templates title bar, select Feature.
  3. Click Add Template.
  4. Create the required feature templates for one vEdge router, one vSmart controller, one vManage NMS, and one vBond controller. For information about creating the feature templates, see the Device Configuration How-To articles.
    In each feature template:
    1. For fields that have default values, verify that you want to use that value for all devices. If you do not want to use the default, change the scope to Global or Device specific.
    2. For fields that apply to all devices, select the Global icon next to the field and set the desired global values.
    3. For fields that are device specific, select the Device-specific icon next to the field and leave the field blank.
  5. For each Viptela device type, create a device template. For information about creating device templates, see the Device Configuration How-To articles.
  6. In the Configuration ► Templates screen, click the Device tab.
  7. In the Template List table, select the desired device template.
  8. Click the More Actions icon to the right of the row and click Export CSV.
  9. Repeat Steps 7 and 8 for each device template.

Edit the exported CSV file, adding at a minimum the device serial number, device system IP address, and device hostname for each device in the overlay network. Then add values for desired device-specific variables for each device. Note that variable names cannot contain forward slashes (/) or backwards slashes (\).

If desired, you can combine the CSV files into a single file.

Import a CSV File

To use the device-specific variable values in the CSV file, import the file when you are attaching a device template to the Viptela device:

  1. In vManage NMS, select the Configuration ► Templates screen.
  2. From the Templates title bar, select Device.
  3. For the desired template, click the More Actions icon to the right of the row, and Select Attach Devices.
  4. In the Attach Devices popup, select the desired devices in the Available Devices box and click the arrow to move them to the Selected Devices box.
  5. Click Attach.
  6. Click the Up arrow on the right side of the screen. The Upload CSV File box displays.
  7. Choose the CSV file to upload, and click Upload.

During the attachment process, click Import file to load the Excel file. If vManage NMS detects duplicate system IP addresses for devices in the overlay network, it displays a warning message or a pop-up window. You must correct the system IP addresses to remove any duplicates before you can continue the process of attaching device templates to Viptela devices.

Manually Enter Values for Device-Specific Variables and for Optional Rows

For parameters in a feature template that you configure as device-specific, when you attach a device template to a device, the vManage NMS prompts you for the values to use for these parameters. Entering device-specific values in this manner is useful in test or POC networks, or if you are deploying a small network. This method generally does not scale well for larger networks.

For situations when the configuration for many devices is identical except for a few parameters, in the feature configuration template, you can specify that the parameter be an optional row in the configuration. By selecting optional row, the feature template automatically marks the parameters as device-specific, and these parameters are grayed out so that you cannot set them in the template. You do not have to individually mark the parameters as device specific. Then, when you attach a device template to a device, the vManage NMS prompts you for the values to use for these parameters. Using optional rows to enter device-specific values is useful when a group of many vEdge routers provide identical services at their branch or site, but individual routers have their own hostname, IP address, GPS location, and other site or store properties, such as BGP neighbors.

Optional rows are available for some parameters in some feature configuration templates. To treat a parameter or set of parameters as an optional row, click the Mark as Optional Row box. For these types of parameters, the feature configuration template has a table listing all the configured parameters. The Optional column indicates which are optional rows,

To manually enter values for device-specific variables or for variables in optional rows when you attach the template to a device:

  1. In vManage NMS, select the Configuration ► Templates screen.
  2. From the Templates title bar, click the Device tab.
  3. In the Template List, select the desired device template.
  4. Click the More Actions icon to the right of the row and click Attach Devices. The Attach Devices dialog box opens.
  5. In the Available Devices column on the left, select a group and search for one or more devices, select a device from the list, or click Select All.
  6. Click the arrow pointing right to move the device to the Selected Devices column on the right.
  7. Click Attach.
  8. In the Chassis Number List, select the desired device.
  9. Click the More Actions icon to the right of the row and click Edit Device Template. The Update Device Template dialog box opens.
  10. Enter values for the optional parameters. When you are using optional rows, if you do not want to include the parameter for the specific device, do not specify a value.
  11. Click Update.
  12. Click Next.
    If any devices have the same system IP address, a pop-up or an error message is displayed when you click Next. Modify the system IP addresses so that there are no duplicates, and click Save. Then click Next again.
  13. In the left pane, select the device. The right pane displays the device's configuration and the Config Preview tab in the upper right corner is selected.
    Click the Config Diff tab to preview the differences between this configuration and the configuration currently running on the device, if applicable.
    Click the Back button to edit the variable values entered in the previous screen.
  14. Click Configure Devices to push the configuration to the devices.
    The Status column displays whether the configuration was successfully pushed. Click the right angle bracket to the left of the row to display details of the push operation.

Release Information

Introduced in vManage NMS in Release 15.3.
In Release 15.4, add ability to export CSV file without having to first attach devices.
In Release 17.2, have vManage NMS check for duplicate system IP addresses.
In Release 18.2, add optional rows.

  • Was this article helpful?