The objective of this article is to explain about the Plug and Play (PnP) configuration templates and how to use them.
Network PnP is a service that operates for Network PnP compatible devices so that the firmware and configuration can be centrally controlled, and zero-touch deployment of new network devices. When installed, a device enabled for Network PnP will identify the Network PnP server via one of the manual configurations, Dynamic Host Configuration Protocol (DHCP), Domain Name System (DNS), or the PnP Connect service. PnP Connect is a new service that acts as a discovery mechanism for a network device to discover its controller
A template for PnP configuration is similar to a regular device configuration, but it contains placeholders and associated metadata to allow the same configuration file to be used with multiple devices, while still allowing for unique parameters to be set on a device by device basis. When a PnP device is defined, appropriate values are specified for each of the placeholders. At the time the configuration is sent to the device, the placeholder values are merged with the configuration template to create the actual device configuration.
Configuration templates can be used when several devices have very similar configuration requirements, but there are a small number of parameters that need to be device specific. For instance, a network may use the same configuration for all switches, except that each switch has a unique hostname and management IP address. Configuration templates allow you to have a single configuration file with all the common configuration, with placeholders for the configuration elements that must be unique.
A configuration template has two sections – the configuration itself, and the metadata that controls how the placeholders are presented in the user interface when a device record is being created.
Configurations are created as Mustache templates which allows a variety of placeholders, referred to as tags in the Mustache documentation that includes:
Following is an example of a simple template:
!
hostname {{hostname}}
!
{{! Insert a list of VLANs}}
{{#vlans}}
interface vlan {{vlan-id}}
name {{vlan-name}}
!
{{/vlans}}
In this example, there are several different placeholders:
For more details on the Mustache syntax, consult the Mustache main page.
Currently PnP configuration templates are created following Mustache Template which is a ‘Logic-less templates’, so it does not allow for any if-then-else type structures.
You can upload both a configuration template that was generated from another system or obtained from the support community, and you can also upload raw device configuration files. If you upload a raw configuration file, it will automatically be converted to a template that just has no placeholders defined.
To upload a configuration template, please follow the below mentioned steps.
Login to the Cisco Business Dashboard using a User Name and Password. Click Login.
Navigate to Network Plug and Play >> Configurations, then click on the Upload icon.
On the Upload File page, fill the details for Organization, Name and Description. Using the Drag and drop file here or click to select from the filesystem option browse the file to be uploaded. Click Upload.
The suggested approach for creating configuration templates is to start by configuring an acceptable type of network system with the desired settings, then take backup of the device configuration and upload it to the manager to use as a starting point.
Alternatively, you may create a copy of an existing template using the ‘Copy As’ function.
Either way, starting from an existing configuration can help reduce the time it takes to create a template and also to reduce the number of revisions required to achieve the desired result.
When creating a new template, you will need to specify an organization that the template will belong to and the Product IDs (PIDs) that the template may be used with. The PIDs may contain a *'s and ?'s as wildcard characters.
Once you have your starting configuration created, you may update it using the following process:
Navigate to Network Plug and Play > Configurations, and then open your starting configuration in the template editor by clicking on the configuration name hyperlink.
The template editor is displayed with the initial configuration file displayed on the left in a text editor window. The text editor supports many common editing functions including search, replace, and several cursor manipulation key sequences. For a list of common editor functions and commands, refer to the Table at the end of this step.
Modify the configuration by inserting placeholders. Each time a new placeholder is inserted, a corresponding entry is added to the form on the right.
Functions | Description | Key Bindings | |
---|---|---|---|
PC | MAC | ||
Select All | Select the whole content of the editor | Ctrl-A | Cmd-A |
Kill Line | Deletes the part of the line after the cursor. If that consists only of whitespace, the newline at the end of the line is also deleted. |
Ctrl-K | |
Delete Line | Deletes the whole line under the cursor, including newline at the end | Ctrl-D | Cmd-D |
Undo | Undo the last change | Ctrl-Z | Cmd-Z |
Redo | Redo the last undone change | Ctrl-Y | Shift-Cmd-Z Cmd-Y |
Go Doc Start | Move the cursor to the start of the document | Ctrl-Home | Cmd-Up Cmd-Home |
Go Doc End | Move the cursor to the end of the document | Ctrl-End | Cmd-End Cmd-Down |
Go Line Start | Move the cursor to the start of the line | Alt-Left | Ctrl-A |
Go Line End | Move the cursor to the end of the line | Alt-Right | Ctrl-E |
Indent More | Indent the current line or selection | Ctrl-] | Cmd-] |
Indent Less | Outdent the current line or selection | Ctrl-[ | Cmd-[ |
Find | Ctrl-F | Cmd-F | |
Find Next | Ctrl-G | Cmd-G | |
Find Prev | Shift-Ctrl-G | Shift-Cmd-G | |
Replace | Shift-Ctrl-F | Cmd-Alt-F | |
Replace All | Shift-Ctrl-R | Shift-Cmd-Alt-F |
Modify the metadata associated with each placeholder using the form on the right to ensure that the placeholder is presented to the user in the most appropriate way.
(Optional) You may navigate to Actions > Preview to see how the form will be presented to the user when a device record is being created.
The preview page will open as follows…
Repeat steps 2 and 3 until you have created placeholders for all of the configuration parameters that should vary between devices.
Once the template has been completed to your satisfaction, click Save.
Every device registered to the Network PnP service is displayed on either the Enabled Devices page or the Unclaimed Devices page with a displayed status. This status may also be viewed on the Inventory page by enabling the display of the PnP Status column. The status field displays the device's current state and will include one of the values mentioned in the table below.
Table: Network Plug and Play – Device Status
Status | Description |
---|---|
PENDING | Device is defined but has not made contact with the service. |
PROVISIONING | The device has made the initial connection to the service. |
PROVISIONING_IMAGE | A firmware image is being applied by the device. |
PROVISIONED_IMAGE_REBOOTING | The device is rebooting to run the new firmware. |
PROVISIONED_IMAGE | New firmware has been applied successfully. |
PROVISIONING_CONFIG | A configuration file is being applied to the device. |
PROVISIONED_CONFIG | The configuration file has been successfully applied to the device. Depending on the type of device, it may reboot to apply the configuration. |
ERROR | An error has occurred. Check log files for more details. |
PROVISIONED | The provisioning process for the device is complete. |
By clicking on the status field, you can see more details, including history of the status changes for this device over time.
Once the values get updated on the device using the PnP configuration template it reflects on the device GUI as follows…
You are now familiar with how to configure the PnP template and use this feature available in Cisco Business Dashboard. You can now apply it with ease to optimize your Cisco Business Network.