Cisco Small Business 300 1.1 Series Administration Manual page 51

Managed switch
Table of Contents

Advertisement

Macro Commands
78-20269-01 Command Line Interface Reference Guide
configuration modes within the macro by using commands such as exit, end, or
interface-id
interface
macros in the various configuration modes.
You can 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 macros and corresponding anti-macros for Smartport. For example,
you cannot edit the host and the no_host macros.
Examples
Example 1 - The following example shows how to create a macro that when
applied configures the duplex mode and speed of a port.
Switch(config)#
macro name dup
Enter macro commands one per line. End with the character '@'.
macro description dup
no negotiation
duplex full
negotiation
@
Example 2 - The following example shows how to create the same macro as in
Example 1, but in this example, the macro has 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.
Switch(config) #
macro name duplex
Enter macro commands one per line. End with the character '@'.
duplex $DUPLEX
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):
switch<config-if>#
macro apply duplex ?
. With few exceptions, there are other ways of executing
3
52

Advertisement

Table of Contents
loading

Table of Contents