Legal Disclaimer: The resource assets in this website may include abbreviated and/or legacy terminology for HPE Aruba Networking products. See www.arubanetworks.com for current and complete HPE Aruba Networking product lines and names.
Configuring AOS-S Switches using Template Groups
Templates in Aruba Central refer to a set of configuration commands that can be used by the administrators for provisioning devices in a group. Configuration templates enable administrators to apply a set of configuration parameters simultaneously to multiple switches in a group and thus automate switch deployments.
To minimize configuration errors and troubleshoot device-specific configuration issues, Aruba recommends that the device administrators familiarize themselves with the CLI configuration commands available on AOS-S.
Creating a Group for Template-Based Configuration
For template-based provisioning, switches must be assigned to a group with template-based configuration method enabled.
For more information, see Managing Groups and Assign Devices to Groups.
Creating a Configuration Template
To create a configuration template for switches:
- In the Aruba Central app, set the filter to a template group.
The dashboard context for the group is displayed.
- Under , click > .
- Click the Config icon.
The tabs to configure switches using templates is displayed.
- Click the tab. The Templates page is displayed.
- Click to add a new template. The window is displayed.
- In the tab, enter a name for the template in the field.
- In the drop-down, select .
- Select the switch model and software version. You can specify any of the following combinations:
- for both and —To apply the template to all switch models and all supported switch software versions.
- for and a software version for —To apply the template to all switch models running the selected software version.
- for and a switch model for —To apply the template to a switch model and all software versions supported by the selected switch model.
- A switch model and a software version—To apply the template to a specific switch model and the software version. The template created for a switch model and a software version takes precedence over the template that is created for all platforms and versions.
- Select the manufacturing part number of the switch in the
- The drop-down is displayed only if you select a switch model in the drop-down.
- If you select a specific switch model and part number, you can apply the template to a standalone switch and not to a stack.
- If you select in the drop-down, or if you select a switch model and in the drop-down, you can apply a template to both a standalone switch and stack.
drop-down. - Click . The Template tab is displayed.
- Build a new template or import configuration information from a switch that is already provisioned in the template group.
- To build a new template, add the switch command information in the Important Points to Note.
To import configuration text from a switch that is already provisioned in the template group:
- Click .
- From the search box, select the switch from which you want to import the configuration. The imported configuration is displayed in the text box.
- If required, modify the configuration parameters. Ensure that the template text adheres to the guidelines listed in the Important Points to Note.
- Importing configuration from an existing device in the template group allows you to quickly create a basic template. However, before applying the template to other switches in the group, ensure that the template text is variabilized as per your deployment requirements. For more information on variable definitions, see Variable Files.
- All switch templates must include a password command to set a password for the device. The template cannot be saved without adding a password command. If the configuration that is pushed from Aruba Central to the device does not contain a password command, the configuration push is aborted for the device and a log is added to the audit trail. For example, if you add the password command in a condition block and the condition evaluates to false, the configuration that is pushed will not contain the password command. For more information, see Managing Password in Configuration Templates.
For more information about using password commands, see the Configuring Username and Password Security chapter in the AOS-S Switch Access Security Guide.
- To view the variables present in the imported configuration template, click
For more information on variables, see Variable Files.
. The Variables in Template column is displayed. - To download the variables as a CSV Comma-Separated Values. A file format that stores tabular data in the plain text format separated by commas. or plain text file, click the download icon and select one of the following options:
text box. Ensure that the template text adheres to the guidelines listed in the
- To build a new template, add the switch command information in the Important Points to Note.
- Click Aruba Central with the new configuration. . After you apply the configuration template, switches reboot and reconnect to
Important Points to Note
Note the following points when adding configuration text to a template:
- The CLI syntax in the switch template must be accurate. Aruba recommends that you validate the configuration syntax on the switch before adding it to the template text.
- Ensure that the command text indentation matches the indentation in the running configuration.
- The commands in the template are case-sensitive.
- Ensure that the sequence of commands in the template matches the sequence in the running configuration.
- Use the maximize icon to enter full screen mode while adding or editing configuration text to a template. You can exist the full screen mode either by using the minimize icon or by pressing esc key on the keyboard.
When configuring a password, you must add the include-credentials
command in the template. This command stores the password in the file associated with the switch. Aruba Central automatically executes this command while reading the switch configuration.
The following example illustrates the case discrepancies that the users must avoid in the template text:
trunk E1-E4 trk1 trunk
interface Trk1
dhcp-snooping trust
exit
trunk E1-E4 trk1 trunk
switch-interconnect trk1
trunk E5-E6 trk2 trunk
vlan Virtual Local Area Network. In computer networking, a single Layer 2 network may be partitioned to create multiple distinct broadcast domains, which are mutually isolated so that packets can only pass between them through one or more routers; such a domain is referred to as a Virtual Local Area Network, Virtual LAN, or VLAN. 5
name "VLAN5"
untagged Trk2
tagged Trk1
isolate-list Trk1
ip igmp forcedfastleave Trk1
ip igmp blocked Trk1
ip igmp forward Trk1
forbid Trk1
loop-protect Trk2
trunk E1-E4 trk1 trunk
trunk E4-E5 trk2 trunk
spanning-tree Trk1 priority 4
spanning-tree Trk2 admin-edge-port
trunk A2-A4 trk1 trunk
igmp fastlearn Trk1
trunk E4-E5 trk2 trunk
ip source-binding 2 4.5.6.7 b05ada-96a4a0 Trk2
[no] ip source-binding trap OutOfResources
snmp-server mib Management Information Base. A hierarchical database used by SNMP to manage the devices being monitored. hpSwitchAuthMIB ..
snmp-server mib hpicfMACsec unsecured-access ..
[no] lldp config <P-PORT-LIST> dot1TlvEnable ..
[no] lldp config <P-PORT-LIST> medTlvEnable ..
no lldp config <P-PORT-LIST> medPortLocation..
[no] lldp config <P-PORT-LIST> dot3TlvEnable ..
[no] lldp config <P-PORT-LIST> basicTlvEnable ..
[no] lldp config <P-PORT-LIST> ipAddrEnable <lldp-ip>
trunk-load-balance L4-based
trunk-load-balance L3-based
Best Practices
Aruba recommends you to follow the below steps to use configuration templates in managing switches:
- Configure the switch.
- Add the switch to Aruba Central.
- Create the template. You can use option to import an existing template created for switches.
- Modify the template based on the user requirement. For example, addition or removal of variables.
- Save the edited template.