Cisco 300 Series Cli Manual page 687

Stackable managed switches
Hide thumbs Also See for 300 Series:
Table of Contents

Advertisement

32
687
help string will be displayed if help on the macro is requested from the
macro and macro global commands. The GUI also uses the keywords
specified in the command as the parameter names for the macro. See
Example 2 and 3 below for a description of how this command is used in
the CLI.
The syntax for this preprocessor command is as follows:
#macro keywords $
where $keywordn is the name of the keyword.
Editing a Macro
Macros cannot be edited. Modify a macro by creating a new macro with the same
name as the existing macro. The newer macro overwrites the existing macro.
The exceptions to this are the built-in macros and corresponding anti-macros for
the Smartport feature. You cannot override a Smartport macro. To change a
Smartport macro, create a new macro (my_macro) and an anti macro
(no_my_macro) and associate it with the Smartport type using the
smartport macro
command.
Scope of Macro
It is important to consider the scope of any user-defined macro. Because of the
potential hazards of applying unintended configurations, do not change
configuration modes within the macro by using commands such as exit, end, or
interface-id
interface
macros in the various configuration modes. Macros may be executed in Privileged
Exec mode, Global Configuration mode, and Interface Configuration mode (when
the interface is NOT a VLAN.)
Examples
Example 1 -The following example shows how to create a macro that configures
the duplex mode of a port.
switchxxxxxx(config)#
Enter macro commands one per line. End with the character '@'.
#macro description dup
duplex full
negotiation
@
keyword1
keyword2
$
. With a few exceptions, there are other ways of executing
macro name dup
OL-32830-01 Command Line Interface Reference Guide
Macro Commands
keyword3
$
macro auto user

Advertisement

Table of Contents
loading

Table of Contents