14-16
Catalyst 3750-X and 3560-X Switch Software Configuration Guide
OL-21521-01
Chapter 14 Configuring Auto Smartports Macros
Configuring Auto Smartports
conf t
interface $INTERFACE
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
fi
}
Switch(config)# end
Tab le 14-2 Supported Cisco IOS Shell Keywords
Command Description
{Begin the command grouping.
}End the command grouping.
[[ Use as a conditional construct.
]] Use as a conditional construct.
else Use as a conditional construct.
-eq Use as a conditional construct.
fi Use as a conditional construct.
if Use as a conditional construct.
then Use as a conditional construct.
-z Use as a conditional construct.
$Variables that begin with the $ character are
replaced with a parameter value.
#Use the # character to enter comment text.
Tab le 14-3 Unsupported Cisco IOS Shell Reserved Keywords
Command Description
|Pipeline.
case Conditional construct.
esac Conditional construct.
for Looping construct.
function Shell function.
in Conditional construct.
select Conditional construct.
time Pipeline.