Hello,
Pleased help me! I have configured macro auto execute on Switch C3560E as below but it does not work, The idea is that when a link change to up, the switch automatically assigns this link to VLAN 10, and then link down, switch removes this link from vlan 10 and assigns it to vlan1.
This is my configuration:
shell trigger mac-list_vlan10 mac-list_vlan10
!
macro auto execute mac-list_vlan10 {
if [[ $LINKUP == YES ]]
then conf t
interface $INTERFACE
macro description $TRIGGER
switchport access vlan 10
fi
if [[ $LINKUP == NO ]]
then conf t
interface $INTERFACE
switchport access vlan 1
no macro description
fi
}
!
macro auto mac-address-group mac-list_vlan10
mac-address list F0E4.3B85.E5J8
macro auto global processing
!
After applying this configuration, I saw the log informing that the macro has been executed. However, the link was not assigned to VLAN 10; it remained in VLAN 1 by default
%AUTOSMARTPORT-5-INSERT: Device with mac-address f0e4.3b85.e5j8 detected on interface GigabitEthernet0/10, executed mac-list_vlan10
This is a result when I show:show macro auto interface
Interface Auto Smart Port Fallback Macro Description(s)
--------------------------------------------------------------
Gi0/10 TRUE None No Macro Applied
thank you so much!!