EasyManua.ls Logo

Cisco Catalyst 4500 Series - Creating Smartport Macros

Cisco Catalyst 4500 Series
1814 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
20-8
Software Configuration Guide—Release IOS XE 3.6.0E and IOS 15.2(2)E
OL_28731-01
Chapter 20 Configuring SmartPort Macros
Configuring SmartPort Macros
Creating SmartPort Macros
To create a SmartPort macro, perform this task:
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 name
macro-name
Creates a macro definition, and enter a macro name. A macro definition
can contain up to 3000 characters.
Enter the macro commands with one command per line. Use the @
character to end the macro. Use the # character at the beginning of a line
to enter comment text within the macro.
Macro names are case sensitive. For example, the commands macro
name Sample-Macro and macro name sample-macro result in two
separate macros.
We recommend that you do not use the exit or end commands or change
the command mode by using interface interface-id in a macro. This
could cause any commands following exit, end, or interface
interface-id to execute in a different command mode. For best results,
all commands in a macro should be in the same configuration mode.
Note The no form of the macro name global configuration command
only deletes the macro definition. It does not affect the
configuration of those interfaces on which the macro is already
applied.
Step 3
Switch(config)# end
Returns to privileged EXEC mode.
Step 4
Switch# show parser macro name
macro-name
Verifies that the macro was created.
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 macro 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.

Table of Contents

Other manuals for Cisco Catalyst 4500 Series

Related product manuals