Creating Smartport Macros - Cisco Catalyst 4500 Series Software Configuration Manual

Cisco ios xe release 3.9.xe and cisco ios release 15.2(5)ex
Hide thumbs Also See for Catalyst 4500 Series:
Table of Contents

Advertisement

Chapter 21
Configuring SmartPort Macros
Cisco-default SmartPort macros are embedded in the switch software (see
these macros and the commands they contain by using the show parser macro user EXEC command.
Follow these guidelines when you apply a Cisco-default SmartPort macro on an interface:

Creating SmartPort Macros

To create a SmartPort macro, perform this task:
Command
Step 1
Switch# configure terminal
Step 2
Switch(config)# macro name
macro-name
Step 3
Switch(config)# end
Step 4
Switch# show parser macro name
macro-name
When you apply a macro to a switch or a switch interface, the macro name is automatically added
to the macro description of the switch or interface. You can display the applied commands and macro
names by using the show parser macro description user EXEC command.
The user-configurable macro has a buffer that can take commands and comments up to 3000
characters. Each new line takes two characters, and empty lines are counted as is.
Display all macros on the switch by using the show parser macro user EXEC command. Display
the contents of a specific macro by using the show parser macro macro-name user EXEC
command.
Keywords that begin with $ mean that a unique parameter value is required. Append the
Cisco-default macro with the required values by using the parameter value keywords.
The Cisco-default macros use the $ character to help identify required keywords. There is no
restriction on using the $ character to define keywords when you create a macro.
Catalyst 4500 Series Switch, Cisco IOS Software Configuration Guide - Cisco IOS XE 3.9.xE and IOS 15.2(5)Ex
Purpose
Enters global configuration mode.
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.
The no form of the macro name global configuration command
Note
only deletes the macro definition. It does not affect the
configuration of those interfaces on which the macro is already
applied.
Returns to privileged EXEC mode.
Verifies that the macro was created.
Configuring SmartPort Macros
Table
21-1). You can display
21-7

Advertisement

Table of Contents
loading

Table of Contents