Configuring Auto Smartport User-Defined Macros - Cisco Catalyst 4500 Series Software Configuration Manual

Cisco ios xe release 3.9.xe and cisco ios release 15.2(5)ex
Hide thumbs Also See for Catalyst 4500 Series:
Table of Contents

Advertisement

Configuring Auto Smartport Macros
Command
Step 3
Switch(config)# end
Step 4
Switch# show shell triggers
Step 5
Switch# copy running-config
startup-config
This example shows how to map a user-defined event trigger called RADIUS_MAB_EVENT to the
built-in macro CISCO_PHONE_AUTO_SMARTPORT with access VLAN set to 10, and how to verify
the entries.
This procedure shows how to map a user-defined trigger to a built-in macro:
Step 1
Connect the device to a MAB-enabled switch port.
On the RADIUS server, set the attribute-value pair to auto-smart-port=RADIUS_MAB_EVENT.
Step 2
On the switch, create the event trigger RADIUS_MAB_EVENT.
Step 3
The switch recognizes the attribute-value pair=RADIUS_MAB_EVENT response from the RADIUS
server and applies the macro CISCO_PHONE_AUTO_SMARTPORT, as in the following example:
Switch(config)# macro auto execute RADIUS_MAB_EVENT builtin CISCO_PHONE_AUTO_SMARTPORT
ACCESS_VLAN=10
Switch(config)# exit
Switch# show shell triggers
User defined triggers
---------------------
Trigger Id: RADIUS_MAB_EVENT
Trigger description: MAC_AuthBypass Event
Trigger environment:
Trigger mapping function: CISCO_PHONE_AUTO_SMARTPORT
<output truncated>

Configuring Auto Smartport User-Defined Macros

The Cisco IOS shell provides basic scripting capabilities for configuring the user-defined
Auto Smartport macros. These macros can contain multiple lines and can include any CLI command.
You can also define variable substitution, conditionals, functions, and triggers within the macro.
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 22-3
Parameter Name
$INTERFACE
$LINKUP
$TRIGGER
$AUTH_ENABLED
Catalyst 4500 Series Switch, Cisco IOS Software Configuration Guide - Cisco IOS XE 3.9.xE and IOS 15.2(5)Ex
22-10
Purpose
Returns to privileged EXEC mode.
Displays the event triggers on the switch.
(Optional) Saves your entries in the configuration file.
Variables Published by EEM
Meaning
Name of the interface where the trigger event is detected.
Indicates whether the interface is up or down (true/false).
Name of the trigger event that is raised (for example,
CISCO_PHONE_EVENT).
Indicates whether 802.1X authentication is configured on the interface
(true/false).
Chapter 22
Configuring Cisco IOS Auto Smartport Macros
(Table
22-3):

Advertisement

Table of Contents
loading

Table of Contents