17-2
Software Configuration Guide—Release 15.0(2)SG
OL-23818-01
Chapter 17 Configuring Auto SmartPort Macros
Configuring Auto SmartPorts
System built-in event triggers exist for various devices based mostly on CDP and LLDP messages
(Table 17-1) and some MAC address.and some MAC address. (Through Cisco IOS Release 12.2(54)SG,
DMP is detected using the MAC address. Starting with Cisco IOS Release 15.0(2)SG, DMP is also
detected using CDP.) These triggers are enabled as long as Auto SmartPort is enabled.
You can also define your own trigger. User-defined triggers can be CDP/LLDP-based, a group of MAC
addresses, or the value of the attribute-value (AV) pair for the auto-smart-port keyword.
The Auto SmartPort macros are groups of CLI commands. Detection of devices on a port triggers the
application of the macro for the device. (For example, detecting a CISCO_PHONE event on a port
triggers the switch to apply the commands in the CISCO_PHONE_AUTO_SMARTPORT macro.)
System built-in macros exist for various devices, and, by default, system built-in triggers are mapped to
the corresponding built-in macros. You can change the mapping of built-in triggers or macros as needed.
A macro basically applies or removes a set of CLIs on an interface based on the link status. In a macro,
the link status is checked. If the link is up, then a set of CLIs is applied; if the link is down, the set is
removed (the no format of the CLIs are applied). The part of the macro that applies the set of CLIs is
termed macro. The part that removes the CLIs (the no format of the CLIs) are termed antimacro.
Besides creating user-defined triggers, you can also create user-defined macros and map one to the other
among all triggers (both built-in and user-defined) and all macros (both built-in and user-defined). Use
the Cisco IOS scripting capability to create the macros. Cisco IOS scripting is a BASH-like language
syntax for command automation and variable replacement.
The four detection mechanisms adhere to the following order of priority:
If 802.1X authentication is configured on a port, an authentication response-based trigger is applied,
and other triggers are ignored.
If 802.1X authentication fails and the CDP/LLDP fallback mechanism is configured, CDP/LLDP
triggers for phone devices only; if no fallback mechanism is configured, or a device is not a phone
device, nothing is triggered.
If 802.1X authentication is configured on a port, a MAC address-based trigger is never triggered.
If 802.1X authentication is not configured on a port, CDP/LLDP has priority over a MAC
address-based trigger with a hold-off timer applied for MAC-address based trigger. Between
CDP/LLDP, there is no particular order; whichever one arrives first is triggered.
Configuring Auto SmartPorts
The following topics are included:
Enabling Auto SmartPorts, page 17-3
Auto SmartPorts Configuration Guidelines, page 17-4
Configuring Auto SmartPorts Built-in Macro Parameters, page 17-6
Configuring User-Defined Event Triggers, page 17-7
Configuring Mapping Between User-Defined Triggers and Built-in Macros, page 17-9
Configuring Auto SmartPorts User-Defined Macros, page 17-9