beautypg.com

Dell PowerEdge VRTX User Manual

Page 75

background image

Macro Commands

75

FILE LOCATION: C:\Users\gina\Desktop\Checkout_new\CLI Folders\Dell Plasma-ARC

2+3\new_system_mifs_ARC2_latest\Macro.fm

D E LL CO N F I D E N T IA L – P R E L I M I N A RY 4 / 3 / 14 - F O R PR O O F O N LY

The syntax for this preprocessor command is as follows:
#macro keywords $keyword1 $keyword2 $keyword3
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.
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

interface-id

. With a few exceptions, there are other ways of

executing 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.

console(config)# macro name dup

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 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.

console(config)# macro name duplex

Enter macro commands one per line. End with the character ‘@’.

duplex $DUPLEX