Cisco catalyst 3750 Command Reference Manual page 367

Hide thumbs Also See for catalyst 3750:
Table of Contents

Advertisement

Chapter 2
Catalyst 3750 Switch Cisco IOS Commands
The switch automatically maps from event triggers to built-in macros. The built-in macros are
system-defined macros in the software image. You can also create user-defined macros by using the
Cisco IOS shell scripting capability.
You can create new event triggers by using the shell trigger global configuration command. Use the
show shell privileged EXEC command to display the contents of the built-in and user-defined triggers
and macros.
Auto Smartports macros and antimacros (the antimacro is the portion of the applied macro that removes
it at link down) have these guidelines and limitations:
Examples
This example shows how to use two built-in Auto Smartports macros for connecting Cisco switches and
Cisco IP phones to the switch. This example modifies the default voice VLAN, access VLAN, and native
VLAN for the trunk interface:
Switch# configure terminal
Switch(config)#!!! the next command modifies the access and voice vlans
Switch(config)#!!! for the built in Cisco IP phone auto smartport macro
Switch(config)# macro auto execute CISCO_PHONE_EVENT builtin CISCO_PHONE_AUTO_SMARTPORT
ACCESS_VLAN=10 VOICE_VLAN=20
Switch(config)#
Switch(config)#!!! the next command modifies the Native vlan used for inter switch trunks
Switch(config)# macro auto execute CISCO_SWITCH_EVENT builtin CISCO_SWITCH_AUTO_SMARTPORT
NATIVE_VLAN=10
Switch(config)#
Switch(config)#!!! the next command enables auto smart ports globally
Switch(config)# macro auto global processing cdp-fallback
Switch(config)#
Switch(config)# exit
Switch# !!! here's the running configuration of the interface connected
Switch# !!! to another Cisco Switch after the Macro is applied
Switch#
Switch# show running-config interface Gi1/0/1
OL-8552-07
The built-in macros cannot be deleted or changed. However, you can override a built-in macro by
creating a user-defined macro with the same name. To restore the original built-in macro, delete the
user-defined macro.
To avoid system conflicts when Auto Smartports macros are applied, remove all port configuration
except for 802.1x authentication.
If the macro conflicts with the original configuration, some macro commands might not be applied,
or some antimacro commands might not be removed.
For example, if 802.1x authentication is enabled, you cannot remove switchport-mode access
configuration. Remove the 802.1x authentication before removing the switchport mode
configuration.
A port should not be a member of an EtherChannel when applying Auto Smartports macros.
The built-in macro default data VLAN is VLAN 1. The default voice VLAN is VLAN 2. You should
modify the built-in macro default values if your switch uses different VLANs. To view all built-in
macro default values, use the show shell functions privileged EXEC command.
For 802.1x authentication or MAB, configure the RADIUS server to support the Cisco
attribute-value (av) pair auto-smart-port=event trigger to detect non-Cisco devices.
For stationary devices that do not support CDP, MAB, or 802.1x authentication, such as network
printers, we recommend that you disable Auto Smartports on the port.
The order of CLI commands within the macro and the corresponding antimacro can be different.
Catalyst 3750 Switch Command Reference
macro auto execute
2-337

Advertisement

Table of Contents
loading

Table of Contents