16-9
Software Configuration Guide—Release 15.0(2)SG
OL-23818-01
Chapter 16 Configuring SmartPort Macros Configuring SmartPort Macros
Applying SmartPort Macros
To apply a SmartPort macro, perform this task:
Command Purpose
Step 1 Switch# configure terminal Enters global configuration mode.
Step 2 Switch(config)# macro global {apply |
trace} macro-name [parameter {value}]
[parameter {value}] [parameter
{value}]
Applies each individual command defined in the macro to the switch by
entering macro global apply macro-name. Specify macr o global trace
macro-name to apply and debug a macro to find any syntax or
configuration errors.
(Optional) Specify unique parameter values that are specific to the
switch. You can enter up to three keyword-value pairs. Parameter
keyword matching is case sensitive. All matching occurrences of the
keyword are replaced with the corresponding value.
Some macros might contain keywords that require a parameter value.
Use the macro global apply macro-name ? command to display a list
of any required values in the macro. If you apply a macro without
entering the keyword values, the commands are invalid and are not
applied.
Step 3 Switch(config)# macro global
description text (Optional) Enters a description about the macro that is applied to the
switch.
Step 4 Switch(config-if)# interface
interface-id (Optional) Enters interface configuration mode, and specify the
interface on which to apply the macro.
Step 5 Switch(config-if)# default interface
interface-id (Optional) Clears all configuration from the specified interface.
Step 6 Switch(config-if)# macro {apply |
trace} macro-name [parameter {value}]
[parameter {value}] [parameter
{value}]
Applies each individual command defined in the macro to the interface
by entering macro apply macro-name. Specify macro trace
macro-name to apply and debug a macro to find any syntax or
configuration errors.
(Optional) Specify unique parameter values that are specific to the
interface. You can enter up to three keyword-value pairs. Parameter
keyword matching is case sensitive. All matching occurrences of the
keyword are replaced with the corresponding value.
Some macros might contain keywords that require a parameter value.
Use the macro apply macro-name ? command to display a list of any
required values in the macro. If you apply a macro without entering the
keyword values, the commands are invalid and are not applied.
For example, here is how you apply this command:
Switch(config-if)# macro apply cisco-phone ?
WORD Keyword to replace with a value e.g. $AVID, $VVID
<cr>
Step 7 Switch(config-if)# macro description
text (Optional) Enters a description about the macro that is applied to the
interface.
Step 8 Switch(config-if)# end Returns to privileged EXEC mode.