Specifications
7-6
System Management Software Configuration Guide for Cisco IE 2000U and Connected Grid Switches
Chapter 7 Configuring Smartports Macros
Configuring Smartports Macros
You can delete the cisco-cg-password and cisco-sniffer global macros on a switch by entering the no
version of each command in the macro. The cisco-cg-global global macro does not have a no version.
You can delete a macro-applied configuration on a port by entering the default interface interface-id
interface configuration command.
EXAMPLE
This example shows how to display the cisco-desktop macro and how to set the access VLAN ID to 25
on an interface:
Switch# show parser macro name cisco-desktop
Macro name : cisco-desktop
Macro type : default interface
# Macro keywords $access_vlan
# macro description cisco-desktop
switchport access vlan $access_vlan
switchport port-security
switchport port-security maximum 1
switchport port-security aging time 2
switchport port-security violation restrict
switchport port-security aging type inactivity
port-type nni
spanning-tree portfast
spanning-tree bpduguard enable
Switch# configure terminal
Switch(config-if)# interface fastethernet 0/2
Switch(config-if)# macro trace cisco-desktop $access_vlan 25
Applying command... 'macro description cisco-desktop'
Applying command... 'switchport access vlan 25'
Applying command... 'switchport port-security'
Step 7
macro {apply | trace} macro-name
[parameter {value}] [parameter
{value}] [parameter {value}]
Apply each individual command defined in the macro to the
port by entering macro apply macro-name. Specify macro
trace macro-name to apply and to debug a macro to find any
syntax or configuration errors.
Append the macro with the required values by using the
parameter value keywords. Keywords that begin with $ require
a unique parameter value.
You can use the macro apply macro-name ? command to
display a list of any required values for the macro. If you apply
a macro without entering the keyword values, the commands are
invalid and are not applied.
(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. The
corresponding value replaces all matching occurrences of the
keyword.
Step 8
end Return to privileged EXEC mode.
Step 9
show running-config interface
interface-id
Verify that the macro is applied to an interface.
Step 10
copy running-config
startup-config
(Optional) Save your entries in the configuration file.
Command Purpose