Cisco catalyst 3750 Command Reference Manual page 368

Hide thumbs Also See for catalyst 3750:
Table of Contents

Advertisement

macro auto execute
Building configuration...
Current configuration : 284 bytes
!
interface GigabitEthernet1/0/1
switchport trunk encapsulation dot1q
switchport trunk native vlan 10
switchport mode trunk
srr-queue bandwidth share 10 10 60 20
queue-set 2
priority-queue out
mls qos trust cos
auto qos voip trust
macro description CISCO_SWITCH_EVENT
end
This example shows how to map a user-defined event trigger called Cisco Digital Media Player (DMP)
to a user-defined macro.
Connect the DMP to an 802.1x- or MAB-enabled switch port.
a.
On the RADIUS server, set the attribute-value pair to auto-smart-port=CISCO_DMP_EVENT.
b.
On the switch, create the event trigger CISCO_DMP_EVENT, and enter the user-defined macro
c.
commands shown below.
The switch recognizes the attribute-value pair=CISCO_DMP_EVENT response from the RADIUS
d.
server and applies the macro associated with this event trigger.
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
switchport mode access
switchport port-security
switchport port-security maximum 1
switchport port-security violation restrict
switchport port-security aging time 2
switchport port-security aging type inactivity
spanning-tree portfast
spanning-tree bpduguard enable
exit
fi
if [[ $LINKUP -eq NO ]]; then
conf t
interface $INTERFACE
fi
}
Switch(config)# end
Catalyst 3750 Switch Command Reference
2-338
no macro description $TRIGGER
no switchport access vlan 1
if [[ $AUTH_ENABLED -eq NO ]]; then
no switchport mode access
fi
no switchport port-security
no switchport port-security maximum 1
no switchport port-security violation restrict
no switchport port-security aging time 2
no switchport port-security aging type inactivity
no spanning-tree portfast
no spanning-tree bpduguard enable
exit
Chapter 2
Catalyst 3750 Switch Cisco IOS Commands
OL-8552-07

Advertisement

Table of Contents
loading

Table of Contents