Chapter 5
CLI Tips, Techniques, and Shortcuts
DETAILED STEPS
Command or Action
Step 1
configure
Example:
Router# configure
Step 2
template template-name
] [
$parameter...)
Example:
RP/0/0/CPU0:router(config)# template tmplt_1
Step 3
Enter the template commands.
Example:
RP/0/0/CPU0:router(config-TPL)# hostname test
Step 4
end-template
Example:
RP/0/0/CPU0:router(config-TPL)# end-template
Step 5
commit
Example:
RP/0/0/CPU0:router(config-TPL)# commit
Step 6
show running-config template template-name
Example:
RP/0/0/CPU0:router# show running-config
template tmplt_1
OL-24755-01
[
($parameter
]
config-commands
Purpose
Enters global configuration mode.
Enters template configuration mode and creates a template.
•
template-name—Unique name for the template to be
applied to the running configuration.
(Optional) parameter—Actual values of the variables
•
specified in the template definition. Up to five
parameters can be specified within parentheses. Each
parameter must begin with the $ character. Templates
can be created with or without parameters.
•
(Optional) config-commands—Global configuration
commands to be added to the template definition. Any
name in a command (such as the server name, group
name, and so on) can be parameterized. This means that
those parameters can be used in the template commands
(starting with $) and replaced with real arguments when
applied.
•
To remove the template, use the no form of this
command.
Defines the template commands.
Ends the template definition session and exits template
configuration mode.
When you end the template session, you are returned to
•
global configuration mode.
Applies the target configuration commands to the running
configuration.
Displays the details of the template.
Cisco IOS XR Getting Started Guide for the Cisco XR 12000 Series Router
Wildcards, Templates, and Aliases
5-111