Macro - Cisco 300 Series Cli Manual

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

Advertisement

Macro Commands
OL-32830-01 Command Line Interface Reference Guide
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
and SPEED must be provided by the user. The #macro keywords command
enables the user to receive help for the macro as shown in Example 3.
switchxxxxxx(config)#
Enter macro commands one per line. End with the character '@'.
duplex $DUPLEX
no negotiation
speed $SPEED
#macro keywords $DUPLEX $SPEED
@
Example 3 -The following example shows how to display the keywords using the
help character ? (as defined by the #macro keywords command above) and then
run the macro on the port. The #macro keywords command entered in the macro
definition enables the user to receive help for the macro, as shown after the words
e.g. below.
switchxxxxxx(config)#
switchxxxxxx(config-if)#
WORD <1-32>
Keyword to replace with value e.g. $DUPLEX, $SPEED
<cr>
switchxxxxxx(config-if)#
WORD<1-32>
First parameter value
<cr>
switchxxxxxx(config-if)#
WORD<1-32>
Second parameter value
switchxxxxxx(config-if)#

32.2 macro

Use the macro apply/trace Interface Configuration command to either:
Apply a macro to an interface without displaying the actions being
performed
macro name duplex
interface gi11
macro apply duplex ?
macro apply duplex $DUPLEX ?
macro apply duplex $DUPLEX full $SPEED ?
macro apply duplex $DUPLEX full $SPEED 100
32
688

Advertisement

Table of Contents
loading

Table of Contents