17-7
Software Configuration Guide—Release 15.0(2)SG
OL-23818-01
Chapter 17 Configuring Auto SmartPort Macros Configuring Auto SmartPorts
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 SmartPorts 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)#
Switch(config)#!!! the next command enables auto smart ports globally
Switch(config)# macro auto global processing fallback cdp
Switch(config)#
Switch(config)# exit
Switch#
Switch# show running-config interface gigabitethernet2/7
Building configuration...
Current configuration : 284 bytes
!
switchport access vlan 10
switchport mode access
switchport voice vlan 2
switchport port-security maximum 2
switchport port-security
switchport port-security aging time 2
switchport port-security violation restrict
switchport port-security aging type inactivity
auto qos voip cisco-phone
qos trust device cisco-phone
neighbor device type phone
macro description CISCO_PHONE_EVENT
spanning-tree portfast
spanning-tree bpduguard enable
service-policy input AutoQos-VoIP-Input-Cos-Policy
service-policy output AutoQos-VoIP-Output-Policy
end
Note You can also use the macro auto device command to simplify changing the parameters for a built-in
functions for a device type.
Configuring User-Defined Event Triggers
You can configure two types of event triggers: user-defined and MAC address-based.
The following sections describe these triggers:
802.1X-Based Event Trigger, page 17-7
MAC Address-Based Event Trigger, page 17-8

802.1X-Based Event Trigger

When using MAB or 802.1X authentication to trigger Auto SmartPorts macros, you need to create an
event trigger that corresponds to the Cisco AV pair (auto-smart-port=event trigger) sent by the
RADIUS server.