17-10
Software Configuration Guide—Release 15.0(2)SG
OL-23818-01
Chapter 17 Configuring Auto SmartPort Macros
Configuring Auto SmartPorts
Inside a user-defined macro, besides parameters specified through macro auto execute trigger
parameter-name=value .., you also can use the following variables published by EEM (Table 17-3):
To map an event trigger to a user-defined macro, perform this task:
Table 17-3 Variables Published by EEM
Parameter Name Meaning
$INTERFACE Name of the interface where the trigger event is detected.
$LINKUP Indicates whether the interface is up or down (true/false).
$TRIGGER Name of the trigger event that is raised (for example,
CISCO_PHONE_EVENT).
$AUTH_ENABLED Indicates whether 802.1X authentication is configured on the interface
(true/false).
Command Purpose
Step 1
Switch# configure terminal
Enters global configuration mode.
Step 2
Switch(config)# macro auto
execute event trigger
[parameter=value] {function
contents}
Specifies a user-defined macro that maps to an event trigger.
Specify an event trigger value:
• CISCO_PHONE_EVENT
• CISCO_SWITCH_EVENT
• CISCO_ROUTER_EVENT
• CISCO_WIRELESS_AP_EVENT
• CISCO_WIRELESS_LIGHTWEIGHT_AP_EVENT
• WORD Applies a user-defined event trigger.
• CISCO_DMP_EVENT
• CISCO_IPVSC_EVENT
function contents—Specifies a user-defined macro to associate with the
trigger. Enter the macro contents within braces. Begin the Cisco IOS shell
commands with the left brace and end the command grouping with the right
brace.
(Optional) parameter=value—Replaces default values that begin with $,
enter new values in the form of name value pair separated by a space:
[name1=value1 name2=value2...].
Step 3
Switch(config)# end
Returns to privileged EXEC mode.
Step 4
Switch# show running-config
Verifies your entries.
Step 5
Switch# copy running-config
startup-config
(Optional) Saves your entries in the configuration file.