
55-47
Catalyst 6500 Series Switch Software Configuration Guide—Release 8.7
OL-8978-02
Chapter 55 Configuring a VoIP Network
Using SmartPorts
Global SmartPorts Template
The ciscosmartports global macro command results in the following configuration:
set macro ciscosmartports
----------------------------------------------------
set udld enable
set errdisable-timeout enable udld
set errdisable-timeout enable duplex-mismatch
set errdisable-timeout enable channel-misconfig
set errdisable-timeout enable bpdu-guard
set errdisable-timeout interval 60
set cdp enable
set cdp version v2
set spantree mode rapid-pvst+
set spantree macreduction enable
set spantree portfast bpdu-guard enable
set spantree global-default loop-guard enable
set qos autoqos
Configuring User-Definable SmartPorts Macros
These sections describe how to define and implement SmartPorts macros:
• Overview, page 55-47
• Using the CLI to Configure User-Definable SmartPorts Macros, page 55-48
Overview
This section describes the user-definable SmartPorts macros:
• Creating a macro—The user-definable macro approach is similar in concept to the alias command.
The alias command is an alias for only one command; the user-definable macro approach creates a
command set macro for one or more commands. The macros are created using the set macro name
name command after which you enter a list of commands that become part of the macro.
• Creating variables for macros—When defining macros, some commands require parameters that
need to be specified by variables (such as the VLAN ID for Ethernet ports or the IP address for
ACLs). The variables are defined as “'keyword-value” pairs, where the first parameter must be the
name of the variable and the second parameter is its value. Each variable can be defined on a per-port
or global basis. The variables are created using the set macro variable name_of_variable
variable_value mod/port command. The variables and their values are stored in the switch in a
table/database. When a macro with a variable in its definition is applied to a port, the macro takes
the values from the table/database and executes the commands in the macro.
• Displaying macros and variable definitions—To display macros and their variable definitions, enter
the show macro macro-name command and the show macro variable [all] [name name_of_macro]
[mod/port] command.
• Applying a macro—After you create a macro, it needs to be applied to a port. When the macro is
applied to a port, if the macro contains any variables, the variables are replaced with the respective
values that are predefined in the table/database, and then the commands in the macro definition are
executed. To apply a macro to a port, enter the set port macro mod/port name_of_macro command.