Creating And Applying Smartport Macros - Cisco WS-C3560-48PS-S Software Configuration Manual

Software configuration guide
Hide thumbs Also See for WS-C3560-48PS-S:
Table of Contents

Advertisement

Chapter 11
Configuring SmartPort Macros

Creating and Applying SmartPort Macros

Beginning in privileged EXEC mode, follow these steps to create and apply a SmartPort macro:
Command
Step 1
configure terminal
Step 2
macro name macro-name
Step 3
interface interface-id
Step 4
macro {apply | trace} macro-name
Step 5
macro description text
Step 6
end
Step 7
show parser macro
Step 8
show running-config interface
interface-id
Step 9
copy running-config startup-config
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. You can
delete a macro-applied configuration on an interface by entering the default interface interface-id
interface configuration command. Alternatively, you can create an anti-macro for an existing macro that
contains the no form of all the corresponding commands in the original macro. Then apply the
anti-macro to the interface.
78-16156-01
Purpose
Enter global configuration mode.
Create 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.
We recommend that you do not use the exit or end commands in a
macro. This could cause any commands following exit or end to execute
in a different command mode. For best results, all commands in a macro
should be interface configuration mode commands.
Enter interface configuration mode, and specify the interface on which
to apply the macro.
Apply each individual command defined in the macro to the interface by
entering macro apply macro-name. Specify macro trace macro-name
to apply and print each command before it is applied to the interface.
(Optional) Enter a description about the macro that is applied to the
interface.
Return to privileged EXEC mode.
Verify that the macro was created.
Verify that the macro is applied to an interface.
(Optional) Save your entries in the configuration file.
Catalyst 3560 Switch Software Configuration Guide
Configuring Smart-Port Macros
11-3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents