EasyManua.ls Logo

Cisco Catalyst 4500 Series - Applying Smartport Macros

Cisco Catalyst 4500 Series
2086 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
21-8
Catalyst 4500 Series Switch, Cisco IOS Software Configuration Guide - Cisco IOS XE 3.9.xE and IOS 15.2(5)Ex
Chapter 21 Configuring SmartPort Macros
Configuring SmartPort Macros
Applying SmartPort Macros
To apply a SmartPort macro, perform this task:
Command Purpose
Step 1
Switch# configure terminal
Enters global configuration mode.
Step 2
Switch(config)# macro global {apply |
trace} macro-name [parameter {value}]
[parameter {value}] [parameter
{
value}]
Applies each individual command defined in the macro to the switch by
entering macro global apply macro-name. Specify macro global trace
macro-name to apply and debug a macro to find any syntax or
configuration errors.
(Optional) Specify unique parameter values that are specific to the
switch. You can enter up to three keyword-value pairs. Parameter
keyword matching is case sensitive. All matching occurrences of the
keyword are replaced with the corresponding value.
Some macros might contain keywords that require a parameter value.
Use the macro global apply macro-name ? command to display a list of
any required values in the macro. If you apply a macro without entering
the keyword values, the commands are invalid and are not applied.
Step 3
Switch(config)# macro global
description
text
(Optional) Enters a description about the macro that is applied to the
switch.
Step 4
Switch(config-if)# interface
interface-id
(Optional) Enters interface configuration mode, and specify the
interface on which to apply the macro.
Step 5
Switch(config-if)# default interface
interface-id
(Optional) Clears all configuration from the specified interface.
Step 6
Switch(config-if)# macro {apply |
trace} macro-name [parameter {value}]
[
parameter {value}] [parameter
{value}]
Applies each individual command defined in the macro to the interface
by entering macro apply macro-name. Specify macro trace
macro-name to apply and debug a macro to find any syntax or
configuration errors.
(Optional) Specify unique parameter values that are specific to the
interface. You can enter up to three keyword-value pairs. Parameter
keyword matching is case sensitive. All matching occurrences of the
keyword are replaced with the corresponding value.
Some macros might contain keywords that require a parameter value.
Use the macro apply macro-name ? command to display a list of any
required values in the macro. If you apply a macro without entering the
keyword values, the commands are invalid and are not applied.
For example, here is how you apply this command:
Switch(config-if)# macro apply cisco-phone ?
WORD Keyword to replace with a value e.g. $AVID, $VVID
<cr>
Step 7
Switch(config-if)# macro description
text
(Optional) Enters a description about the macro that is applied to the
interface.
Step 8
Switch(config-if)# end
Returns to privileged EXEC mode.
Step 9
Switch# show parser macro
description
[interface interface-id]
Verifies that the macro is applied to the interface.
Step 10
Switch# copy running-config
startup-config
(Optional) Saves your entries in the configuration file.

Table of Contents

Other manuals for Cisco Catalyst 4500 Series

Related product manuals