Cisco 300 Series Cli Manual page 56

Small business 300 series managed switches command line interface guide release 1.3
Hide thumbs Also See for 300 Series:
Table of Contents

Advertisement

3
56
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
smartport
macro.
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
@
Example 2 -The following example shows how to create a macro with the
parameters: DUPLEX and SPEED. When the macro is run, the values of DUPLEX
keyword1
keyword2
$
. With a few exceptions, there are other ways of executing
macro name dup
78-21075-01 Command Line Interface Reference Guide
Macro Commands
keyword3
$
macro auto user

Advertisement

Table of Contents
loading

Table of Contents