Cisco Catalyst 4500 Series Configuration Manual page 516

Release ios xe 3.3.0sg and ios 15.1(1)sg
Hide thumbs Also See for Catalyst 4500 Series:
Table of Contents

Advertisement

Configuring Static SmartPort Macros
Command
{
|
Step 7
macro
apply
trace
[
{
parameter
value
{
}] [
value
parameter
Step 8
end
Step 9
show running-config interface
interface-id
Step 10
copy running-config startup-config
You can only delete a global macro-applied configuration on a switch by entering the no version of each
command in the macro. You can delete a macro-applied configuration on a port by entering the default
interface interface-id interface configuration command.
This example shows how to display the cisco-desktop macro, to apply the macro and to set the access
VLAN ID to 25 on an interface:
Switch# show parser macro cisco-desktop
--------------------------------------------------------------
Macro name : cisco-desktop
Macro type : default
# Basic interface - Enable data VLAN only
# Recommended value for access vlan (AVID) should not be 1
switchport access vlan $AVID
switchport mode access
# Enable port security limiting port to a single
# MAC address -- that of desktop
switchport port-security
switchport port-security maximum 1
# Ensure port-security age is greater than one minute
# and use inactivity timer
switchport port-security violation restrict
switchport port-security aging time 2
switchport port-security aging type inactivity
# Configure port as an edge network port
spanning-tree portfast
spanning-tree bpduguard enable
--------------------------------------------------------------
Switch# configure terminal
Switch(config)# interface gigabitethernet1/0/4
Switch(config-if)# macro apply cisco-desktop $AVID 25
Software Configuration Guide—Release IOS XE 3.3.0SG and IOS 15.1(1)SG
18-16
Purpose
}
Applies each individual command defined in the macro to the port by
macro-name
}] [
parameter
entering macro global apply macro-name. Specify macro global trace
{
}]
value
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.
Use the macro global 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.
Returns to privileged EXEC mode.
Verifies that the macro is applied to an interface.
(Optional) Saves your entries in the configuration file.
Chapter 18
Configuring SmartPort Macros
OL-25340-01

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents