Cisco Systems 3560 사용자 설명서

다운로드
페이지 1288
 
12-14
Catalyst 3560 Switch Software Configuration Guide
OL-8553-06
Chapter 12      Configuring Auto Smartports Macros
Displaying Auto Smartports and Static Smartports Macros
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#
Switch# configure terminal
Switch(config)# interface gigabitethernet0/4
Switch(config-if)# macro apply cisco-desktop $AVID 25
Displaying Auto Smartports and Static Smartports Macros
To display the Auto Smartports and static Smartports macros, use one or more of the privileged EXEC 
commands in 
Table 12-5
Commands for Displaying Auto Smartports and Static Smartports Macros 
Command
Purpose
show parser macro
Displays all static Smartports macros.
show parser macro name macro-name
Displays a specific static Smartports macro.
show parser macro brief
Displays the static Smartports macro names.
show parser macro description [interface 
interface-id]
Displays the static Smartports macro description for all interfaces or 
for a specified interface.
show shell
Displays information about Auto Smartports event triggers and 
macros.