CLI Macro Commands 1339
62
CLI Macro Commands
CLI Macros provides a convenient way to save and distribute common
configurations. A CLI macro is a set of the CLI commands having a unique
name. When a CLI macro is applied, the CLI commands contained within
the macro are executed and added to the Running Configuration File. When
the macro is applied to an interface, the existing configuration is not lost; the
new commands are added configuration.
A CLI Macro may have keywords (variables) which are replaced by values
provided when the macro is applied (up to 3 keywords per macro). Macros can
be applied to specific interfaces, a range of interfaces, or the global
configuration.
There are two types of Macros:
Built-In Macros, or Default Macros – the predefined macros which cannot
be changed or deleted.
User-Defined Macros, or Custom Macros – the macros which allow the
operator to bundle some pre-requisites or global configurations as a macro
and then apply them to one or more interfaces at a time, which can then
be copied or used by other switches. Up to 50 user-defined macros are
supported.
The software includes 6 built-in macros:
profile-global, the global configuration, used to enable RSTP and loop
guard.
profile-desktop, the interface configuration, for increased network security
and reliability when connecting a desktop device, such as a PC, to a switch
port.
profile-phone, the interface configuration, used when connecting a
desktop device such as a PC with an IP Phone to a switch port.
profile-switch, the interface configuration, used when connecting an
access switch and a distribution switch or between access switches.
profile-router, the interface configuration, used when connecting the
switch and a WAN router.
2CSPC4.XCT-SWUM2XX1.book Page 1339 Monday, October 3, 2011 11:05 AM