Chapter 19
Configuring Cisco IOS Auto Smartport Macros
Command
Step 2
Switch(config)# macro auto execute
event trigger builtin built-in
macro name [parameter=value]
[parameter=value]
Step 3
Switch(config)# end
Step 4
Switch# show running-config
Step 5
Switch# copy running-config
startup-config
The no macro auto execute event trigger {[builtin built-in macro name [parameter=value]] |
[[parameter=value] {function contents}]} command deletes the mapping.
This example shows how to use two built-in Auto Smartport 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)# macro auto execute CISCO_PHONE_EVENT builtin CISCO_PHONE_AUTO_SMARTPORT
ACCESS_VLAN=10 VOICE_VLAN=20
Switch(config)#
Switch(config)#
OL-25340-01
Purpose
Defines mapping from an event trigger to a built-in macro.
Specify an event trigger value:
•
CISCO_PHONE_EVENT
CISCO_SWITCH_EVENT
•
CISCO_ROUTER_EVENT
•
CISCO_WIRELESS_AP_EVENT
•
CISCO_WIRELESS_LIGHTWEIGHT_AP_EVENT
•
CISCO_DMP_EVENT
•
CISCO_IPVSC_EVENT
•
•
WORD—Apply a user-defined event trigger.
Specify a built-in macro name value:
•
CISCO_PHONE_AUTO_SMARTPORT
(Optional) Specify the parameter values: $ACCESS_VLAN=(1) and
$VOICE_VLAN=(2).
CISCO_SWITCH_AUTO_SMARTPORT
•
(Optional) Specify the parameter values: $NATIVE_VLAN=(1).
CISCO_ROUTER_AUTO_SMARTPORT
•
(Optional) Specify the parameter values: $NATIVE_VLAN=(1).
CISCO_AP_AUTO_SMARTPORT
•
(Optional) Specify the parameter values: $NATIVE_VLAN=(1).
CISCO_LWAP_AUTO_SMARTPORT
•
(Optional) Specify the parameter values: $ACCESS_VLAN=(1).
•
CISCO_DMP_AUTO_SMARTPORT
•
CISCO_IP_CAMERA_AUTO_SMARTPORT
(Optional) parameter=value—Replace default values that begin with $.
Enter new values in the form of name value pair separated by a space:
[name1=value1 name2=value2...]. Default values are shown in
parenthesis.
Returns to privileged EXEC mode.
Verifies your entries.
(Optional) Saves your entries in the configuration file.
Software Configuration Guide—Release IOS XE 3.3.0SG and IOS 15.1(1)SG
Configuring Auto Smartport Macros
19-7