3-15
Cisco CRS-1 Series Carrier Routing System Getting Started Guide
Chapter 3 CLI Tips, Techniques, and Shortcuts
Wildcards, Templates, and Aliases
Applying Configuration Templates
To apply a template, enter the apply-template template-name [parameter] command in global
configuration mode.
The following command applies the template tmplt_1:
RP/0/RP0/CPU0:router(config)# apply-template tmplt_1
The following apply command applies the template bar with two arguments:
RP/0/RP0/CPU0:router(config)# apply-template bar (mibtwister %wd_default_mem.tcl)
Step 5
show running-config template template-name
Example:
RP/0/RP0/CPU0:router# show running-config
template tmplt_1
Displays the details of the template.
Step 6
Apply the template:
a. configure
b. apply-template template-name [parameter]
c. show running-config
Example:
RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# apply-template
tmplt_1
RP/0/RP0/CPU0:router(config)# commit
RP/0/RP0/CPU0:router(config)# show
running-config
...
template tmplt_1
interface POS0/2/0/4
ipv4 address 10.0.0.1 255.255.255.0
!
end-template
..
interface POS0/2/0/4
ipv4 address 10.0.0.1 255.255.255.0
!
RP/0/RP0/CPU0:router(config)# exit
Applies a defined template and its parameters to the running
configuration of the system.
• Type this command in global configuration mode.
• Only one template can by applied at a time.
• If the same template is applied multiple times, the most
recent application overwrites the previous ones.
• Provide the exact number of parameters for the
template.
• Templates are applied as a “best effort” operation: only
valid changes are committed. If any command in the
template fails, that command is discarded.
• To remove the template, use the no form of this
command.
Command or Action Purpose