
22-11
Catalyst 4500 Series Switch, Cisco IOS Software Configuration Guide - Cisco IOS XE 3.9.xE and IOS 15.2(5)Ex
Chapter 22 Configuring Cisco IOS Auto Smartport Macros
Configuring Auto Smartport Macros
To map an event trigger to a user-defined macro, perform this task:
This example shows how to map a user-defined event trigger called Cisco Digital Media Player (DMP)
to a user-defined macro.
Step 1
Connect the DMP to an 802.1X- or MAB-enabled switch port.
Step 2
On the RADIUS server, set the attribute-value pair to
auto-smart-port
=MY_MEDIAPLAYER_EVENT.
Step 3
On the switch, create the event trigger CISCO_DMP_EVENT, and map it to the user-defined macro
commands shown below.
The switch recognizes the attribute-value pair=CISCO_DMP_EVENT response from the RADIUS
server and applies the macro associated with this event trigger.
The following example shows the macro portion of the automacro:
Switch(config)#
shell trigger CISCO_DMP_EVENT Cisco DMP player
Switch(config)#
macro auto execute CISCO_DMP_EVENT {
if [[ $LINKUP -eq YES ]]; then
conf t
interface $INTERFACE
macro description $TRIGGER
switchport access vlan 1
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.
Содержание Catalyst 4500 Series
Страница 2: ......
Страница 4: ......
Страница 2086: ...Index IN 46 Software Configuration Guide Release IOS XE 3 9 0E and IOS 15 2 5 E ...