Cisco Small Business 300 1.1 Series Administration Manual page 53

Managed switch
Table of Contents

Advertisement

Macro Commands
78-20269-01 Command Line Interface Reference Guide
Default Configuration
The command has no default setting.
Command Mode
Interface Configuration mode
User Guidelines
The macro apply Interface Configuration mode command hides the commands of
the macro from the user while it is being run. For debugging purposes, the macro
trace command displays the commands along with any errors which are
generated by them as they are executed." In this way, you can debug the macro
and find syntax or configuration errors.
When you run a macro, if commands in it fail because of a syntax or configuration
error, the macro continues to apply the remaining commands to the interface.
If you apply a macro that contains parameters in its commands, the command fails
if you do not provide the values for the parameters. You can use the macro apply
macro-name
with a '?' to display the help string for the macro keywords (if you
have defined these with the #macro keywords preprocessor command).
Parameter (keyword) matching is case sensitive. All matching occurrences of the
parameter are replaced with the provided value. Any full match of a keyword, even
if it is part of a large string, is considered a match and replaced by the
corresponding value.
When you apply a macro to an interface, the switch automatically generates a
macro description command with the macro name. As a result, the macro name is
appended to the macro history of the interface. You can display the macro history
of an interface using the show parser macro description command.
A macro applied to an interface range behaves the same way as a macro applied
to a single interface. When a macro is applied to an interface range, it is applied
sequentially to each interface within the range. If a macro command fails on one
interface, it is nonetheless applied to the remaining interfaces.
Examples.
Example 1 - The following is an example of a macro being applied to an interface
with the trace option.
Switch(config) #
interface gi2
Switch<config-if> #
Applying command...
macro trace dup
'duplex full'
3
54

Advertisement

Table of Contents
loading

Table of Contents